-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build with jdk 19 and Gradle 7.6 #4466
Conversation
ideally if this passes then we can get rid of jdk 16 in the build |
Codecov ReportBase: 74.08% // Head: 74.04% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #4466 +/- ##
============================================
- Coverage 74.08% 74.04% -0.04%
+ Complexity 18185 18165 -20
============================================
Files 1537 1536 -1
Lines 67469 67379 -90
Branches 8537 8520 -17
============================================
- Hits 49987 49894 -93
+ Misses 13419 13416 -3
- Partials 4063 4069 +6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Gradle 7.6 has been released. https://docs.gradle.org/7.6/release-notes.html |
- Proguard 7.2.2 -> 7.3.0 - Gradle 7.5.1 -> 7.6
- Set the default buildJdkVersion to the current Java version - Set "java.security.manager" to "allow" - Fix Javadoc errors
I forget to set 1.21.0 milestone for this PR. PTAL. 🙇♂️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build-${{ matrix.java }}-${{ runner.os }}-${{ secrets.CACHE_VERSION }}- | ||
build-${{ matrix.java }}-${{ runner.os }}- | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it works now? 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found that the cache occasionally works with the old configuration.
Anyway, it does not affect our self-hosted machines that cache by default in the local storage. Let me keep gradle-build-action
configuration and check the caching result for multiple builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build.gradle
Outdated
@@ -70,6 +70,13 @@ allprojects { | |||
jvmArgs '-XX:+HeapDumpOnOutOfMemoryError' | |||
jvmArgs "-XX:HeapDumpPath=${rootProject.buildDir}" | |||
|
|||
// The default value of the java.security.manager system property is changed to disallow in Java 18. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also add why we also need this in 17.
project.dependencies.add(shadedTestRuntime.name, dep) | ||
// Do not use `project.dependencies.add(name, dep)` that discards the classifier of | ||
// a dependency. See https://github.com/gradle/gradle/issues/23096 | ||
project.configurations.getByName(shadedTestRuntime.name).dependencies.add(dep) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also send a PR to line/gradle-scripts. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some minor nits but looks good! Thanks @ikhoon ! 🙇 👍 🚀
// - https://openjdk.org/jeps/411 | ||
// - https://bugs.openjdk.org/browse/JDK-8270380 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL 🙇
core/src/main/java/com/linecorp/armeria/client/RequestPreparationSetters.java
Outdated
Show resolved
Hide resolved
@@ -1,11 +1,13 @@ | |||
def buildJdkVersion = 17 | |||
def buildJdkVersion = Integer.parseInt(JavaVersion.current().getMajorVersion()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: I believe this is a slight change in behavior since the jvm version which gradle is run with will be used by default instead of 17.
I agree with this change though, since I dislike having the most recent jdk version fragmented across multiple files 🙇 Just wanted to note this change 👍
- Kotlin does not support Java 19 as the target bytecode. As the default version follows the current Java version, a specific target is necessary for release. - Add a workaround that handles a regression in dependency in Gradle 7.6 See gradle/gradle#23096 for details. The PR reviewed in line/armeria#4466
line/gradle-scripts#139 is merged. 😉 |
subrepo: subdir: "gradle/scripts" merged: "2844de2af" upstream: origin: "https://github.com/line/gradle-scripts" branch: "master" commit: "2844de2af" git-subrepo: version: "0.4.5" origin: "https://github.com/ingydotnet/git-subrepo" commit: "dbb99be"
It is likely that the flaky Scala build is fixed. |
Yay 😎 Procrastinating paid off 🥳 |
Any comments on this @minwoox? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!!!! 🎉 🎉 🎉
Thanks again @jimexist for the initial work of this PR. 🙇♂️🙇♂️ |
Motivation:
we can enable jdk 19 builds and test out project loom features
Modifications:
Result: