Put IDE plugin dependency artifact building/publishing under a flag
This commit is contained in:
@@ -753,6 +753,7 @@ tasks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
register("publishIdeArtifacts") {
|
register("publishIdeArtifacts") {
|
||||||
|
idePluginDependency {
|
||||||
dependsOn(
|
dependsOn(
|
||||||
":prepare:ide-artifacts:android-extensions-compiler-plugin-for-ide:publish",
|
":prepare:ide-artifacts:android-extensions-compiler-plugin-for-ide:publish",
|
||||||
":prepare:ide-artifacts:allopen-compiler-plugin-for-ide:publish",
|
":prepare:ide-artifacts:allopen-compiler-plugin-for-ide:publish",
|
||||||
@@ -780,6 +781,7 @@ tasks {
|
|||||||
":kotlin-reflect:publish"
|
":kotlin-reflect:publish"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
register("test") {
|
register("test") {
|
||||||
doLast {
|
doLast {
|
||||||
|
|||||||
@@ -157,6 +157,13 @@ fun Project.publish(body: Upload.() -> Unit = {}): Upload {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun Project.idePluginDependency(block: () -> Unit) {
|
||||||
|
val shouldActivate = rootProject.findProperty("publish.ide.plugin.dependencies")?.toString()?.toBoolean() == true
|
||||||
|
if (shouldActivate) {
|
||||||
|
block()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun Project.publishProjectJars(projects: List<String>, libraryDependencies: List<String> = emptyList()) {
|
fun Project.publishProjectJars(projects: List<String>, libraryDependencies: List<String> = emptyList()) {
|
||||||
apply<JavaPlugin>()
|
apply<JavaPlugin>()
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
|
idePluginDependency {
|
||||||
publishProjectJars(listOf(":kotlin-allopen-compiler-plugin"))
|
publishProjectJars(listOf(":kotlin-allopen-compiler-plugin"))
|
||||||
|
}
|
||||||
@@ -1 +1,3 @@
|
|||||||
|
idePluginDependency {
|
||||||
publishTestJar(":compiler:incremental-compilation-impl")
|
publishTestJar(":compiler:incremental-compilation-impl")
|
||||||
|
}
|
||||||
@@ -1 +1,3 @@
|
|||||||
|
idePluginDependency {
|
||||||
publishProjectJars(listOf(":plugins:android-extensions-compiler"))
|
publishProjectJars(listOf(":plugins:android-extensions-compiler"))
|
||||||
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
|
idePluginDependency {
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
val compilerComponentProjects = project(":kotlin-jps-plugin").extra["compilerComponents"] as List<String>
|
val compilerComponentProjects = project(":kotlin-jps-plugin").extra["compilerComponents"] as List<String>
|
||||||
|
|
||||||
val otherProjects = listOf(":kotlin-daemon-client")
|
val otherProjects = listOf(":kotlin-daemon-client")
|
||||||
|
|
||||||
publishProjectJars(compilerComponentProjects + otherProjects)
|
publishProjectJars(compilerComponentProjects + otherProjects)
|
||||||
|
}
|
||||||
@@ -1 +1,3 @@
|
|||||||
|
idePluginDependency {
|
||||||
publishTestJar(":compiler:incremental-compilation-impl")
|
publishTestJar(":compiler:incremental-compilation-impl")
|
||||||
|
}
|
||||||
@@ -1 +1,3 @@
|
|||||||
|
idePluginDependency {
|
||||||
publishTestJar(":kotlin-build-common")
|
publishTestJar(":kotlin-build-common")
|
||||||
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
idePluginDependency {
|
||||||
val compilerModules: Array<String> by rootProject.extra
|
val compilerModules: Array<String> by rootProject.extra
|
||||||
|
|
||||||
val excludedCompilerModules = listOf(
|
val excludedCompilerModules = listOf(
|
||||||
@@ -25,3 +26,4 @@ publishProjectJars(
|
|||||||
projects = projects,
|
projects = projects,
|
||||||
libraryDependencies = listOf(protobufFull())
|
libraryDependencies = listOf(protobufFull())
|
||||||
)
|
)
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ plugins {
|
|||||||
java
|
java
|
||||||
}
|
}
|
||||||
|
|
||||||
|
idePluginDependency {
|
||||||
publish()
|
publish()
|
||||||
|
|
||||||
val jar: Jar by tasks
|
val jar: Jar by tasks
|
||||||
@@ -16,3 +17,4 @@ jar.apply {
|
|||||||
|
|
||||||
sourcesJar()
|
sourcesJar()
|
||||||
javadocJar()
|
javadocJar()
|
||||||
|
}
|
||||||
@@ -1 +1,3 @@
|
|||||||
|
idePluginDependency {
|
||||||
publishProjectJars(listOf(":kotlin-gradle-statistics"))
|
publishProjectJars(listOf(":kotlin-gradle-statistics"))
|
||||||
|
}
|
||||||
@@ -1 +1,3 @@
|
|||||||
|
idePluginDependency {
|
||||||
publishProjectJars(listOf(":kotlinx-serialization-compiler-plugin"))
|
publishProjectJars(listOf(":kotlinx-serialization-compiler-plugin"))
|
||||||
|
}
|
||||||
@@ -1 +1,3 @@
|
|||||||
|
idePluginDependency {
|
||||||
publishProjectJars(listOf(":kotlin-noarg-compiler-plugin"))
|
publishProjectJars(listOf(":kotlin-noarg-compiler-plugin"))
|
||||||
|
}
|
||||||
@@ -1 +1,3 @@
|
|||||||
|
idePluginDependency {
|
||||||
publishProjectJars(listOf(":kotlin-sam-with-receiver-compiler-plugin"))
|
publishProjectJars(listOf(":kotlin-sam-with-receiver-compiler-plugin"))
|
||||||
|
}
|
||||||
@@ -1 +1,3 @@
|
|||||||
|
idePluginDependency {
|
||||||
publishTestJar(":compiler:tests-common")
|
publishTestJar(":compiler:tests-common")
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user