7789054547
^KT-46972 Fixed
71 lines
1.7 KiB
Groovy
71 lines
1.7 KiB
Groovy
description = 'Kotlin Common Standard Library'
|
|
|
|
apply plugin: 'kotlin-platform-common'
|
|
|
|
configurePublishing(project)
|
|
|
|
JvmToolchain.updateJvmTarget(project, "1.6")
|
|
|
|
def commonSrcDir = "../src"
|
|
def commonTestSrcDir = "../test"
|
|
|
|
sourceSets {
|
|
main {
|
|
kotlin {
|
|
srcDir 'src'
|
|
srcDir commonSrcDir
|
|
srcDir '../unsigned/src'
|
|
}
|
|
}
|
|
test {
|
|
kotlin {
|
|
srcDir commonTestSrcDir
|
|
srcDir 'test'
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
testCompile project(":kotlin-test:kotlin-test-common")
|
|
testCompile project(":kotlin-test:kotlin-test-annotations-common")
|
|
}
|
|
|
|
compileKotlinCommon {
|
|
dependsOn(":prepare:build.version:writeStdlibVersion")
|
|
// dependsOn ":prepare:compiler:prepare-compiler-with-bootstrap-runtime"
|
|
// compilerJarFile = compilerJarWithBootstrapRuntime
|
|
}
|
|
|
|
compileKotlinCommon {
|
|
kotlinOptions {
|
|
freeCompilerArgs = [
|
|
"-module-name", project.name,
|
|
"-Xopt-in=kotlin.RequiresOptIn",
|
|
"-Xopt-in=kotlin.ExperimentalMultiplatform",
|
|
"-Xopt-in=kotlin.contracts.ExperimentalContracts",
|
|
"-Xinline-classes",
|
|
"-Xallow-kotlin-package",
|
|
"-Xallow-result-return-type"
|
|
]
|
|
}
|
|
}
|
|
|
|
compileTestKotlinCommon {
|
|
kotlinOptions {
|
|
freeCompilerArgs += [
|
|
"-Xopt-in=kotlin.RequiresOptIn",
|
|
"-Xopt-in=kotlin.ExperimentalUnsignedTypes",
|
|
"-Xopt-in=kotlin.ExperimentalStdlibApi",
|
|
]
|
|
}
|
|
}
|
|
|
|
jar {
|
|
manifestAttributes(manifest, project, 'Main')
|
|
}
|
|
|
|
configureSourcesJar()
|
|
configureJavadocJar()
|
|
|
|
classes.setDependsOn(classes.dependsOn.findAll { it != "compileJava" })
|