Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
65 lines (55 loc) · 1.54 KB
/
Copy pathbuild.gradle
File metadata and controls
65 lines (55 loc) · 1.54 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
// RegionWorld - Multi-Module Build Configuration
allprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
group = 'fun.mntale'
version = '2.0.0'
repositories {
mavenCentral()
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
maven {
name = 'Mojang'
url = 'https://libraries.minecraft.net/'
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withSourcesJar()
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.release.set(21)
options.compilerArgs += ['-Xlint:all', '-Xlint:-processing', '-Xlint:-serial']
options.deprecation = true
options.warnings = true
}
}
// Common dependencies for all subprojects
subprojects {
dependencies {
// Logging
implementation 'org.slf4j:slf4j-api:2.0.9'
// JSON handling
implementation 'com.google.code.gson:gson:2.10.1'
// Testing
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.0'
}
test {
useJUnitPlatform()
}
}
// Root project tasks
tasks.register('buildAll') {
dependsOn subprojects.collect { it.tasks.build }
description = 'Build all modules'
}
// Make default build task build all subprojects
build {
dependsOn subprojects.collect { it.tasks.build }
}