* `install` task provided by `maven` plugin doesn't support configuration cache so replace `maven` plugin with `maven-publish` and use task that is subtype of PublishToMavenRepository. `maven-publish` partially support configuration cache, see https://github.com/gradle/gradle/issues/13468
* Apply `signing` plugin only if it really needed. The plugin doesn't support configuration cache. See https://github.com/gradle/gradle/issues/13470
Relates to #KT-44611
Make Project.configureFormInstrumentation and Task.useAndroidConfiguration extensions, :dependencies:android-sdk unzip tasks compatible with configuration cache
Relates to #KT-44611
This commit changes how generated sources are added to the Gradle JavaCompile
task. Previously, directory was added to sources which caused issues with
annotation processors that only generate Kotlin sources. I.e. JavaCompile task
was executed but no java sources existed.
Now, only generated Java sources are added to the JavaCompile task. This
means that if only Kotlin sources are generated JavaCompile task will be
skipped.
Fixes: KT-31127
Test: Kapt3IT.testKotlinProcessorUsingFiler
When plugins DSL is used, there is no need to
manually generate typesafe accessors for extensions and
conventions (by running `./gradlew kotlinDslAccessorsSnapshot`).