Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
48 lines (44 loc) · 1.86 KB
/
Copy pathbuild.gradle
File metadata and controls
48 lines (44 loc) · 1.86 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
def guardianVersion = rootProject.providers.gradleProperty('guardianVersion').orElse('1.0.2').get()
def semVerPattern = ~/^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:-((?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(?:\.(?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/
if (!(guardianVersion ==~ semVerPattern)) {
throw new GradleException(
"Guardian version '$guardianVersion' is not valid SemVer (expected MAJOR.MINOR.PATCH with optional prerelease/build metadata)."
)
}
allprojects {
group = 'com.badwolfmc.guardian'
version = guardianVersion
repositories {
mavenCentral()
maven { url = 'https://repo.papermc.io/repository/maven-public/' }
maven { url = 'https://maven.fabricmc.net/' }
maven { url = 'https://repo.opencollab.dev/main/' }
}
}
subprojects {
plugins.withType(JavaPlugin).configureEach {
java {
toolchain.languageVersion = JavaLanguageVersion.of(25)
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
}
tasks.withType(JavaCompile).configureEach {
options.release = 25
options.encoding = 'UTF-8'
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
tasks.withType(org.gradle.api.tasks.bundling.AbstractArchiveTask).configureEach {
preserveFileTimestamps = false
reproducibleFileOrder = true
}
}
}
// Keep the repository wrapper authoritative. Build this project with ./gradlew
// (or gradlew.bat on Windows), not an arbitrary system Gradle installation.
tasks.named('wrapper') {
gradleVersion = '9.7.1'
distributionType = Wrapper.DistributionType.BIN
distributionSha256Sum = 'acd53f1edaf02f1a8ff99879f8a34b302661a057d9b063ae9e35b552f804d20a'
}