-
Notifications
You must be signed in to change notification settings - Fork 91
/
build.gradle
103 lines (88 loc) · 2.32 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: 'com.diluv.schoomp', name: 'Schoomp', version: '1.2.6'
}
}
plugins {
id 'java'
id "org.jetbrains.kotlin.jvm"
id 'idea'
// This needs to be in the root
// https://github.com/FabricMC/fabric-loom/issues/612#issuecomment-1198444120
// Also it looks like property lookups don't work this early
id 'fabric-loom' version '1.6-SNAPSHOT' apply false
id("at.petra-k.PKPlugin") version "0.1.0-pre-87"
id("at.petra-k.PKSubprojPlugin") version "0.1.0-pre-87" apply false
}
repositories {
mavenCentral()
}
pkpcpbp {
modInfo {
modID(project.modID)
mcVersion(project.minecraftVersion)
modVersion(project.modVersion)
}
curseforgeInfo {
id 569849
stability "beta"
token(System.getenv("CURSEFORGE_TOKEN"))
}
modrinthInfo {
id "nTW3yKrm"
stability "beta"
token(System.getenv("MODRINTH_TOKEN"))
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
it.options.release = 17
}
// Disables Gradle's custom module metadata from being published to maven. The
// metadata includes mapped dependencies which are not reasonably consumable by
// other mod developers.
tasks.withType(GenerateModuleMetadata) {
enabled = false
}
sourceSets.main.kotlin.srcDirs += 'src/main/java'
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
java.withSourcesJar()
java.withJavadocJar()
processResources {
exclude '.cache'
}
sourcesJar {
duplicatesStrategy 'exclude'
}
}
allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "1000"
}
}
// disable most javadoc warnings
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
}
compileKotlin {
kotlinOptions {
jvmTarget = "17"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "17"
}
}
tasks.register("runAllDatagen") {
dependsOn ":Forge:runXplatDatagen"
dependsOn ":Forge:runForgeDatagen"
dependsOn ":Fabric:runDatagen"
}