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:
@@ -48,11 +48,6 @@ dependencies {
|
|||||||
testRuntime(project(":kotlin-reflect"))
|
testRuntime(project(":kotlin-reflect"))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named("compileTestKotlin") {
|
|
||||||
jvmTarget = "1.8"
|
|
||||||
javaHome = rootProject.extra["JDK_18"] as String
|
|
||||||
}
|
|
||||||
|
|
||||||
if (deployVersion != null) {
|
if (deployVersion != null) {
|
||||||
publish()
|
publish()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import org.junit.Assert.*
|
|||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.zip.ZipFile
|
import java.util.zip.ZipFile
|
||||||
import kotlin.text.Charsets.UTF_8
|
|
||||||
|
|
||||||
class JarContentTest {
|
class JarContentTest {
|
||||||
@Test
|
@Test
|
||||||
@@ -27,7 +26,7 @@ class JarContentTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun checkClassesHasNoSpecificStringConstants(jar: File) {
|
private fun checkClassesHasNoSpecificStringConstants(jar: File) {
|
||||||
val zipFile = ZipFile(jar, UTF_8)
|
val zipFile = ZipFile(jar)
|
||||||
for (entry in zipFile.entries()) {
|
for (entry in zipFile.entries()) {
|
||||||
if (!entry.name.endsWith(".class")) continue
|
if (!entry.name.endsWith(".class")) continue
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user