forked from magge-faf/faf-moderator-client-develop-modified
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
97 lines (82 loc) · 3.77 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
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.1.4"
def mapStructVersion = "1.5.5.Final"
def commonsVersion = "e904344614290594ba4515d910d15acf4782789f"
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:24.0.1")
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.6.8")
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.13")
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:32.1.2-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.14.0")
testImplementation("org.springframework.boot:spring-boot-starter-test")
}
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)
}