Files
kotlin-fork/libraries/stdlib/jre7/build.gradle
T
Ilya Gorbunov c8becbd335 Stop distributing and publishing obsolete artifacts
Keep stdlib-jreN dist for tests only.

#KT-23799
2018-08-30 14:57:52 +03:00

95 lines
1.9 KiB
Groovy

description = 'Kotlin Standard Library JRE 7 extension (deprecated)'
apply plugin: 'kotlin'
apply plugin: 'pill-configurable'
configureJvm6Project(project)
configureDist(project)
ext.javaHome = JDK_17
pill {
importAsLibrary = true
}
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'
}
}
}
}
jar {
manifestAttributes(manifest, project, 'Main')
}
artifacts {
archives sourcesJar
archives javadocJar
}
task distForTest(type: Copy) {
rename "-${java.util.regex.Pattern.quote(version)}", ''
from jar
into distDir
}
dist {
dependsOn(distForTest)
}
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", "-XXLanguage:-ReleaseCoroutines", "-Xuse-experimental=kotlin.ExperimentalUnsignedTypes"]
}
kotlin.experimental.coroutines 'enable'
test {
executable = "$JDK_17/bin/java"
}
task testJre6Tests(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 testJre6Tests