-
Notifications
You must be signed in to change notification settings - Fork 0
Project setup with mvvwx validation #1
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
base: main
Are you sure you want to change the base?
Conversation
|
We need to change the LICENSE (our file in the root repository) to Apache 2.0 (because of the code coming in - and we don't want to maintain multiple licenses) - |
|
Resolution ambiguation, so the mapping is not applied.. |
|
Skipping 'org.openjfx:javafx-base' - no mapping - run ':analyzeModulePath' for more details |
|
@jjohannes May I ask for some help here? I have troubles with the javafx configuration. I copied, adjusted and verified the gradle plugin files etc and compared them with JabRef's setup but somehow the mapping is not found and this results in ambigous resolution of javafx. It's probably some simple stupid thing I overlooked, but I am unable to spot it. Any help would be appreciated 🙏 |
jjohannes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Siedlerchr I took a look. With the changes below, it builds for me.
The main issue were the missing target(...) declarations.
build-logic/src/main/kotlin/org.jabref.javafx.controls.gradle.base.dependency-rules.gradle.kts
Outdated
Show resolved
Hide resolved
build-logic/src/main/kotlin/org.jabref.javafx.controls.gradle.base.dependency-rules.gradle.kts
Outdated
Show resolved
Hide resolved
build-logic/src/main/kotlin/org.jabref.javafx.controls.gradle.base.dependency-rules.gradle.kts
Outdated
Show resolved
Hide resolved
build-logic/src/main/kotlin/org.jabref.javafx.controls.gradle.base.dependency-rules.gradle.kts
Outdated
Show resolved
Hide resolved
| id("org.gradlex.extra-java-module-info") | ||
| id("org.gradlex.jvm-dependency-conflict-resolution") | ||
| id("org.gradlex.java-module-dependencies") // only for mappings at the moment | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main problem why it was not working is that you are missing the declaration of the targets you want to select when building. Even if you only build a Jar from this repo, Gradle needs to select one of the (target specific) JavaFX Jars. This may also be important if you want to run tests at some point.
Add the plugin: id("org.gradlex.java-module-packaging")
And then:
javaModulePackaging {
target("ubuntu-22.04") {
operatingSystem = OperatingSystemFamily.LINUX
architecture = MachineArchitecture.X86_64
}
target("ubuntu-22.04-arm") {
operatingSystem = OperatingSystemFamily.LINUX
architecture = MachineArchitecture.ARM64
}
target("macos-15-intel") {
operatingSystem = OperatingSystemFamily.MACOS
architecture = MachineArchitecture.X86_64
}
target("macos-15") {
operatingSystem = OperatingSystemFamily.MACOS
architecture = MachineArchitecture.ARM64
}
target("windows-latest") {
operatingSystem = OperatingSystemFamily.WINDOWS
architecture = MachineArchitecture.X86_64
}
}
(In this file or a separate ...targets.gradle.kts)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah thanks so much! I thought this was only relevant for jpackage.. 🤯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it would be better to split that part into a separate plugin at some point on our side, because the plugin and configuration name is not very helpful here. You could do it differently without that particular plugin, but I would suggest to use the same approach here as in the JabRef repo for consistency.
This topic of what should be "the standard way" to solve this better in the future is currently discussed here:
gradle/gradle#34845
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I strongly agree with you! Thanks for the pointer. I hope that we get one of these options in the future.
PS: Thanks for your help! This was the perfect birthday gift for me today :)
…base.dependency-rules.gradle.kts Co-authored-by: Jendrik Johannes <[email protected]>
…base.dependency-rules.gradle.kts Co-authored-by: Jendrik Johannes <[email protected]>
Co-authored-by: Jendrik Johannes <[email protected]>
…base.dependency-rules.gradle.kts Co-authored-by: Jendrik Johannes <[email protected]>
Co-authored-by: Jendrik Johannes <[email protected]>
Co-authored-by: Jendrik Johannes <[email protected]>
Co-authored-by: Jendrik Johannes <[email protected]>
…base.dependency-rules.gradle.kts Co-authored-by: Jendrik Johannes <[email protected]>
|
Can't login to SonaType - don't know why. Need to check these days. |
| plugins { | ||
| id("org.jabref.javafx.controls.gradle.base.repositories") | ||
| id("org.jabref.javafx.controls.gradle.feature.compile") | ||
| id("com.vanniktech.maven.publish") version "0.35.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A copy of that plugin is in the subproject
| url.set("https://github.com/JabRef/org.jabref.javafx.controls//") | ||
| licenses { | ||
| license { | ||
| name.set("MIT") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apache2
Uh oh!
There was an error while loading. Please reload this page.