Files
kotlin-fork/libraries/stdlib/jre8/build.gradle
T
Alexander Udalov 10f2e9d33a Revert usages of -X arguments to old form in some places
We use the old compiler in Gradle build and in GradleFacetImportTest, so
some changes in f4b6db4 should not have been made yet
2017-04-17 11:33:58 +03:00

79 lines
1.6 KiB
Groovy

description = 'Kotlin Standard Library JRE 8 extension'
apply plugin: 'kotlin'
configureJvmProject(project)
configurePublishing(project)
dependencies {
compile project(':kotlin-stdlib')
compile project(':kotlin-stdlib-jre7')
testCompile project(':kotlin-test:kotlin-test-junit')
}
sourceSets {
main {
kotlin {
srcDir 'src'
}
}
test {
kotlin {
srcDir 'test'
if(!System.properties.'idea.active') {
srcDir '../test'
srcDir '../jre7/test'
}
}
}
}
jar {
manifestAttributes(manifest, project, 'Main')
}
artifacts {
archives sourcesJar
archives javadocJar
}
dist {
from (jar, sourcesJar)
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
kotlinOptions.jdkHome = JDK_18
kotlinOptions.jvmTarget = 1.8
}
compileKotlin {
kotlinOptions.freeCompilerArgs = [
"-Xallow-kotlin-package",
"-Xmultifile-parts-inherit",
"-Xdump-declarations-to", "${buildDir}/stdlib-jre8-declarations.json",
"-module-name", project.name
]
}
compileTestKotlin {
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
}
kotlin.experimental.coroutines 'enable'
test {
executable = "$JDK_18/bin/java"
}
task testJre6Tests(type: Test) {
dependsOn project(':kotlin-stdlib').tasks.testClasses
group = "verification"
executable = "$JDK_18/bin/java"
testClassesDir = project.file('../build/classes/test')
classpath = project.files('../build/classes/test') + sourceSets.test.compileClasspath
}
check.dependsOn testJre6Tests