-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
88 lines (73 loc) · 2.44 KB
/
build.gradle
File metadata and controls
88 lines (73 loc) · 2.44 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
plugins {
id 'base'
}
allprojects {
repositories {
mavenCentral()
google()
maven { url "https://repo.papermc.io/repository/maven-public/" }
}
}
apply from: "gradle/createLocalProperties.gradle"
tasks.register('initProperties') {
group = "setup"
description = "Recreate local gradle.properties from gradle.properties.example"
doLast {
def localFile = rootProject.file('gradle.properties')
def exampleFile = rootProject.file('gradle.properties.example')
if (!exampleFile.exists()) {
throw new GradleException("Example file gradle.properties.example does not exist!")
}
println "Creating/updating local gradle.properties from example..."
localFile.withWriter('UTF-8') { writer ->
writer << exampleFile.text
}
}
}
tasks.register('buildPaperAPI') {
def moduleApiProject = project.rootProject.findProject(":ModuleSystem:ModuleAPI-Paper")
if (moduleApiProject != null) {
dependsOn ':ModuleSystem:ModuleAPI-Paper:shadowJar'
} else {
dependsOn ':ModuleAPI-Paper:shadowJar'
}
}
tasks.register('buildVelocityAPI') {
def moduleApiProject = project.rootProject.findProject(":ModuleSystem:ModuleAPI-Velocity")
if (moduleApiProject != null) {
dependsOn ':ModuleSystem:ModuleAPI-Velocity:shadowJar'
} else {
dependsOn ':ModuleAPI-Velocity:shadowJar'
}
}
tasks.register('buildAllAPIs') {
dependsOn buildPaperAPI, buildVelocityAPI
}
tasks.register('buildPaperSystem') {
def moduleApiProject = project.rootProject.findProject(":ModuleSystem:ModuleAPI-Paper")
if (moduleApiProject != null) {
dependsOn ':ModuleSystem:ModuleSystem-Paper:shadowJar'
} else {
dependsOn ':ModuleSystem-Paper:shadowJar'
}
}
tasks.register('buildVelocitySystem') {
def moduleApiProject = project.rootProject.findProject(":ModuleSystem:ModuleAPI-Velocity")
if (moduleApiProject != null) {
dependsOn ':ModuleSystem:ModuleSystem-Velocity:shadowJar'
} else {
dependsOn ':ModuleSystem-Velocity:shadowJar'
}
}
tasks.register('buildAllSystems') {
dependsOn buildPaperSystem, buildVelocitySystem
}
tasks.register('buildPaperBundle') {
dependsOn buildPaperAPI, buildPaperSystem
}
tasks.register('buildVelocityBundle') {
dependsOn buildVelocityAPI, buildVelocitySystem
}
tasks.register('buildAllBundles') {
dependsOn buildPaperBundle, buildVelocityBundle
}