-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
104 lines (89 loc) · 4.06 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import org.gradle.internal.os.OperatingSystem
plugins {
id 'application'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
repositories {
mavenCentral()
maven { url = 'https://jitpack.io' }
}
compileJava() {
options.compilerArgs << "-Amapstruct.defaultComponentModel=jsr330"
}
project.ext.javafxPlatform = "${javafxPlatform}"
if (javafxPlatform == "unspecified") {
switch (OperatingSystem.current()) {
case OperatingSystem.LINUX:
project.ext.javafxPlatform = "linux"
break
case OperatingSystem.MAC_OS:
project.ext.javafxPlatform = "mac"
break
case OperatingSystem.WINDOWS:
project.ext.javafxPlatform = "win"
break
}
}
println "Platform is: ${javafxPlatform}"
dependencies {
def springBootVersion = "3.3.4"
def mapStructVersion = "1.6.2"
def commonsVersion = "bc0a20692e599cccb618e0c4346407a13e44464a"
annotationProcessor(platform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}"))
implementation(platform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}"))
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
annotationProcessor("org.projectlombok:lombok")
annotationProcessor("org.mapstruct:mapstruct-processor:${mapStructVersion}")
implementation("org.projectlombok:lombok")
implementation("org.jetbrains:annotations:26.0.0")
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-oauth2-client:3.3.5")
implementation("javax.inject:javax.inject:1")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8")
implementation("com.github.jasminb:jsonapi-converter:0.14")
implementation("com.github.FAForever.faf-java-commons:faf-commons-data:${commonsVersion}")
//implementation("com.github.FAForever.faf-java-commons:faf-commons-api:${commonsVersion}")
implementation("org.apache.httpcomponents:httpclient:4.5.14")
implementation("com.github.rutledgepaulv:q-builders:1.6")
implementation("com.google.guava:guava:33.3.1-jre")
implementation("org.mapstruct:mapstruct:${mapStructVersion}")
implementation("org.openjfx:javafx-base:${javafxVersion}:${javafxPlatform}")
implementation("org.openjfx:javafx-controls:${javafxVersion}:${javafxPlatform}")
implementation("org.openjfx:javafx-graphics:${javafxVersion}:${javafxPlatform}")
implementation("org.openjfx:javafx-fxml:${javafxVersion}:${javafxPlatform}")
implementation("org.openjfx:javafx-web:${javafxVersion}:${javafxPlatform}")
implementation("org.openjfx:javafx-media:${javafxVersion}:${javafxPlatform}")
implementation("com.fasterxml.jackson.core:jackson-databind:2.18.0")
testImplementation("org.springframework.boot:spring-boot-starter-test")
implementation 'org.json:json:20240303'
implementation 'org.apache.httpcomponents.core5:httpcore5:5.3'
implementation 'org.apache.httpcomponents.client5:httpclient5:5.4'
// Recursive Fix in Local File
dependencies {
implementation files('libs/faf-commons-api-1.0-SNAPSHOT.jar')
}
}
mainClassName = 'com.faforever.moderatorclient.Launcher'
group = 'com.faforever'
description = 'faf-moderator-client'
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
// This fixes the "line too long" error when running the .bat with windows CLI
tasks.withType(CreateStartScripts).each { task ->
task.doLast {
String text = task.windowsScript.text
// Replaces the per file classpath (which are all jars in "lib") with a wildcard on lib
text = text.replaceFirst(/(set CLASSPATH=%APP_HOME%\\lib\\).*/, { "${it[1]}*" })
task.windowsScript.write text
}
}
distZip {
archiveClassifier.set(javafxPlatform)
}