Skip to content

Commit 45b3357

Browse files
committed
initial version of #68
1 parent 73f8fb1 commit 45b3357

File tree

12 files changed

+968
-0
lines changed

12 files changed

+968
-0
lines changed

vmfedit/.gitignore

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
.gradle
2+
build/
3+
!gradle/wrapper/gradle-wrapper.jar
4+
!**/src/main/**/build/
5+
!**/src/test/**/build/
6+
7+
### IntelliJ IDEA ###
8+
.idea/modules.xml
9+
.idea/jarRepositories.xml
10+
.idea/compiler.xml
11+
.idea/libraries/
12+
*.iws
13+
*.iml
14+
*.ipr
15+
out/
16+
!**/src/main/**/out/
17+
!**/src/test/**/out/
18+
19+
### Resources ###
20+
21+
/node_modules/
22+
/src/main/resources/eu/mihosoft/vmf/vmfedit/fontawesome-free/
23+
/src/main/resources/eu/mihosoft/vmf/vmfedit/bootstrap/
24+
/src/main/resources/json-editor/
25+
26+
/package.json
27+
/package-lock.json
28+
29+
30+
### Eclipse ###
31+
.apt_generated
32+
.classpath
33+
.factorypath
34+
.project
35+
.settings
36+
.springBeans
37+
.sts4-cache
38+
bin/
39+
!**/src/main/**/bin/
40+
!**/src/test/**/bin/
41+
42+
### NetBeans ###
43+
/nbproject/private/
44+
/nbbuild/
45+
/dist/
46+
/nbdist/
47+
/.nb-gradle/
48+
49+
### VS Code ###
50+
.vscode/
51+
52+
### Mac OS ###
53+
.DS_Store
54+
55+
56+
57+

vmfedit/build.gradle

+123
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
plugins {
2+
id 'application'
3+
id 'org.openjfx.javafxplugin' version '0.0.13'
4+
id 'org.beryx.jlink' version '2.25.0'
5+
id 'com.github.node-gradle.node' version '3.3.0'
6+
}
7+
8+
group 'eu.mihosoft.vmf'
9+
version '1.0.0-SNAPSHOT'
10+
11+
// installer version (used for jlink/jpackge)
12+
// parse version with three '.' separated numbers from full version string
13+
def installerVersionList = version.tokenize('.')
14+
def majorVersion = installerVersionList[0]
15+
def minorVersion = installerVersionList[1]
16+
// parse leading integer from patch version string (remove the rest)
17+
def patchVersion = ((Number)java.text.NumberFormat.getInstance().parse(installerVersionList[2])).intValue()
18+
19+
def installerVersionStr = "${majorVersion}.${minorVersion}.${patchVersion}"
20+
def appName = "VMFEdit"
21+
22+
repositories {
23+
mavenCentral()
24+
}
25+
26+
ext {
27+
junitVersion = '5.8.2'
28+
}
29+
30+
sourceCompatibility = '17'
31+
targetCompatibility = '17'
32+
33+
tasks.withType(JavaCompile) {
34+
options.encoding = 'UTF-8'
35+
}
36+
37+
application {
38+
mainModule = 'eu.mihosoft.vmf.vmfedit'
39+
mainClass = 'eu.mihosoft.vmf.vmfedit.JsonEditorApplication'
40+
}
41+
42+
javafx {
43+
version = '17.0.2'
44+
modules = ['javafx.controls', 'javafx.fxml', 'javafx.web']
45+
}
46+
47+
dependencies {
48+
implementation('org.controlsfx:controlsfx:11.1.1')
49+
50+
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
51+
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
52+
}
53+
54+
test {
55+
useJUnitPlatform()
56+
}
57+
58+
ext.os = org.gradle.internal.os.OperatingSystem.current()
59+
jlink {
60+
version = installerVersionStr
61+
imageZip = project.file("${buildDir}/distributions/app-${javafx.platform.classifier}.zip")
62+
options = ['--strip-debug', "--compress=zip-6", '--no-header-files', '--no-man-pages']
63+
launcher {
64+
name = appName
65+
}
66+
jpackage {
67+
if(os.windows) {
68+
installerType = 'msi'
69+
installerOptions = ['--win-per-user-install', '--win-menu']
70+
}
71+
}
72+
}
73+
74+
75+
76+
jlinkZip {
77+
group = 'distribution'
78+
}
79+
80+
node {
81+
version = '16.13.1'
82+
download = true
83+
}
84+
85+
task installJsonEditor(type: NpmTask) {
86+
args = ['install', '@json-editor/[email protected]']
87+
}
88+
89+
task copyJsonEditorToResources(type: Copy) {
90+
from 'node_modules/@json-editor/json-editor/dist'
91+
into 'src/main/resources/json-editor'
92+
include '**/*'
93+
}
94+
95+
task installFontAwesome(type: NpmTask) {
96+
args = ['install', '@fortawesome/[email protected]']
97+
}
98+
99+
task copyFontAwesomeToResources(type: Copy) {
100+
from 'node_modules/@fortawesome/fontawesome-free/'
101+
into 'src/main/resources/eu/mihosoft/vmf/vmfedit/fontawesome-free'
102+
include '**/*'
103+
}
104+
105+
task installBootStrap(type: NpmTask) {
106+
args = ['install', '[email protected]']
107+
}
108+
109+
task copyBootStrapToResources(type: Copy) {
110+
from 'node_modules/bootstrap/dist'
111+
into 'src/main/resources/eu/mihosoft/vmf/vmfedit/bootstrap'
112+
include '**/*'
113+
}
114+
115+
116+
copyJsonEditorToResources.dependsOn installJsonEditor
117+
processResources.dependsOn copyJsonEditorToResources
118+
119+
copyFontAwesomeToResources.dependsOn installFontAwesome
120+
processResources.dependsOn copyFontAwesomeToResources
121+
122+
copyBootStrapToResources.dependsOn installBootStrap
123+
processResources.dependsOn copyBootStrapToResources
59.3 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)