-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
41 lines (31 loc) · 982 Bytes
/
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
import java.nio.file.Files
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
//Load buildcode
File buildCodeFile = project.rootDir.toPath().resolve("buildcode.properties").toFile()
int buildcode = Files.exists(buildCodeFile.toPath()) ? Integer.valueOf(Files.readString(buildCodeFile.toPath())) + 1 : 0
group 'me.ryun.plugintools'
version '1.1.0-b' + String.valueOf(buildcode)
repositories {
mavenCentral()
maven {
url "https://repo.papermc.io/repository/maven-public/"
}
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
compileOnly('io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT')
implementation("org.yaml:snakeyaml:2.0")
}
shadowJar {
archiveClassifier.set('')
doLast {
Files.write(buildCodeFile.toPath(), String.valueOf(buildcode).getBytes("UTF-8"))
}
}
test {
useJUnitPlatform()
}