Closed elect86 closed 2 years ago
* What went wrong:
Plugin [id: 'org.kordamp.gradle.jdeps', version: '0.7.0'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.kordamp.gradle.jdeps:org.kordamp.gradle.jdeps.gradle.plugin:0.7.0')
Searched in the following repositories:
Gradle Central Plugin Repository
I guess it'll take a while to have it available?
Publication to the Plugin Portal failed on the first try. The plugin should be up.
No. There regex you used (lwjgl*
) matches "lwjg", "lwjgl", "lwjgll", "lwjglll", ...
That's clearly not what you need. Use lwjgl.*
but bear in mind this will match lwjgl_native too.
Uh, ok
I still get Error: lwjgl-3.2.3-SNAPSHOT.jar is a multi-release jar file but --multi-release option is not set
Which regex shall I use? lwjgl-*
or lwjgl-3.*
don't seem to work..
Hmm, if OTOH the multiRelease
property is set
jdepsReport {
multiRelease = true
}
Then the error is
Error: kotlin-stdlib-common-1.3.41.jar is not a multi-release jar file but --multi-release option is set
It appears that the multiReleaseJar
settings are not applied transitively, but if multiRelease
is set then all JARs (even those that are not multi-release) will be checked. It seems that the jdeps
command is too strict, based on the help from JDK 11:
--multi-release <version> Specifies the version when processing
multi-release jar files. <version> should
be integer >= 9 or base.
This does not seem to imply that a strict check will be executed.
I don't get it. I've confirmed that the plugin generates the following command
jdeps --multi-release 11 -jdkinternals --module-path /Users/aalmiray/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.3.41/e24bd38de28a326cce8b1f0d61e809e9a92dad6a/kotlin-stdlib-1.3.41.jar:/Users/aalmiray/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-jemalloc/3.2.3-SNAPSHOT/8e9b50900c5ca9e32d147048beb565f0fde1d48c/lwjgl-jemalloc-3.2.3-SNAPSHOT.jar:/Users/aalmiray/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl/3.2.3-SNAPSHOT/bcd3da451427975d3efa8c0d17c3d36820749abd/lwjgl-3.2.3-SNAPSHOT.jar:/Users/aalmiray/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.3.41/2ecf4aa059427d7186312fd1736afedf7972e7f7/kotlin-stdlib-common-1.3.41.jar:/Users/aalmiray/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar:/private/tmp/kool/build/classes/java/main /Users/aalmiray/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl/3.2.3-SNAPSHOT/bcd3da451427975d3efa8c0d17c3d36820749abd/lwjgl-3.2.3-SNAPSHOT.jar
If said command is executed on a sheel you get the desired result. However if the command is executed by the plugin then you get
Error: lwjgl-3.2.3-SNAPSHOT.jar is a multi-release jar file but --multi-release option is not set
multiRelease = true
returns Cannot cast object 'true' with class 'java.lang.Boolean' to class 'java.lang.Integer'
Ps: how can I get the generated command?
Err my mistake, multiRelease
must be set to an Integer not a Boolean.
I've pushed diagnostics code. You can clone this repository and push a SNAPSHOT release to mavenLocal, configure it and then invoke gradle cleanJdepsReport jdepReport -i
no problem
I find it a little overkill.. I think also other users may benefit from the generated command, would it be better to print it out in console?
By overkill you mean testing out a local snapshot?
It's my policy to never release snapshot versions of plugins and from the looks of it this bug has not been fully fixed thus a 0.7.1
release should not be posted yet.
yep, I have no idea how to do this "push a SNAPSHOT release to mavenLocal, configure it "
lwjgl uses oss.sonatype.org
to publish snapshots, could something similar be done also for gradle plugins?
Here's how you can do it
Then edit kool/settings.gradle
to make it look like this
pluginManagement {
repositories {
jcenter()
gradlePluginPortal()
mavenLocal()
}
}
Finally edit kool/build.gradle
and update the version number
id 'org.kordamp.gradle.jdeps' version '0.7.1-SNAPSHOT'
The cleanJdepsReport
task comes from a rule. Have a look at the bottom of gradlew tasks --all
and you'll see
Rules
-----
Pattern: clean<TaskName>: Cleans the output files of a task.
I do see it indeed, but it keeps saying that the command is not found
Cannot reproduce with latest. Closing.
As titled, I'm trying to run it on a multi-release jar (lwjgl), but I get: