ENT-1463, ENT-1903: Raise minimum JDK to 8u171 to fix ZIP compression bugs, (#3367)

* Update JarFilter unit tests to show any Gradle stacktraces.
* Raise minimum version of JDK8 to 8u171 - fixes ZIP compression bugs.
This commit is contained in:
Chris Rankin 2018-06-14 15:18:44 +01:00 committed by GitHub
parent 81730b0a14
commit 14dcce49ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View File

@ -84,8 +84,9 @@ buildscript {
ext.deterministic_rt_version = '1.0-SNAPSHOT' ext.deterministic_rt_version = '1.0-SNAPSHOT'
// Update 121 is required for ObjectInputFilter and at time of writing 131 was latest: // Update 121 is required for ObjectInputFilter.
ext.java8_minUpdateVersion = '131' // Updates [131, 161] also have zip compression bugs on MacOS (High Sierra).
ext.java8_minUpdateVersion = '171'
repositories { repositories {
mavenLocal() mavenLocal()

View File

@ -88,8 +88,7 @@ class DummyJar(
jar.write(arrayOfJunk(DATA_SIZE)) jar.write(arrayOfJunk(DATA_SIZE))
// One uncompressed text file // One uncompressed text file
val text = """ val text = """Jar: ${_path.toAbsolutePath()}
Jar: ${_path.toAbsolutePath()}
Class: ${testClass.name} Class: ${testClass.name}
""".toByteArray() """.toByteArray()
jar.putNextEntry(uncompressed("comment.txt", text)) jar.putNextEntry(uncompressed("comment.txt", text))

View File

@ -262,7 +262,7 @@ task jarFilter(type: JarFilterTask) {
testProjectDir.newFile("build.gradle").writeText(script) testProjectDir.newFile("build.gradle").writeText(script)
return GradleRunner.create() return GradleRunner.create()
.withProjectDir(testProjectDir.root) .withProjectDir(testProjectDir.root)
.withArguments(getBasicArgsForTasks("jarFilter", "--stacktrace")) .withArguments(getBasicArgsForTasks("jarFilter"))
.withPluginClasspath() .withPluginClasspath()
} }

View File

@ -69,7 +69,7 @@ task metafix(type: MetaFixerTask) {
testProjectDir.newFile("build.gradle").writeText(script) testProjectDir.newFile("build.gradle").writeText(script)
return GradleRunner.create() return GradleRunner.create()
.withProjectDir(testProjectDir.root) .withProjectDir(testProjectDir.root)
.withArguments(getBasicArgsForTasks("metafix", "--stacktrace")) .withArguments(getBasicArgsForTasks("metafix"))
.withPluginClasspath() .withPluginClasspath()
} }

View File

@ -29,7 +29,7 @@ private val testGradleUserHome: String get() = testGradleUserHomeValue
?: throw AssumptionViolatedException("System property 'test.gradle.user.home' not set.") ?: throw AssumptionViolatedException("System property 'test.gradle.user.home' not set.")
fun getGradleArgsForTasks(vararg taskNames: String): MutableList<String> = getBasicArgsForTasks(*taskNames).apply { add("--info") } fun getGradleArgsForTasks(vararg taskNames: String): MutableList<String> = getBasicArgsForTasks(*taskNames).apply { add("--info") }
fun getBasicArgsForTasks(vararg taskNames: String): MutableList<String> = mutableListOf(*taskNames, "-g", testGradleUserHome) fun getBasicArgsForTasks(vararg taskNames: String): MutableList<String> = mutableListOf(*taskNames, "--stacktrace", "-g", testGradleUserHome)
@Throws(IOException::class) @Throws(IOException::class)
fun copyResourceTo(resourceName: String, target: Path) { fun copyResourceTo(resourceName: String, target: Path) {