[Build] Fix configuration cache issues with install task
* `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
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import org.jetbrains.kotlin.pill.PillExtension
|
||||
import plugins.configureKotlinPomAttributes
|
||||
|
||||
description = "Simple Annotation Processor for testing kapt"
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
maven // only used for installing to mavenLocal()
|
||||
`maven-publish` // only used for installing to mavenLocal()
|
||||
id("jps-compatible")
|
||||
}
|
||||
|
||||
@@ -13,9 +14,24 @@ pill {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(kotlinStdlib())
|
||||
implementation(kotlinStdlib())
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"test" {}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("main") {
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
mavenLocal() // to workaround configuration cache issues with 'publishToMavenLocal' task
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("install") {
|
||||
dependsOn(tasks.named("publishAllPublicationsToMavenLocalRepository"))
|
||||
}
|
||||
Reference in New Issue
Block a user