Skip to content
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

Update OSS release plugin version #501

Merged
merged 3 commits into from
Jul 2, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions lib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
id 'java'
id 'jacoco'
id 'com.jfrog.bintray'
id 'com.auth0.gradle.oss-library.java'
}

Expand Down Expand Up @@ -30,33 +29,13 @@ oss {
}
}

def javaVersion = 8
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem to be needed even when the library outputs a multi-jar with module support.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jimmyjames can you please double-check this one on your side? for me it keeps compiling after running something like ./gradlew clean build javadoc publishMavenJavaPublicationToMavenLocal --rerun-tasks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if you are running gradle with java 11 it will work. Using a toolchain you should be able to run gradle with say, java 8, and gradle will use the specified toolchain version for tasks. However the custom compileModuleInfoJava task does not appear to be respecting the toolchain, instead using the java version running gradle. Since our CI runs on 11 and this issue exists outside this change, I'd at least add a comment to the custom task with a todo to use the toolchain version so we can run the build with a different java version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

I tried changing my local JDK back to JDK 8 and ran the command above. The build is still successful. Do you think the comment is necessary? And, would that be for the "compileJava" task?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per our discussion today, I'll add this block back to prevent potential issues when running the build using JDK 8.

}
}

compileJava {
exclude 'module-info.java'
lbalmaceda marked this conversation as resolved.
Show resolved Hide resolved

options.compilerArgs = ['--release', "$javaVersion"]
}

// Use latest JDK for javadoc generation
tasks.withType(Javadoc).configureEach {
lbalmaceda marked this conversation as resolved.
Show resolved Hide resolved
javadocTool = javaToolchains.javadocToolFor {
languageVersion = JavaLanguageVersion.of(16)
}
}

javadoc {
// Exclude internal implementation package from javadoc
excludes = ['com/auth0/jwt/impl', 'module-info.java']
// Specify Java version this project uses
// Otherwise would use version of javadoc toolchain by default which could
// cause compilation error mismatch between compileJava and javadoc creation
options.addStringOption('-release', "$javaVersion")
lbalmaceda marked this conversation as resolved.
Show resolved Hide resolved
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ pluginManagement {
gradlePluginPortal()
}
plugins {
id 'com.jfrog.bintray' version '1.8.5'
id 'com.auth0.gradle.oss-library.java' version '0.15.1'
id 'com.auth0.gradle.oss-library.java' version '0.16.0'
}
}

Expand Down