-
Notifications
You must be signed in to change notification settings - Fork 3
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
Invalid maven build #6
Comments
To be honest I don't know how this should be dealt with - it is the first time I have a Java project that relies on platform specific dependencies. Any ideas? |
I had the same issue, but thought it to be more a problem with Gradle not understanding the profiles section of the POM, so I filed a ticket with Gradle. |
The workaround I ended up putting into my build to get the dependency to resolve properly: configurations.all {
resolutionStrategy.eachDependency {
// Workaround for https://github.com/gradle/gradle/issues/20164
if (requested.name == "skija-\${skija.platform}") {
val os = org.gradle.internal.os.OperatingSystem.current()
val platform = when {
os.isWindows -> "windows"
os.isMacOsX -> "macos"
os.isLinux -> "linux"
else -> throw UnsupportedOperationException("Unknown OS: $os")
}
useTarget("${requested.group}:skija-$platform:${requested.version}")
}
}
} This would have been before I discovered that it was the wrong skija so I couldn't use it anyway, but it might help someone out. I'm still trying to figure out how other builds are doing platform-dependent stuff. e.g., when I pull in compose desktop as a dependency, it correctly resolves skiko-awt-runtime-windows-x64 somehow, so there must be some more supported way to do these sorts of variants not just by OS but by architecture. |
Adding dependency by Gradle:
implementation("org.jfree:org.jfree.skijagraphics2d:1.0.3")
Dependency output:
Expect:
Error:
The text was updated successfully, but these errors were encountered: