0925e1b497
Changes in Gradle integration tests are needed because: - in new-mpp-android, kotlin-stdlib-jdk8 is used, and JVM IR generates JDK 8-specific bytecode (invokedynamic). D8 needs to be configured to desugar it with source/target versions set to 1.8, otherwise it reports an error. - in AndroidExtensionsManyVariants and AndroidIcepickProject, D8 fails with assertions enabled if AGP < 4.0.0 is used because of https://issuetracker.google.com/issues/148661132. The tests which use old AGP versions are probably not relevant anymore anyway. Changes in kotlin-stdlib-runtime-merged.txt are caused by a slightly different generation scheme of collection subclasses in JVM IR, and are harmless. (Previous attempt was at 15e978dbd311c2ba78ec32b394c21acde9811ccb.)
103 lines
2.5 KiB
Groovy
103 lines
2.5 KiB
Groovy
description = 'Kotlin Standard Library JDK 8 extension'
|
|
|
|
apply plugin: 'kotlin'
|
|
|
|
configurePublishing(project)
|
|
configureSourcesJar()
|
|
configureJavadocJar()
|
|
|
|
dependencies {
|
|
compile project(':kotlin-stdlib')
|
|
compile project(':kotlin-stdlib-jdk7')
|
|
testCompile project(':kotlin-test:kotlin-test-junit')
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
kotlin {
|
|
srcDir 'src'
|
|
}
|
|
}
|
|
test {
|
|
kotlin {
|
|
srcDir 'test'
|
|
if(!BuildPropertiesKt.getKotlinBuildProperties(project).inIdeaSync) {
|
|
srcDir '../jvm/test'
|
|
srcDir '../common/test'
|
|
srcDir '../test'
|
|
srcDir '../jdk7/test'
|
|
}
|
|
}
|
|
}
|
|
java9 {
|
|
java {
|
|
srcDir 'java9'
|
|
}
|
|
}
|
|
}
|
|
|
|
jar {
|
|
manifestAttributes(manifest, project, 'Main', true)
|
|
from sourceSets.java9.output
|
|
}
|
|
|
|
configureModularJar {
|
|
dependsOn(jar)
|
|
manifestAttributes(manifest, project, 'Main', true)
|
|
|
|
from zipTree(jar.outputs.files.singleFile)
|
|
}
|
|
|
|
artifacts {
|
|
archives sourcesJar
|
|
sources sourcesJar
|
|
|
|
archives modularJar
|
|
}
|
|
|
|
compileKotlin {
|
|
kotlinOptions.freeCompilerArgs = [
|
|
"-Xallow-kotlin-package",
|
|
"-Xmultifile-parts-inherit",
|
|
]
|
|
kotlinOptions.moduleName = project.name
|
|
}
|
|
|
|
compileTestKotlin {
|
|
kotlinOptions.freeCompilerArgs = [
|
|
"-Xallow-kotlin-package",
|
|
"-Xmulti-platform",
|
|
"-Xopt-in=kotlin.RequiresOptIn",
|
|
"-Xopt-in=kotlin.ExperimentalUnsignedTypes",
|
|
"-Xopt-in=kotlin.ExperimentalStdlibApi",
|
|
"-Xopt-in=kotlin.io.path.ExperimentalPathApi",
|
|
"-Xcommon-sources=${fileTree('../test').join(',')}",
|
|
]
|
|
}
|
|
|
|
LibrariesCommon.configureJava9Compilation(project, 'kotlin.stdlib.jdk8')
|
|
|
|
task testJdk6Tests(type: Test) { thisTask ->
|
|
dependsOn(':kotlin-stdlib:testClasses')
|
|
check.dependsOn(thisTask)
|
|
group = "verification"
|
|
|
|
doFirst {
|
|
testClassesDirs = project(':kotlin-stdlib').sourceSets.test.output
|
|
classpath = files(
|
|
testClassesDirs,
|
|
sourceSets.test.compileClasspath
|
|
)
|
|
}
|
|
}
|
|
|
|
[JdkMajorVersion.JDK_9, JdkMajorVersion.JDK_10, JdkMajorVersion.JDK_11].forEach { jvmVersion ->
|
|
tasks.register("jdk${jvmVersion.majorVersion}Test", Test) { thisTask ->
|
|
check.dependsOn(thisTask)
|
|
group = "verification"
|
|
thisTask.javaLauncher.set(
|
|
JvmToolchain.getToolchainLauncherFor(project, jvmVersion)
|
|
)
|
|
}
|
|
}
|