Hello Guys How can we add navigation safe args Gra...
# android
n
Hello Guys How can we add navigation safe args Gradle Plugin into version catlog toml file
Copy code
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version")
other plugins reference i am able to access in top level
build.gradle.kts
but when I have added nav safe args under toml [plugins] not able to access that particular plugin Not sure is it because of group name with “`:`”
Copy code
android-navsafe-args = { id = "androidx.navigation:navigation-safe-args-gradle-plugin", version.ref = "navSafeArgsPlugin" }
Can anyone please help me in this ?
1
👀 1
m
this sould work: build.gradle.kts
Copy code
@Suppress("DSL_SCOPE_VIOLATION")
buildscript {
  dependencies {
    classpath(deps.plugins.android.navsafe.args)
  }
}
deps.version.toml
Copy code
[versions] # Define the dependency versions
navSafeArgsPlugin = "7.0.4"

[plugins] # Define the plugins
android-navsafe-args = { id = "androidx.navigation:navigation-safe-args-gradle-plugin", version.ref = "navSafeArgsPlugin" }
📓 1
n
@Magdalena Tsolaki so it would be without
plugins {}
? And one small query on different topic the screenshot seems you have changed the name of toml file.. is that needs to be define if we give different name?
m
no I just put it in the root dir instead the gradle dir and rename it
jip thats a plugin as you said 🙂
🤝 1
thats the section of settings.gradle.kts if you want to move your .toml to another dir:
thank you color 1
ℹ️ 1
963 Views