From 52bec4e8709cee73cf2cf3657a804b19994d9066 Mon Sep 17 00:00:00 2001 From: Dan Fox Date: Tue, 12 Jul 2022 19:44:52 +0100 Subject: [PATCH] magic p-j-f incantation --- conjure-java-core/build.gradle | 2 +- .../palantir/conjure/java/types/ObjectGeneratorTests.java | 2 +- gradle.properties | 7 +++++++ versions.lock | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/conjure-java-core/build.gradle b/conjure-java-core/build.gradle index 3e579aab4..074c444ed 100644 --- a/conjure-java-core/build.gradle +++ b/conjure-java-core/build.gradle @@ -46,7 +46,7 @@ dependencies { api 'com.palantir.ri:resource-identifier' api 'com.palantir.syntactic-paths:syntactic-paths' api 'com.palantir.tokens:auth-tokens' - api 'com.github.liachmodded:javapoet' + api 'com.squareup:javapoet' api 'jakarta.annotation:jakarta.annotation-api' api 'jakarta.validation:jakarta.validation-api' api 'org.apache.commons:commons-lang3' diff --git a/conjure-java-core/src/test/java/com/palantir/conjure/java/types/ObjectGeneratorTests.java b/conjure-java-core/src/test/java/com/palantir/conjure/java/types/ObjectGeneratorTests.java index 914956d10..32e93fcb5 100644 --- a/conjure-java-core/src/test/java/com/palantir/conjure/java/types/ObjectGeneratorTests.java +++ b/conjure-java-core/src/test/java/com/palantir/conjure/java/types/ObjectGeneratorTests.java @@ -237,7 +237,7 @@ private void assertThatFilesAreTheSame(List files, String referenceFilesFo for (Path file : files) { Path relativized = tempDir.toPath().relativize(file); Path expectedFile = Paths.get(referenceFilesFolder, relativized.toString()); - if (true || Boolean.valueOf(System.getProperty("recreate", "false"))) { + if (Boolean.valueOf(System.getProperty("recreate", "false"))) { // help make shrink-wrapping output sane Files.createDirectories(expectedFile.getParent()); Files.deleteIfExists(expectedFile); diff --git a/gradle.properties b/gradle.properties index 7a0ad515d..fa6081706 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,10 @@ systemProp.org.gradle.internal.http.socketTimeout=600000 systemProp.org.gradle.internal.http.connectionTimeout=600000 org.gradle.parallel=true + +# Trying to make Java17 features work (https://github.com/palantir/palantir-java-format/issues/548) +org.gradle.jvmargs=--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ + --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ + --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \ + --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \ + --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \ No newline at end of file diff --git a/versions.lock b/versions.lock index 2b48317ca..1b766b019 100644 --- a/versions.lock +++ b/versions.lock @@ -12,7 +12,7 @@ com.fasterxml.jackson.datatype:jackson-datatype-joda:2.13.3 (2 constraints: 2b2b com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.3 (2 constraints: 2b2b94af) com.fasterxml.jackson.module:jackson-module-afterburner:2.13.3 (2 constraints: 472b27b6) com.github.ben-manes.caffeine:caffeine:3.1.1 (10 constraints: 39b0aad1) -com.github.liachmodded:javapoet:feature~record (2 constraints: 58187890) +com.github.liachmodded:javapoet:feature~record (2 constraints: f31559e3) com.google.auto:auto-common:1.2.1 (2 constraints: ec16041a) com.google.code.findbugs:jsr305:3.0.2 (20 constraints: a13e998f) com.google.errorprone:error_prone_annotations:2.7.1 (23 constraints: 6e7255d9)