Build: Centralize compiler dist build logic in :kotlin-compiler project

This commit is contained in:
Vyacheslav Gerasimov
2019-06-19 19:02:40 +03:00
parent 62126d0e43
commit db3b01d2d4
52 changed files with 270 additions and 305 deletions
@@ -3,10 +3,8 @@ description = 'Kotlin Test Annotations Common'
apply plugin: 'kotlin-platform-common'
apply plugin: 'pill-configurable'
configureDist(project)
configurePublishing(project)
dependencies {
compile kotlinStdlib("common")
testCompile project(":kotlin-test:kotlin-test-common")
@@ -3,10 +3,8 @@ description = 'Kotlin Test Common'
apply plugin: 'kotlin-platform-common'
apply plugin: 'pill-configurable'
configureDist(project)
configurePublishing(project)
dependencies {
compile kotlinStdlib("common")
testCompile project(":kotlin-test:kotlin-test-annotations-common")
-8
View File
@@ -68,11 +68,3 @@ artifacts {
if (project.findProperty("kotlin.stdlib.js.ir.publish")?.toBoolean() == true) {
configurePublishing(project)
}
if (project.findProperty("kotlin.stdlib.js.ir.dist")?.toBoolean() == true) {
configureDist(project)
dist {
from(jar, sourcesJar)
}
}
+9 -12
View File
@@ -2,9 +2,13 @@ description = 'Kotlin Test for JS'
apply plugin: 'kotlin-platform-js'
configureDist(project)
configurePublishing(project)
configurations {
sources
distJs
}
dependencies {
expectedBy project(':kotlin-test:kotlin-test-common')
expectedBy project(':kotlin-test:kotlin-test-annotations-common')
@@ -44,17 +48,10 @@ task sourcesJar(type: Jar, dependsOn: classes) {
artifacts {
archives sourcesJar
sources sourcesJar
distJs(file(compileKotlin2Js.kotlinOptions.outputFile)) {
builtBy(compileKotlin2Js)
}
}
javadocJar()
task distJs(type: Copy) {
dependsOn(compileKotlin2Js)
from(compileKotlin2Js.kotlinOptions.outputFile)
into "$distDir/js"
}
dist {
dependsOn distJs
from (jar, sourcesJar)
}
+1 -5
View File
@@ -4,7 +4,6 @@ apply plugin: 'kotlin-platform-jvm'
apply plugin: 'pill-configurable'
configureJvm6Project(project)
configureDist(project)
configurePublishing(project)
pill {
@@ -24,14 +23,11 @@ jar {
artifacts {
archives sourcesJar
sources sourcesJar
}
javadocJar()
dist {
from (jar, sourcesJar)
}
compileKotlin {
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-module-name", project.name]
}
+1 -5
View File
@@ -3,7 +3,6 @@ description = 'Kotlin Test JUnit 5'
apply plugin: 'kotlin-platform-jvm'
configureJvm6Project(project)
configureDist(project)
configurePublishing(project)
ext.javaHome = JDK_18
ext.jvmTarget = "1.8"
@@ -24,14 +23,11 @@ jar {
artifacts {
archives sourcesJar
sources sourcesJar
}
javadocJar()
dist {
from (jar, sourcesJar)
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
kotlinOptions.jdkHome = JDK_18
kotlinOptions.jvmTarget = 1.8
+1 -5
View File
@@ -4,7 +4,6 @@ apply plugin: 'kotlin-platform-jvm'
apply plugin: 'pill-configurable'
configureJvm6Project(project)
configureDist(project)
configurePublishing(project)
pill {
@@ -47,15 +46,12 @@ task modularJar(type: Jar) {
artifacts {
archives sourcesJar
sources sourcesJar
archives modularJar
}
javadocJar()
dist {
from (jar, sourcesJar)
}
compileKotlin {
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xnormalize-constructor-calls=enable",
"-Xuse-experimental=kotlin.contracts.ExperimentalContracts",
+1 -7
View File
@@ -3,32 +3,26 @@ description = 'Kotlin Test TestNG'
apply plugin: 'kotlin-platform-jvm'
configureJvm6Project(project)
configureDist(project)
configurePublishing(project)
ext.javaHome = JDK_17
dependencies {
expectedBy project(':kotlin-test:kotlin-test-annotations-common')
compile project(':kotlin-test:kotlin-test-jvm')
compile('org.testng:testng:6.13.1')
}
jar {
manifestAttributes(manifest, project, 'Test')
}
artifacts {
archives sourcesJar
sources sourcesJar
}
javadocJar()
dist {
from (jar, sourcesJar)
}
compileKotlin {
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-module-name", project.name]
}