d9656a939b
It's no longer needed for checking binary compatibility. Clean build of these libraries is no longer required too. Cleanup build.gradle of binary-compatibility-validator.
95 lines
1.9 KiB
Groovy
95 lines
1.9 KiB
Groovy
description = 'Kotlin Standard Library JDK 7 extension'
|
|
|
|
apply plugin: 'kotlin'
|
|
|
|
configureJvm6Project(project)
|
|
configureDist(project)
|
|
configurePublishing(project)
|
|
ext.javaHome = JDK_17
|
|
|
|
dependencies {
|
|
compile project(':kotlin-stdlib')
|
|
testCompile project(':kotlin-test:kotlin-test-junit')
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
kotlin {
|
|
srcDir 'src'
|
|
}
|
|
}
|
|
test {
|
|
kotlin {
|
|
srcDir 'test'
|
|
if(!System.properties.'idea.active') {
|
|
srcDir '../jvm/test'
|
|
srcDir '../common/test'
|
|
srcDir '../test'
|
|
}
|
|
}
|
|
}
|
|
java9 {
|
|
java {
|
|
srcDir 'java9'
|
|
}
|
|
}
|
|
}
|
|
|
|
jar {
|
|
manifestAttributes(manifest, project, 'Main', true)
|
|
// TODO: enable as soon as this doesn't cause D8/DX to crash
|
|
// from sourceSets.java9.output
|
|
}
|
|
|
|
artifacts {
|
|
archives sourcesJar
|
|
archives javadocJar
|
|
}
|
|
|
|
dist {
|
|
from (jar, sourcesJar)
|
|
}
|
|
|
|
|
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
|
|
kotlinOptions.jdkHome = JDK_17
|
|
}
|
|
|
|
compileKotlin {
|
|
kotlinOptions.freeCompilerArgs = [
|
|
"-Xallow-kotlin-package",
|
|
"-Xmultifile-parts-inherit",
|
|
"-Xnormalize-constructor-calls=enable",
|
|
"-module-name", project.name
|
|
]
|
|
}
|
|
|
|
compileTestKotlin {
|
|
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xmulti-platform"]
|
|
}
|
|
|
|
compileJava9Sources(project, 'kotlin.stdlib.jdk7')
|
|
|
|
kotlin.experimental.coroutines 'enable'
|
|
|
|
test {
|
|
executable = "$JDK_17/bin/java"
|
|
}
|
|
|
|
task testJdk6Tests(type: Test) {
|
|
dependsOn(':kotlin-stdlib:testClasses')
|
|
group = "verification"
|
|
|
|
executable = "$JDK_17/bin/java"
|
|
|
|
doFirst {
|
|
testClassesDirs = project(':kotlin-stdlib').sourceSets.test.output
|
|
classpath = files(
|
|
testClassesDirs,
|
|
configurations.testCompile
|
|
)
|
|
}
|
|
}
|
|
|
|
check.dependsOn testJdk6Tests
|