Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
crogoz committed May 2, 2024
1 parent 0d939b7 commit 8807780
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ buildscript {
repositories {
mavenCentral() { metadataSources { mavenPom(); ignoreGradleMetadataRedirection() } }
gradlePluginPortal() { metadataSources { mavenPom(); ignoreGradleMetadataRedirection() } }
mavenLocal()
}

dependencies {
Expand Down Expand Up @@ -40,7 +39,6 @@ allprojects {
repositories {
mavenCentral() { metadataSources { mavenPom(); ignoreGradleMetadataRedirection() } }
gradlePluginPortal() { metadataSources { mavenPom(); ignoreGradleMetadataRedirection() } }
mavenLocal()
}

group 'com.palantir.gradle.jdks'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class GradleJdkPatcherIntegrationTest extends IntegrationSpec {

when:
runTasksSuccessfully('wrapper').standardOutput
String output = runGradlewCommand(List.of("./gradlew", "javaToolchains", "compileJava", "--info"))
String output = runGradlewCommand(List.of("./gradlew", "javaToolchains", "compileJava", "--debug"))
File compiledClass = new File(projectDir, "build/classes/java/main/Main.class")

then:
Expand All @@ -183,7 +183,7 @@ class GradleJdkPatcherIntegrationTest extends IntegrationSpec {
output.contains(String.format("Compiling with toolchain '%s'", expectedJdk11.toFile().getCanonicalPath()))
Path expectedJdk17 = gradleJdksPath.resolve(getLocalFilename(JDK_17_VERSION).trim())
output.contains(String.format("Compiling with toolchain '%s'", expectedJdk17.toFile().getCanonicalPath()))
output.contains("--enable-preview")
Pattern.compile("Compiler arguments: -source 17 .* --enable-preview").matcher(output).find()
assertBytecodeVersion(compiledClass, JAVA_17_BYTECODE, ENABLE_PREVIEW_BYTECODE)

when:
Expand Down

0 comments on commit 8807780

Please sign in to comment.