-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
51 lines (41 loc) · 1.67 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
import java.nio.file.Files
import java.nio.file.StandardCopyOption
plugins {
id 'java-library'
id 'com.gradleup.shadow' version '8.3.0' apply false
}
group = 'arcnode'
version = project.mod_version
subprojects {
group = parent.group
version = parent.version
plugins.apply("java")
plugins.apply("java-library")
repositories {
mavenCentral()
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
compileOnly 'org.projectlombok:lombok:1.18.34'
annotationProcessor 'org.projectlombok:lombok:1.18.34'
}
test {
useJUnitPlatform()
}
}
task dist(group: "build") {
dependsOn ":mod:fabric:build"
dependsOn ":mod:neoforge:build"
dependsOn ":server:dist"
doLast {
def output = new File(projectDir, "dist").toPath()
if (!Files.exists(output))
Files.createDirectory(output)
def proj = projectDir.toPath()
Files.copy(proj.resolve("server/build/libs/server-${project.version}-dist.jar"), output.resolve("NullProtect-Server-${project.version}.jar"), StandardCopyOption.REPLACE_EXISTING)
Files.copy(proj.resolve("mod/neoforge/build/libs/nullprotect-neoforge-${project.version}.jar"), output.resolve("NullProtect-NeoForge-${project.version}.jar"), StandardCopyOption.REPLACE_EXISTING)
Files.copy(proj.resolve("mod/fabric/build/libs/nullprotect-fabric-${project.version}.jar"), output.resolve("NullProtect-Fabric-${project.version}.jar"), StandardCopyOption.REPLACE_EXISTING)
}
}