When I create a new module via File -> New -> New Module in Android Studio, the following lines are automatically added to my libs.versions.toml
file if they don’t already exist:
kotlinVersion = "2.0.0"
appcompat = "1.7.0"
material = "1.12.0"
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinVersion" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
Additionally, the following line is added to the project’s build.gradle.kts if it doesn’t already exist:
alias(libs.plugins.jetbrains.kotlin.android) apply false
How can I disable this automatic addition of dependencies to libs.toml and changes to build.gradle.kts when creating a new module? I want to keep using the module creation wizard and avoid doing this manually.
I tried looking through the settings and project structure options in Android Studio but couldn’t find anything related to disabling the automatic dependency additions in libs.versions.toml
or build.gradle.kts
when creating a new module. I was expecting to find an option to turn off this behavior, but nothing relevant showed up.