-
Notifications
You must be signed in to change notification settings - Fork 907
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
Building bookkeeper with gradle on java11 #2817
Conversation
- Use gradle native solution for using javac rather than specifying it via command line in gradle
cpu-affinity/src/main/java/org/apache/bookkeeper/common/util/affinity/impl/CpuAffinityJni.java
Outdated
Show resolved
Hide resolved
An alternative approach to generating JNI headers in a manner that the internal compiler will be aware of the dependencies: diff --git a/circe-checksum/build.gradle b/circe-checksum/build.gradle
index e581ae6c3..5e03ec932 100644
--- a/circe-checksum/build.gradle
+++ b/circe-checksum/build.gradle
@@ -28,18 +28,8 @@ dependencies {
testImplementation depLibs.mockito
}
-task generateJniHeaders(type: JavaCompile) {
- ext {
- javahOutputDir = "$buildDir/javahGenerated"
- }
- classpath = sourceSets.main.compileClasspath
- destinationDir file("${buildDir}/javahGenerated")
- source = sourceSets.main.java
- options.compilerArgs += [
- '-h', file("${buildDir}/javahGenerated"),
- ]
-
- options.annotationProcessorPath = configurations.annotationProcessor
+compileJava {
+ options.headerOutputDirectory = file("${buildDir}/javahGenerated")
} |
use compileJava task to generate jni headers
|
Verified on my local as well. It works. |
rerun failed checks |
2 similar comments
rerun failed checks |
rerun failed checks |
rerun failure checks |
1 similar comment
rerun failure checks |
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.
LGTM +1
Will merge this by tomorrow EOD if no more comments or concern. Thanks |
The PR is merged. Thanks @pradeepbn for your contribution. |
Descriptions of the changes in this PR: ### Motivation This change enable gradle to build on java11 ### Changes - generateJniHeaders for CpuAffinity using native gradle config rather than using javac rather than specifying it via command line in gradle - Update gradle dependencies that helps build java11 - Update checkstyle to use native configurations from gradle Master Issue: apache#2640 Reviewers: Prashant Kumar <None>, Henry Saputra <[email protected]>, Matteo Merli <[email protected]> This closes apache#2817 from pradeepbn/java11 and squashes the following commits: 95c19de [pradeepbn] Merge pull request #1 from mauricebarnum/pr-2817-jni 049a510 [maurice barnum] use compileJava task to generate jni headers f690e90 [Pradeep Nagaraju] Replace javac to use gradle native config 9285c10 [Pradeep Nagaraju] Revert the changes to avoid deprecation of finalize() 22c3cfd [Pradeep Nagaraju] remove unwanted changes b416059 [Pradeep Nagaraju] - Building bookkeeper with gradle on java11 - Use gradle native solution for using javac rather than specifying it via command line in gradle
Descriptions of the changes in this PR:
Motivation
This change enable gradle to build on java11
Changes
Master Issue: #2640