This message was deleted.
# android
s
This message was deleted.
n
I also did not see this in the release notes. Maybe @Xavier Ducrohet would know?
v
I just found out that I can use
lintClassPath
in module
build.gradle
but not anymore in root
build.gradle
in
Copy code
subprojects {
dependencies {}
}
@Xavier Ducrohet Can you help, please? We are using modules configuration from root
build.gradle
or from external
.gradle
files. Now(AGP 7.1) it is not possible. What is alternative?
n
It's best not to configure all modules inside
subprojects
and instead use conventions plugins. Here is an example: https://docs.gradle.org/current/samples/sample_sharing_convention_plugins_with_build_logic.html
v
Thanks. I will look at that. Anyway global configuration was really useful. Our project has about 150 modules and during java migration we could change java version only in one file instead of modifying 150 files…
Copy code
subprojects {
android {
            compileOptions {
                sourceCompatibility JavaVersion.VERSION_11
                targetCompatibility JavaVersion.VERSION_11
            }

            kotlinOptions {
                jvmTarget = '11'
            }
        }

        tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
            kotlinOptions {
                jvmTarget = '11'
            }
        }
}
Same for shared dependencies (
VersionCatalog
is good alternative) Test configuration, etc…
n
Exactly, yes you can do that with a convention plugin