This repository was archived by the owner on Apr 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.gradle.kts
94 lines (80 loc) · 2.81 KB
/
build.gradle.kts
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
plugins {
id("application")
id("org.javamodularity.moduleplugin") version "1.7.0"
id("com.jcs.extras.extras-plugin")
}
group = "com.jcs"
version = "1.6.0-SNAPSHOT"
tasks.test {
useJUnitPlatform()
}
application {
mainModule.set("com.jcs.overlay.main")
mainClass.set("com.jcs.overlay.App")
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(15)
}
// Modularity stuff
tasks.withType<JavaExec> {
modularity.inferModulePath.set(true)
}
modularity.patchModule("slf4j.log4j12", "log4j-1.2.17.jar")
modularity.disableEffectiveArgumentsAdjustment()
// JLink plugin
jlink {
addOptions("--strip-debug", "--compress=2", "--no-header-files", "--no-man-pages")
forceMerge("slf4j-api")
mergedModule {
additive = true
// Fixes random SSLHandshakeException...
requires("jdk.crypto.ec")
// Fixes Orianna caching
uses("org.cache2k.spi.Cache2kCoreProvider")
uses("org.cache2k.spi.Cache2kExtensionProvider")
uses("org.cache2k.core.spi.CacheConfigurationProvider")
uses("org.cache2k.core.spi.CacheLifeCycleListener")
uses("org.cache2k.core.spi.CacheManagerLifeCycleListener")
}
launcher {
name = "run"
windowsScriptTemplate = file("jlink/windows_launcher_template.txt")
}
}
repositories {
flatDir { dirs("libs") }
mavenCentral()
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }
google()
}
dependencies {
implementation("org.java-websocket", "Java-WebSocket", "1.4.0")
implementation("net.java.dev.jna", "jna-platform", "5.3.1")
implementation("org.apache.commons", "commons-lang3", "3.9")
// implementation("com.typesafe", "config", "1.4.0")
implementation(":config")
// OkHttp
implementation("com.squareup.okhttp3:okhttp:4.9.0")
// Orianna
// implementation("com.merakianalytics.orianna", "orianna", "4.0.0-rc7")
implementation("com.merakianalytics.orianna", "orianna", "4.0.0-SNAPSHOT")
// Moshi
implementation("com.squareup.moshi", "moshi", "1.11.0")
implementation(":moshi-adapters-1.11.1-SNAPSHOT")
// CEF (from JAR)
implementation(":jogl-all")
implementation(":gluegen-rt")
implementation(":jcef-win64")
implementation(":gluegen-rt-natives-windows-amd64")
implementation(":jogl-all-natives-windows-amd64")
// SLF4J
implementation("org.slf4j", "slf4j-api", "1.8.0-beta4")
implementation("org.slf4j", "slf4j-log4j12", "1.8.0-beta4")
implementation("uk.org.lidalia", "sysout-over-slf4j", "1.0.2")
// Other
implementation("org.jetbrains", "annotations", "+")
compileOnly("com.google.code.findbugs", "jsr305", "3.0.2")
testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.4.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.4.2")
}