This repository was archived by the owner on Jul 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
102 lines (81 loc) · 2.52 KB
/
build.gradle
File metadata and controls
102 lines (81 loc) · 2.52 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
plugins {
id 'application'
id 'java-library'
id 'checkstyle'
id 'org.beryx.runtime' version '1.12.1'
}
group = 'inf112.skeleton.app'
version = '0.2'
description = """isolasjonsteamet-roborally"""
application.mainClass = 'inf112.isolasjonsteamet.roborally.app.Main'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(15)
}
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
}
}
// https://docs.gradle.org/current/userguide/toolchains.html#integration_with_tasks_relying_on_a_java_executable_or_java_home
def java15home = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(15)
}.get().metadata.installationPath.asFile.absolutePath
runtime {
javaHome = java15home
//Need these to not require JDK 15 for packaging
//Remember to update thse now and then. JDK 15 is needed to update them
modules = ['java.desktop', 'java.logging', 'jdk.unsupported']
//Seems like compress 2 causes problems, so we'll avoid it
options = ['--strip-debug', '--compress', '1', '--no-header-files', '--no-man-pages']
jpackage {
skipInstaller = true
jpackageHome = java15home
}
launcher {
jvmArgs = ['-Droborally.is-prod=true']
if (org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.currentOperatingSystem.isMacOsX()) {
jvmArgs += '-XstartOnFirstThread'
}
}
}
tasks.getByName("runtime").doLast {
copy {
from startScripts.outputDir
into "${runtime.imageDir.asFile.get()}/${startScripts.outputDir.name}"
}
}
checkstyle {
configDirectory = rootProject.projectDir
toolVersion = "8.41.1"
ignoreFailures = false
maxWarnings = 0
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
}
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
api "com.badlogicgames.gdx:gdx:$gdxVersion"
api "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
api "com.google.guava:guava:30.1-jre"
implementation 'io.netty:netty-all:4.1.58.Final'
implementation 'org.slf4j:slf4j-api:1.7.30'
implementation 'ch.qos.logback:logback-classic:1.2.3'
testImplementation(platform('org.junit:junit-bom:5.7.1'))
testImplementation('org.junit.jupiter:junit-jupiter')
}