Refactor compiler-related published projects

- move preparation into separate projects
- rename projects for publishing
- add compiler plugins
This commit is contained in:
Ilya Chernikov
2017-09-11 13:03:35 +02:00
parent aa4fdaa713
commit e18b77af21
19 changed files with 229 additions and 343 deletions
+11 -9
View File
@@ -1,30 +1,32 @@
import org.gradle.jvm.tasks.Jar
description = "Kotlin AllOpen Compiler Plugin"
apply { plugin("kotlin") }
dependencies {
val compile by configurations
compile(ideaSdkCoreDeps("intellij-core"))
compile(project(":compiler:plugin-api"))
compile(project(":compiler:frontend"))
val compileOnly by configurations
val runtime by configurations
compileOnly(ideaSdkCoreDeps("intellij-core"))
compileOnly(project(":compiler:plugin-api"))
compileOnly(project(":compiler:frontend"))
runtime(project(":kotlin-compiler", configuration = "runtimeJar"))
runtime(project(":kotlin-stdlib"))
}
configureKotlinProjectSourcesDefault()
configureKotlinProjectNoTests()
val jar: Jar by tasks
jar.apply {
setupRuntimeJar("Kotlin AllOpen Compiler Plugin")
val jar = runtimeJar {
from(fileTree("$projectDir/src")) { include("META-INF/**") }
archiveName = "allopen-compiler-plugin.jar"
}
dist {
from(jar)
rename("^kotlin-", "")
}
ideaPlugin {
from(jar)
rename("^kotlin-", "")
}
+1 -1
View File
@@ -4,7 +4,7 @@ apply { plugin("kotlin") }
dependencies {
val compile by configurations
compile(project(":plugins:allopen-cli"))
compile(project(":kotlin-allopen-compiler-plugin"))
compile(project(":compiler:util"))
compile(project(":compiler:frontend"))
compile(project(":compiler:cli-common"))
+13 -11
View File
@@ -1,32 +1,34 @@
import org.gradle.jvm.tasks.Jar
description = "Kotlin NoArg Compiler Plugin"
apply { plugin("kotlin") }
dependencies {
val compile by configurations
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.java"))
compile(project(":compiler:backend"))
compile(project(":compiler:util"))
compile(project(":compiler:plugin-api"))
val compileOnly by configurations
val runtime by configurations
compileOnly(project(":compiler:frontend"))
compileOnly(project(":compiler:frontend.java"))
compileOnly(project(":compiler:backend"))
compileOnly(project(":compiler:util"))
compileOnly(project(":compiler:plugin-api"))
runtime(project(":kotlin-compiler", configuration = "runtimeJar"))
runtime(project(":kotlin-stdlib"))
}
configureKotlinProjectSourcesDefault()
configureKotlinProjectNoTests()
val jar: Jar by tasks
jar.apply {
setupRuntimeJar("Kotlin NoArg Compiler Plugin")
val jar = runtimeJar {
from(fileTree("$projectDir/src")) { include("META-INF/**") }
archiveName = "noarg-compiler-plugin.jar"
}
dist {
from(jar)
rename("^kotlin-", "")
}
ideaPlugin {
from(jar)
rename("^kotlin-", "")
}
+1 -1
View File
@@ -5,7 +5,7 @@ apply { plugin("kotlin") }
dependencies {
val compile by configurations
compile(project(":plugins:noarg-cli"))
compile(project(":kotlin-noarg-compiler-plugin"))
compile(project(":compiler:util"))
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.java"))
+3 -3
View File
@@ -14,12 +14,12 @@ dependencies {
testCompile(project(":plugins:android-extensions-compiler"))
testCompile(project(":plugins:android-extensions-idea"))
testCompile(project(":plugins:allopen-ide")) { isTransitive = false }
testCompile(project(":plugins:allopen-cli"))
testCompile(project(":kotlin-allopen-compiler-plugin"))
testCompile(project(":plugins:noarg-ide")) { isTransitive = false }
testCompile(project(":plugins:noarg-cli"))
testCompile(project(":kotlin-noarg-compiler-plugin"))
testCompile(project(":plugins:annotation-based-compiler-plugins-ide-support")) { isTransitive = false }
testCompile(project(":plugins:sam-with-receiver-ide")) { isTransitive = false }
testCompile(project(":plugins:sam-with-receiver-cli"))
testCompile(project(":kotlin-sam-with-receiver-compiler-plugin"))
testCompile(project(":idea:idea-android")) { isTransitive = false }
testCompile(project(":plugins:lint")) { isTransitive = false }
testCompile(project(":plugins:uast-kotlin"))
@@ -1,30 +1,36 @@
import org.gradle.jvm.tasks.Jar
description = "Kotlin SamWithReceiver Compiler Plugin"
apply { plugin("kotlin") }
dependencies {
val compile by configurations
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.java"))
compile(project(":compiler:plugin-api"))
val compileOnly by configurations
val runtime by configurations
compileOnly(project(":compiler:frontend"))
compileOnly(project(":compiler:frontend.java"))
compileOnly(project(":compiler:plugin-api"))
runtime(project(":kotlin-compiler", configuration = "runtimeJar"))
runtime(project(":kotlin-stdlib"))
}
configureKotlinProjectSourcesDefault()
configureKotlinProjectNoTests()
val jar: Jar by tasks
jar.apply {
setupRuntimeJar("Kotlin SamWithReceiver Compiler Plugin")
val jar = runtimeJar {
from(fileTree("$projectDir/src")) { include("META-INF/**") }
archiveName = "sam-with-receiver-compiler-plugin.jar"
}
sourcesJar()
javadocJar()
publish()
dist {
from(jar)
rename("^kotlin-", "")
}
ideaPlugin {
from(jar)
rename("^kotlin-", "")
}
@@ -4,7 +4,7 @@ apply { plugin("kotlin") }
dependencies {
val compile by configurations
compile(project(":plugins:sam-with-receiver-cli"))
compile(project(":kotlin-sam-with-receiver-compiler-plugin"))
compile(project(":plugins:annotation-based-compiler-plugins-ide-support"))
compile(project(":compiler:util"))
compile(project(":compiler:frontend"))
@@ -1,5 +1,5 @@
import org.gradle.jvm.tasks.Jar
description = "Kotlin SourceSections Compiler Plugin"
apply { plugin("kotlin") }
@@ -9,9 +9,12 @@ dependencies {
val testCompile by configurations
val testCompileOnly by configurations
val testRuntime by configurations
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.script"))
compile(project(":compiler:plugin-api"))
compileOnly(project(":compiler:frontend"))
compileOnly(project(":compiler:frontend.script"))
compileOnly(project(":compiler:plugin-api"))
testCompile(project(":compiler:frontend"))
testCompile(project(":compiler:frontend.script"))
testCompile(project(":compiler:plugin-api"))
testCompile(project(":compiler.tests-common"))
testCompile(commonDep("junit:junit"))
testCompile(project(":compiler:util"))
@@ -28,11 +31,11 @@ configureKotlinProjectResources("src") {
}
configureKotlinProjectTestsDefault()
val jar: Jar by tasks
jar.apply {
setupRuntimeJar("Kotlin SourceSections Compiler Plugin")
archiveName = "kotlin-source-sections-compiler-plugin.jar"
}
val jar = runtimeJar()
sourcesJar()
javadocJar()
publish()
dist {
from(jar)