Skip to content

Commit bf874cd

Browse files
resolve gradle issues
see see openjfx/javafx-gradle-plugin#154
1 parent ad5e0f9 commit bf874cd

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

build.gradle

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,31 @@ test {
4747
useJUnitPlatform()
4848
}
4949

50-
java {
50+
/* not needed since non-modular project */
51+
/* java {
5152
modularity.inferModulePath.set(false)
53+
} */
54+
55+
// org.openjfx.javafxplugin 0.1.0+ issues
56+
// see https://github.com/openjfx/javafx-gradle-plugin/pull/154
57+
58+
// e.g., "copy" configuration from the runtimeClasspath over to xjcCatalogResolution
59+
configurations.xjcCatalogResolution {
60+
def rtCpAttributes = configurations.runtimeClasspath.attributes
61+
rtCpAttributes.keySet().each { key ->
62+
attributes.attribute(key, rtCpAttributes.getAttribute(key))
63+
}
5264
}
5365

66+
// e.g., configure manually
67+
/* configurations.xjcCatalogResolution {
68+
attributes {
69+
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage, Usage.JAVA_RUNTIME))
70+
attribute(OperatingSystemFamily.OPERATING_SYSTEM_ATTRIBUTE, objects.named(OperatingSystemFamily, "linux"))
71+
attribute(MachineArchitecture.ARCHITECTURE_ATTRIBUTE, objects.named(MachineArchitecture, "x86-64"))
72+
}
73+
} */
74+
5475
javafx {
5576
version = '17' // '16' // '14.0.2.1'
5677
modules = ['javafx.controls']

0 commit comments

Comments
 (0)