-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild.gradle
90 lines (75 loc) · 2.17 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
80
81
82
83
84
85
86
87
88
89
90
plugins {
id 'java'
}
project.ext {
mainClass = 'entralinked.Entralinked'
agentClass = 'entralinked.LauncherAgent'
workingDirectory = 'run'
}
repositories {
mavenCentral()
}
configurations {
signedImplementation
implementation.extendsFrom signedImplementation
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.1'
signedImplementation 'org.bouncycastle:bcpkix-jdk15on:1.70'
implementation 'org.apache.logging.log4j:log4j-core:2.20.0'
implementation 'org.apache.logging.log4j:log4j-api:2.20.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.2'
implementation 'io.netty:netty-all:4.1.79.Final'
implementation 'io.javalin:javalin:5.5.0'
implementation 'org.apache.logging.log4j:log4j-slf4j2-impl:2.20.0'
implementation 'com.formdev:flatlaf:3.1.1'
implementation 'com.formdev:flatlaf-extras:3.1.1'
implementation 'com.formdev:flatlaf-intellij-themes:3.1.1'
}
sourceSets {
main {
resources {
srcDir 'poke-sprites-v'
exclude 'README.md'
}
}
}
test {
workingDir = "testRun";
useJUnitPlatform()
doFirst {
mkdir workingDir
}
}
compileJava {
options.encoding = "UTF-8"
}
task dist(type: Jar) {
manifest {
attributes 'Main-Class': project.ext.mainClass,
'Launcher-Agent-Class': project.ext.agentClass,
'Multi-Release': 'true'
}
from {
(configurations.runtimeClasspath - configurations.signedImplementation).collect {
it.isDirectory() ? it : zipTree(it)
}
}
from {
configurations.signedImplementation
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
dependsOn configurations.runtimeClasspath, test
with jar
}
task run(type: JavaExec) {
mainClass = project.ext.mainClass
workingDir = project.ext.workingDirectory
classpath = sourceSets.main.runtimeClasspath
doFirst {
mkdir workingDir
}
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17