This repository has been archived by the owner on Nov 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 209
/
build.gradle
79 lines (69 loc) · 2.52 KB
/
build.gradle
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
plugins {
id "java"
id "application"
id "org.beryx.runtime" version "1.11.4"
id "edu.sc.seis.launch4j" version '2.4.6'
id "org.openjfx.javafxplugin" version "0.0.9"
}
group "blaise.img2latex"
version "0.7.7"
compileJava {
sourceCompatibility = 14
targetCompatibility = 14
}
repositories {
mavenCentral()
}
javafx {
version = "14.0.2.1"
}
application {
mainClassName = "entry.Main"
applicationName = "Image2LaTeX"
}
task("addVersion") {
doLast {
file("src/main/resources/project.properties").write("applicationName=$applicationName\nversion=$version\n")
}
}
jar.dependsOn(addVersion)
dependencies {
implementation "com.google.code.gson:gson:2.8.6"
implementation "org.scilab.forge:jlatexmath:1.0.7"
if (project.hasProperty("windows")) {
implementation "org.openjfx:javafx-base:14.0.2.1:win"
implementation "org.openjfx:javafx-swing:14.0.2.1:win"
implementation "org.openjfx:javafx-graphics:14.0.2.1:win"
implementation "org.openjfx:javafx-controls:14.0.2.1:win"
} else if (project.hasProperty("linux")) {
implementation "org.openjfx:javafx-base:14.0.2.1:linux"
implementation "org.openjfx:javafx-swing:14.0.2.1:linux"
implementation "org.openjfx:javafx-graphics:14.0.2.1:linux"
implementation "org.openjfx:javafx-controls:14.0.2.1:linux"
} else {
implementation "org.openjfx:javafx-base:14.0.2.1:mac"
implementation "org.openjfx:javafx-swing:14.0.2.1:mac"
implementation "org.openjfx:javafx-graphics:14.0.2.1:mac"
implementation "org.openjfx:javafx-controls:14.0.2.1:mac"
}
}
runtime {
imageZip.set(file("${buildDir}/../releases/Image2LaTeX-${version}.zip"))
addOptions("--strip-debug", "--compress", "2", "--no-header-files", "--no-man-pages")
addModules("java.base", "java.datatransfer", "java.desktop", "java.logging", "java.net.http", "java.prefs", "java.sql", "java.transaction.xa", "jdk.unsupported", "jdk.unsupported.desktop", "java.xml")
if (project.hasProperty("linux")) {
targetPlatform("linux", "jdk/linux-jdk")
} else {
targetPlatform("macos", "jdk/osx-jdk.jdk/Contents/Home")
}
}
launch4j {
mainClassName = "entry.Main"
bundledJrePath = "jre"
bundledJre64Bit = true
version = project.version
textVersion = project.version
copyright = "github/blaisewang/img2latex-mathpix"
icon = "${projectDir}/src/main/resources/icons/windows.ico"
outputDir = "../releases/${applicationName}-${project.version}-windows"
}