ursus
10/09/2019, 5:17 AMallprojects {
..
afterEvaluate {
// Apply lintOptions to every android module
def android = it.extensions.findByName("android")
if (android != null) {
android.lintOptions {
lintConfig rootProject.file("lint.xml")
}
}
}
..
}
is there obviously something wrong with it? thankstapchicoma
10/09/2019, 7:46 AMafterEvaluate
🙂allprojects { subProject ->
def lintConfigureAction = {
subProject.extenstions.configure(BaseExtension.class) { ext ->
ext.lintOptions { ... }
}
subProject.plugins.withId("com.android.application", lintConfigureAction)
subProject.plugins.withId("com.android.library, lintConfigureAction)
}
ursus
10/09/2019, 5:07 PMCould not get unknown property 'BaseExtension' for root project '...' of type org.gradle.api.Project.
tapchicoma
10/09/2019, 5:09 PMcom.android.build.gradle.BaseExtension
ursus
10/09/2019, 5:10 PMExtension of type 'BaseExtension' does not exist. Currently registered extension types: [ExtraPropertiesExtension, KtlintExtension]
tapchicoma
10/09/2019, 6:07 PMPaul Woitaschek
10/12/2019, 8:48 AMtapchicoma
10/12/2019, 9:11 AMconfigure
has Action<Class>
as a second parameter. Maybe there is something in kotlin-dsl to solve it