-
Notifications
You must be signed in to change notification settings - Fork 34
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
Version stored in .module doesn't match pom version for use with Gradle #281
Comments
@petebankhead Thanks a lot for trying out the Gradle catalog! Much appreciated. 👍 I guess you are the first person to try using it in practice, because this is clearly a major error. I think your diagnosis of the issue is correct. It's too late now to fix the 38.0.1 or 39.0.0 pom-scijava releases, but I fixed the logic for the next release (8d52f8b). I will release version 40.0.0 ASAP, but in the course of testing this I found that I had neglected to reenable pom-scijava's integration tests for the past few weeks, so now they need to run (which can take hours), and then I need to fix any newly uncovered problems, before I can release 40.0.0. I'll keep you posted. |
The issue with native library dependencies is something @elect86 was previously thinking about how best to address. Related issues and repositories: #241, scijava/pom-scijava-base#30, os-maven-plugin, native-lib-loader, scijava/native-lib-loader#50. |
I've released pom-scijava 40.0.0 to OSS Sonatype; should be mirrored to Maven Central within the next few minutes. I'll be curious to hear what the next obstacle is when attempting to use it from Gradle. 😆 |
It works, thanks! After importing the version catalog as dependencies {
implementation(sciJava.bundles.fiji)
{
exclude(group = "org.jogamp.gluegen")
exclude(group = "org.jogamp.jogl")
exclude(group = "org.jogamp.joal")
exclude(group = "org.bytedeco", module = "ffmpeg")
}
implementation(sciJava.org.jogamp.gluegen.gluegenRt)
implementation(sciJava.org.jogamp.jogl.joglAll)
implementation(sciJava.org.bytedeco.ffmpeg)
// Can apply the JavaCPP Gradle plugin to avoid getting dependencies for all platforms here
implementation("org.bytedeco:ffmpeg-platform:${sciJava.org.bytedeco.ffmpeg.get().version}")
val classifier = getJogampClassifier()
if (classifier != null) {
implementation("org.jogamp.gluegen:gluegen-rt:${sciJava.org.jogamp.gluegen.gluegenRt.get().version}:natives-macosx-universal")
implementation("org.jogamp.jogl:jogl-all:${sciJava.org.jogamp.jogl.joglAll.get().version}:natives-macosx-universal")
implementation("org.jogamp.joal:joal:${sciJava.org.jogamp.joal.joal.get().version}:natives-macosx-universal")
} else {
logger.warn("Native libraries not found for jogamp")
}
}
fun getJogampClassifier(): String? {
if (Os.isFamily(Os.FAMILY_MAC)) {
return "natives-macosx-universal"
}
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
return "natives-windows-amd64"
}
if (Os.isFamily(Os.FAMILY_UNIX)) {
return if (Os.isArch("arm64")) {
"natives-linux-aarch64"
} else {
"natives-linux-amd64"
}
}
return null
} |
@petebankhead Awesome! One question: I see these lines amongst the above: implementation("org.jogamp.gluegen:gluegen-rt:${sciJava.org.jogamp.gluegen.gluegenRt.get().version}:natives-macosx-universal")
implementation("org.jogamp.jogl:jogl-all:${sciJava.org.jogamp.jogl.joglAll.get().version}:natives-macosx-universal")
implementation("org.jogamp.joal:joal:${sciJava.org.jogamp.joal.joal.get().version}:natives-macosx-universal") This is hardcoding for macOS... it should instead be:
Right? |
Oops, it should indeed, you can see what I was developing with.... |
Very possible this is an issue of me not understanding, but I'm unable to access the version catalog in Gradle with the error
Checking pom-scijava-38.0.1.module I see
which seems to be the version of
pom-scijava-base
(19.0.0) and not ofpom-scijava
(38.0.1).Since the logic for setting the version in
build.gradle.kts
isis this an error that occurs because of the order in which versions appear in the xml?
(The bigger picture: I'm having problems using
scijava-pom
for dependencies with native libraries, because it uses profile activation based onos.family
and it seems Gradle doesn't support that - so I was hoping that a switch to use the version catalog here might help me figure out a workaround)Thanks!
The text was updated successfully, but these errors were encountered: