74 lines
1.4 KiB
Groovy
74 lines
1.4 KiB
Groovy
description = 'Kotlin Standard Library JRE 8 extension (deprecated)'
|
|
|
|
apply plugin: 'kotlin'
|
|
apply plugin: 'pill-configurable'
|
|
|
|
configureJvm6Project(project)
|
|
configureDist(project)
|
|
ext.javaHome = JDK_18
|
|
ext.jvmTarget = "1.8"
|
|
|
|
pill {
|
|
importAsLibrary = true
|
|
}
|
|
|
|
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'
|
|
}
|
|
}
|
|
}
|
|
|
|
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_18
|
|
kotlinOptions.jvmTarget = 1.8
|
|
}
|
|
|
|
compileKotlin {
|
|
kotlinOptions.freeCompilerArgs = [
|
|
"-Xallow-kotlin-package",
|
|
"-Xmultifile-parts-inherit",
|
|
"-Xnormalize-constructor-calls=enable",
|
|
"-module-name", project.name
|
|
]
|
|
}
|
|
|
|
compileTestKotlin {
|
|
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xnormalize-constructor-calls=enable", "-Xmulti-platform", "-Xuse-experimental=kotlin.ExperimentalUnsignedTypes"]
|
|
}
|
|
|
|
test {
|
|
executable = "$JDK_18/bin/java"
|
|
}
|