-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.jvm
More file actions
141 lines (101 loc) · 3.39 KB
/
Copy pathbuild.gradle.jvm
File metadata and controls
141 lines (101 loc) · 3.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/*
JVM "classic" build for klikr
0. cp build.gradle.jvm build.gradle
1. make sure you have a JDK with javafx bundled:
sdk install java 25.fx-zulu
2. Enjoy!
start klikr 'standalone' with:
gradle klikr
start audio_player 'standalone' with:
gradle audio_player
start the launcher with:
gradle run
COSMETIC: to get 'live' transmission
of UI properties (style, font, etc) to work,
you need to start the launcher first as it acts
as a dispatcher for these properties.
*/
plugins {
id 'java'
id 'application'
id 'org.openjfx.javafxplugin' version '0.1.0'
id 'com.gradleup.shadow' version '9.0.1'
}
version = "1.0" // application_version
group = 'klikr'
javafx {
version = "25"
modules = [ 'javafx.base', 'javafx.graphics', 'javafx.controls', 'javafx.fxml','javafx.media','javafx.web' ]
}
repositories {
mavenCentral()
}
dependencies {
// EXIF reader
implementation 'com.drewnoakes:metadata-extractor:2.19.0'
// Cache
implementation group: 'com.github.ben-manes.caffeine', name: 'caffeine', version: '3.2.2'
// moving folders across different drives
implementation group: 'commons-io', name: 'commons-io', version: '2.19.0'
// for writing png files without AWT
implementation 'ar.com.hjg:pngj:2.1.0'
// for Magic Kernel Sharp 2021 top quality image rescaling
implementation("app.photofox.vips-ffm:vips-ffm-core:1.9.1")
// for FITS we use GraphicsMagick but this also works: implementation 'gov.nasa.gsfc.heasarc:nom-tam-fits:1.19.1'
}
tasks.register('klikr', JavaExec) {
dependsOn 'classes'
mainClass = 'klikr.Klikr_application'
classpath(sourceSets.main.runtimeClasspath)
group = 'applications'
//jvmArgs = ['--enable-native-access=ALL-UNNAMED', '-Djava.library.path=/usr/local/lib:/opt/homebrew/Cellar/vips/8.17.2/lib']
doFirst {
println "doFirst start"
def props = new Properties()
def dir = new File(System.getProperty("user.home"),".klikr")
def file = new File(dir, "ram.properties")
file.withInputStream {
props.load(it)
println "doFirst props loaded: ${props}"
null
}
if (props['max_RAM_in_GBytes']) {
println "doFirst found max_RAM_in_GBytes: ${props}"
jvmArgs "-Xmx${props['max_RAM_in_GBytes']}G"
}
return
}
}
tasks.register('audio_player', JavaExec) {
dependsOn 'classes'
mainClass = 'klikr.audio.archive.Audio_player_application'
classpath = sourceSets.main.runtimeClasspath
group = 'applications'
return
}
tasks.register('in3D', JavaExec) {
dependsOn 'classes'
mainClass = 'klikr.in3D.The_main_circular_3D'
classpath = sourceSets.main.runtimeClasspath
group = 'applications'
return
}
application {
mainClass = "klikr.Launcher"
}
run{
standardInput = System.in
classpath = sourceSets.main.runtimeClasspath
//systemProperty 'java.library.path' , '/usr/local/lib:/opt/homebrew/Cellar/vips/8.17.2/lib'
//jvmArgs = ['--enable-native-access=ALL-UNNAMED','-Djava.library.path=/usr/local/lib:/opt/homebrew/Cellar/vips/8.17.2/lib']
}
shadowJar {
archiveFileName.set("klikr.jar")
manifest {
attributes(
'Main-Class': 'klikr.Klikr_application',
'JavaFX-Modules': ['javafx.base','javafx.graphics','javafx.controls','javafx.fxml', 'javafx.media', 'javafx.web']
)
}
mergeServiceFiles()
}