Make Throwable.addSuppressed extension work without kotlin-stdlib-jdk7*
*given that it runs on JDK7 and higher. The addSuppressed member is called with reflection when it's available. kotlin-stdlib-jdk7 extension still overrides that and calls addSuppressed member statically as before. #KT-30560 Fixed
This commit is contained in:
@@ -12,11 +12,6 @@ pill {
|
||||
importAsLibrary = true
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':kotlin-stdlib')
|
||||
testCompile project(':kotlin-test:kotlin-test-junit')
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
kotlin {
|
||||
@@ -33,6 +28,11 @@ sourceSets {
|
||||
}
|
||||
}
|
||||
}
|
||||
noJdk7Test {
|
||||
kotlin {
|
||||
srcDir 'testNoJdk7'
|
||||
}
|
||||
}
|
||||
java9 {
|
||||
java {
|
||||
srcDir 'java9'
|
||||
@@ -40,6 +40,15 @@ sourceSets {
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
noJdk7TestCompile.extendsFrom(testCompile)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':kotlin-stdlib')
|
||||
testCompile project(':kotlin-test:kotlin-test-junit')
|
||||
}
|
||||
|
||||
jar {
|
||||
manifestAttributes(manifest, project, 'Main' /*true*/)
|
||||
// TODO: enable as soon as this doesn't cause D8/DX to crash
|
||||
@@ -106,4 +115,15 @@ task testJdk6Tests(type: Test) {
|
||||
}
|
||||
}
|
||||
|
||||
check.dependsOn testJdk6Tests
|
||||
task testNoJdk7(type: Test, dependsOn: noJdk7TestClasses) {
|
||||
group = "verification"
|
||||
|
||||
executable = "$JDK_17/bin/java"
|
||||
|
||||
testClassesDirs = sourceSets.noJdk7Test.output.classesDirs
|
||||
classpath = sourceSets.noJdk7Test.runtimeClasspath
|
||||
}
|
||||
|
||||
|
||||
check.dependsOn testJdk6Tests, testNoJdk7
|
||||
|
||||
|
||||
Reference in New Issue
Block a user