-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
51 lines (44 loc) · 1.31 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
plugins {
id("parent-logic")
}
defaultTasks = arrayListOf("build", "publishToMavenLocal")
allprojects {
group = "com.pg85.otg"
version = "1.20-0.0.30"
description = "Open Terrain Generator: Generate anything!"
}
subprojects {
apply(plugin = "base-conventions")
repositories {
mavenCentral()
}
}
val universalJar = tasks.register<Jar>("universalJar") {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
destinationDirectory.set(layout.buildDirectory.dir("distributions"))
archiveFileName.set("OpenTerrainGenerator-Universal-" + project.version + ".jar")
}
tasks.build {
dependsOn(universalJar)
}
listOf(
project(":platforms:paper"),
//project(":platforms:forge"),
// project(":platforms:fabric"),
).forEach { proj ->
proj.afterEvaluate {
// Show more errors in intellij
proj.tasks.withType<JavaCompile>() {
options.compilerArgs.add("-Xmaxerrs")
options.compilerArgs.add("5000")
}
universalJar {
val tree = zipTree(proj.the<OTGPlatformExtension>().productionJar)
from(tree)
val manifestFile = tree.elements.map { files ->
files.find { it.asFile.path.endsWith("META-INF/MANIFEST.MF") }!!
}
manifest.from(manifestFile)
}
}
}