-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
73 lines (62 loc) · 2.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
import org.mtr.core.Generator
import org.mtr.core.WebserverSetup
plugins {
id "java"
id "maven-publish"
}
group "org.mtr.core"
version rootProject.properties.version
repositories {
mavenCentral()
flatDir { dirs "libs" }
}
dependencies {
implementation "org.mtr:Shadow-Libraries-net:0.0.1"
implementation "org.mtr:Shadow-Libraries-util:0.0.1"
implementation "commons-io:commons-io:+"
implementation "org.apache.logging.log4j:log4j-core:2.+"
compileOnly "com.google.code.findbugs:jsr305:+"
testImplementation "org.junit.jupiter:junit-jupiter-api:+"
testImplementation "org.apache.httpcomponents:httpclient:+"
testCompileOnly "com.google.code.findbugs:jsr305:+"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:+"
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
withSourcesJar()
withJavadocJar()
}
publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
}
jar {
manifest {
attributes("Main-Class": "org.mtr.core.Main")
}
}
test {
useJUnitPlatform()
testLogging { showStandardStreams = true }
}
tasks.register("generateTypeScriptSchemaClasses") {
Generator.generateTypeScript(project, "schema/map", "buildSrc/src/main/resources/website/src/app/entity/generated")
}
tasks.register("generateJavaSchemaClasses") {
Generator.generateJava(project, "schema/data", "core/generated/data", true, "core.data", "core.simulation")
Generator.generateJava(project, "schema/legacy", "legacy/generated/data", false, "core.data", "legacy.data")
Generator.generateJava(project, "schema/integration", "core/generated/integration", false, "core.data", "core.integration")
Generator.generateJava(project, "schema/map", "core/generated/map", false, "core.map")
Generator.generateJava(project, "schema/oba", "core/generated/oba", false, "core.oba")
Generator.generateJava(project, "schema/operation", "core/generated/operation", false, "core.data", "core.operation")
WebserverSetup.setup(project.rootDir, "", "core")
}
tasks.withType(AbstractArchiveTask).configureEach {
preserveFileTimestamps = false
reproducibleFileOrder = true
}