Paul Woitaschek
10/21/2018, 7:16 AMtapchicoma
10/21/2018, 9:06 AMtasks.withType(JavaCompile::class.java).filter { it.name.contains("debug", ignoreCase = true) }.all { ... }
Paul Woitaschek
10/21/2018, 9:11 AMtapchicoma
10/21/2018, 11:01 AMfun getPluginConfigureAction(): (Plugin<Any>) -> Unit = { _ ->
project.extensions.configure(BaseExtension::class.java) { ext ->
ext.buildTypes.filter { it.isDebuggable }.forEach {
it.javaCompileOptions.annotationProcessorOptions
.arguments["dagger.formatGeneratedSource"] = "disabled"
}
}
}
project.plugins.withId("com.android.application", getPluginConfigureAction())
project.plugins.withId("com.android.library", getPluginConfigureAction())
project.plugins.withId("com.android.instantapp", getPluginConfigureAction())
project.plugins.withId("com.android.feature", getPluginConfigureAction())
project.plugins.withId("com.android.test", getPluginConfigureAction())
Theoretically should work, but it needs to be tested. š¤·āāļøPaul Woitaschek
10/21/2018, 1:03 PM