Skip to content

Fix gradle check with JDK17+ #5735

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

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 6 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ buildscript {
classpath libs.plugin.japicmp
classpath libs.plugin.downloadTask
classpath libs.plugin.spotless
classpath libs.plugin.bnd

if (javaLanguageVersion.asInt() < 17) {
classpath libs.plugin.bnd
} else {
classpath libs.plugin.bndForJava17
}

constraints {
classpath(libs.asmForPlugins) {
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ plugin-japicmp = { module = "me.champeau.gradle:japicmp-gradle-plugin", version
plugin-downloadTask = { module = "de.undercouch:gradle-download-task", version = "5.6.0" }
plugin-spotless = { module = "com.diffplug.spotless:spotless-plugin-gradle", version = "6.25.0" }
plugin-bnd = "biz.aQute.bnd:biz.aQute.bnd.gradle:6.4.0"
plugin-bndForJava17 = "biz.aQute.bnd:biz.aQute.bnd.gradle:7.1.0"
Copy link
Member

Choose a reason for hiding this comment

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

Dependabot struggles with having multiple entries in the version catalog for the same artifact. We may want to consider inlining the older version where it is used and keeping only the newer version here so it gets updated by dependabot. We can do this separate from this PR as I think we have a number of other multiple entries that need to be handled.


[plugins]
kotlin19 = { id = "org.jetbrains.kotlin.jvm", version = "1.9.25" }
Expand Down
5 changes: 3 additions & 2 deletions micrometer-osgi-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ dependencies {
def testingBundle = tasks.register('testingBundle', Bundle) {
archiveClassifier = 'tests'
from sourceSets.test.output
sourceSet = sourceSets.test

if (javaLanguageVersion.asInt() < 17) {
sourceSet = sourceSets.test
}
bundle {
bnd """\
Bundle-SymbolicName: \${task.archiveBaseName}-\${task.archiveClassifier}
Expand Down
Loading