Remove dependency of JarContentTest on JDK 8

It turns out that `jvmTarget` and `javaHome` settings in
build.gradle.kts were changing the module settings and affected the
compilation of kotlinx-metadata-jvm sources. The correct way to use JDK
8 in tests would be to change JVM target / JDK home of the specific
KotlinCompile task via its `kotlinOptions`, but JarContentTest doesn't
need JDK 8 anyway at this moment, so simplify that instead.
This commit is contained in:
Alexander Udalov
2020-03-05 14:13:03 +01:00
parent d1a29df581
commit 505ec072bb
2 changed files with 1 additions and 7 deletions
@@ -48,11 +48,6 @@ dependencies {
testRuntime(project(":kotlin-reflect"))
}
tasks.named("compileTestKotlin") {
jvmTarget = "1.8"
javaHome = rootProject.extra["JDK_18"] as String
}
if (deployVersion != null) {
publish()
}
@@ -16,7 +16,6 @@ import org.junit.Assert.*
import org.junit.Test
import java.io.File
import java.util.zip.ZipFile
import kotlin.text.Charsets.UTF_8
class JarContentTest {
@Test
@@ -27,7 +26,7 @@ class JarContentTest {
}
private fun checkClassesHasNoSpecificStringConstants(jar: File) {
val zipFile = ZipFile(jar, UTF_8)
val zipFile = ZipFile(jar)
for (entry in zipFile.entries()) {
if (!entry.name.endsWith(".class")) continue