Where should I add e.g. Hilt Android and AndroidX Navigation Safe Args Gradle Plugins?
See original GitHub issueShould I add them inside buildSrc folder?
plugins {
`kotlin-dsl`
}
repositories {
google()
mavenCentral()
}
dependencies {
implementation(group = "com.android.tools.build", name = "gradle", version = "7.0.1")
implementation(kotlin(module = "gradle-plugin", version = "1.5.30"))
implementation(group = "com.google.dagger", name = "hilt-android-gradle-plugin", version = "2.38.1")
implementation(group = "androidx.navigation", name = "navigation-safe-args-gradle-plugin", version = "2.3.5")
}
Thanks
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Navigation | Android Developers
To add a dependency on Navigation, you must add the Google Maven repository to your project. Read Google's Maven repository for more information ......
Read more >Plugin with id 'androidx.navigation.safeargs' not found
You can use dependencies as below in Project level bulild.gradle in Android Studio bumblebee id 'androidx.
Read more >Support fromSavedStateHandle in SafeArgs [136967621]
I am using Safe Args from Navigation and also using SavedStateHandle to pass in arguments from the args bundle to my ViewModel. This...
Read more >androidx.navigation:navigation-safe-args-gradle-plugin
androidx.navigation:navigation-safe-args-gradle-plugin. Official Description: Android Navigation TypeSafe Arguments Gradle Plugin ...
Read more >Gradle Build Setup - Dagger
Apply Hilt Gradle Plugin with Plugins DSL ... then apply the plugin in the build.gradle of your Android Gradle modules: plugins { //...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can always overcome the lack of a plugin marker by specifying a custom resolution strategy. That’s actually what this template was doing long before this issue was fixed for AGP:
https://github.com/cortinico/kotlin-android-template/blob/d66f85561128698f3b83b78395167a6753cd2e34/settings.gradle.kts#L2-L11
Originally I had those in the buildscript block in the root directory
build.gradle.kts
, but I didn’t know where to move them hence this post.