Tune build options for kotlin-test, kotlin-runtime, kotlin-stdlib, kotlin-stdlib-jre7/8

This commit is contained in:
Ilya Gorbunov
2017-01-19 05:15:53 +03:00
parent c5aa5ef571
commit 5755210498
7 changed files with 108 additions and 122 deletions
+31 -37
View File
@@ -1,58 +1,52 @@
description = 'Kotlin stdlib'
description = 'Kotlin Standard Library'
dependencies {
compile project(':kotlin-runtime')
compile project(':kotlin-test-parent:kotlin-test')
compile('junit:junit:4.12')
testCompile project(':kotlin-test-parent:kotlin-test-junit')
compile project(':kotlin-runtime')
testCompile project(':kotlin-test-parent:kotlin-test-junit')
}
sourceSets {
main {
kotlin {
srcDir 'src'
main {
java {
srcDir 'src'
}
}
java {
srcDir 'src'
test {
kotlin {
srcDir 'test'
}
}
}
test {
kotlin {
srcDir 'test'
}
}
}
jar {
manifest {
attributes 'Kotlin-Runtime-Component': 'Core',
manifest {
attributes \
'Kotlin-Runtime-Component': 'Core',
'Kotlin-Version': "$kotlin_language_version",
'Implementation-Title': "${project.description ?: project.name}"
}
}
}
artifacts {
archives sourcesJar
archives javadocJar
archives sourcesJar
archives javadocJar
}
compileJava {
sourceCompatibility = 1.6
targetCompatibility = 1.6
}
compileTestJava {
sourceCompatibility = 1.6
targetCompatibility = 1.6
sourceCompatibility = 1.6
targetCompatibility = 1.6
options.fork = true
options.forkOptions.executable = "${JDK_16}/bin/javac"
}
compileKotlin {
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package",
"-Xmultifile-parts-inherit",
"-Xdump-declarations-to", "${buildDir}/stdlib-declarations.json".toString(),
"-module-name", "${project.name}".toString()]
}
compileTestKotlin {
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
kotlinOptions {
jdkHome = JDK_16
freeCompilerArgs = [
"-Xallow-kotlin-package",
"-Xmultifile-parts-inherit",
"-Xdump-declarations-to", "${buildDir}/stdlib-declarations.json".toString(),
"-module-name", "${project.name}".toString()
]
}
}
+28 -35
View File
@@ -1,56 +1,49 @@
description = 'Kotlin stdlib JRE 7'
description = 'Kotlin Standard Library JRE 7 extension'
dependencies {
compile project(':kotlin-stdlib')
testCompile project(':kotlin-test-parent:kotlin-test-junit')
compile project(':kotlin-stdlib')
testCompile project(':kotlin-test-parent:kotlin-test-junit')
}
sourceSets {
main {
kotlin {
srcDir 'src'
main {
kotlin {
srcDir 'src'
}
}
}
test {
kotlin {
srcDir 'test'
srcDir '../test'
test {
kotlin {
srcDir 'test'
srcDir '../test'
}
}
}
}
jar {
manifest {
attributes 'Kotlin-Runtime-Component': 'Core',
manifest {
attributes \
'Kotlin-Runtime-Component': 'Core',
'Kotlin-Version': "$kotlin_language_version",
'Implementation-Title': "${project.description ?: project.name}"
}
}
}
artifacts {
archives sourcesJar
archives javadocJar
}
compileJava {
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
compileTestJava {
sourceCompatibility = 1.7
targetCompatibility = 1.7
archives sourcesJar
archives javadocJar
}
compileKotlin {
kotlinOptions.jdkHome = System.getenv('JDK_17')
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package",
"-Xmultifile-parts-inherit",
"-Xdump-declarations-to", "${buildDir}/stdlib-declarations.json".toString(),
"-module-name", "${project.name}".toString()]
kotlinOptions.jdkHome = JDK_17
kotlinOptions.freeCompilerArgs = [
"-Xallow-kotlin-package",
"-Xmultifile-parts-inherit",
"-Xdump-declarations-to", "${buildDir}/stdlib-jre7-declarations.json",
"-module-name", project.name
]
}
compileTestKotlin {
kotlinOptions.jdkHome = System.getenv('JDK_17')
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
kotlinOptions.jdkHome = JDK_17
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
}
+32 -40
View File
@@ -1,61 +1,53 @@
description = 'Kotlin stdlib JRE 8'
description = 'Kotlin Standard Library JRE 8 extension'
dependencies {
compile project(':kotlin-stdlib')
compile project(':kotlin-stdlib-jre7')
testCompile project(':kotlin-test-parent:kotlin-test-junit')
testCompile project(':kotlin-stdlib-jre7')
compile project(':kotlin-stdlib')
compile project(':kotlin-stdlib-jre7')
testCompile project(':kotlin-test-parent:kotlin-test-junit')
}
sourceSets {
main {
kotlin {
srcDir 'src'
main {
kotlin {
srcDir 'src'
}
}
}
test {
kotlin {
srcDir 'test'
srcDir '../test'
srcDir '../jre7/test'
test {
kotlin {
srcDir 'test'
srcDir '../test'
srcDir '../jre7/test'
}
}
}
}
jar {
manifest {
attributes 'Kotlin-Runtime-Component': 'Core',
manifest {
attributes \
'Kotlin-Runtime-Component': 'Core',
'Kotlin-Version': "$kotlin_language_version",
'Implementation-Title': "${project.description ?: project.name}"
}
}
}
artifacts {
archives sourcesJar
archives javadocJar
}
compileJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
compileTestJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
archives sourcesJar
archives javadocJar
}
compileKotlin {
kotlinOptions.jdkHome = System.getenv('JDK_18')
kotlinOptions.jvmTarget = 1.8
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package",
"-Xmultifile-parts-inherit",
"-Xdump-declarations-to", "${buildDir}/stdlib-declarations.json".toString(),
"-module-name", "${project.name}".toString()]
kotlinOptions.jdkHome = JDK_18
kotlinOptions.jvmTarget = 1.8
kotlinOptions.freeCompilerArgs = [
"-Xallow-kotlin-package",
"-Xmultifile-parts-inherit",
"-Xdump-declarations-to", "${buildDir}/stdlib-jre8-declarations.json",
"-module-name", project.name
]
}
compileTestKotlin {
kotlinOptions.jdkHome = System.getenv('JDK_18')
kotlinOptions.jvmTarget = 1.8
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
kotlinOptions.jdkHome = JDK_18
kotlinOptions.jvmTarget = 1.8
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
}