forked from FabricCompatibilityLayers/MinecraftForge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
54 lines (44 loc) · 1.12 KB
/
build.gradle.kts
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
plugins {
`kotlin-dsl`
alias(libs.plugins.unimined)
alias(libs.plugins.spotless)
}
subprojects {
apply("plugin" to "xyz.wagyourtail.unimined")
apply("plugin" to "com.diffplug.spotless")
group = "net.minecraftforge"
base.archivesName = "forge"
version = "${rootProject.properties["version"]}+${project.name}"
unimined.useGlobalCache = false
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
spotless {
java {
licenseHeaderFile(File(rootProject.rootDir, "JAVA_HEADER"))
}
}
tasks.withType(JavaCompile::class.java).configureEach {
sourceCompatibility = "8"
targetCompatibility = "8"
}
tasks.withType(Javadoc::class.java).configureEach {
isFailOnError = false
exclude("net/minecraftforge/mixin/**.java")
configurations.all {
if (isCanBeResolved) classpath += this@all
}
sourceSets.all {
source += allJava
}
}
tasks.withType(ProcessResources::class.java).configureEach {
inputs.property("version", project.version)
filesMatching("*.mod.json") {
expand("version" to project.version)
}
}
}