@@ -2,7 +2,7 @@ plugins {
2
2
// Main gradle plugin for building a Java library
3
3
id ' java-library'
4
4
// To create a shadow/fat jar that bundle up all dependencies
5
- id ' com.github.johnrengelman.shadow' version ' 7 .1.2 '
5
+ id ' com.github.johnrengelman.shadow' version ' 8 .1.1 '
6
6
// Add JavaFX dependencies
7
7
alias(libs. plugins. javafx)
8
8
// Version in settings.gradle
@@ -13,7 +13,7 @@ ext.moduleName = 'qupath.extension.omero'
13
13
version = " 0.1.1-rc1"
14
14
description = " QuPath extension to support image reading using OMERO APIs."
15
15
ext. qupathVersion = gradle. ext. qupathVersion
16
- ext. qupathJavaVersion = 21
16
+ ext. qupathJavaVersion = libs . versions . jdk . get()
17
17
18
18
dependencies {
19
19
shadow " io.github.qupath:qupath-gui-fx:${ qupathVersion} "
42
42
}
43
43
}
44
44
45
+ /**
46
+ * Copy necessary attributes, see
47
+ * - https://github.com/qupath/qupath-extension-template/issues/9
48
+ * - https://github.com/openjfx/javafx-gradle-plugin#variants
49
+ */
50
+ configurations. shadow {
51
+ def runtimeAttributes = configurations. runtimeClasspath. attributes
52
+ runtimeAttributes. keySet(). each { key ->
53
+ if (key in [Usage . USAGE_ATTRIBUTE , OperatingSystemFamily . OPERATING_SYSTEM_ATTRIBUTE , MachineArchitecture . ARCHITECTURE_ATTRIBUTE ])
54
+ attributes. attribute(key, runtimeAttributes. getAttribute(key))
55
+ }
56
+ }
57
+
45
58
processResources {
46
59
from (" ${ projectDir} /LICENSE" ) {
47
60
into ' licenses/'
0 commit comments