-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.gradle
More file actions
106 lines (90 loc) · 2.63 KB
/
build.gradle
File metadata and controls
106 lines (90 loc) · 2.63 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
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
104
105
106
/////////////////////////////
// BuildScript and Plugins //
/////////////////////////////
plugins {
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
id 'org.jetbrains.kotlin.jvm' version "${kotlin_version}"
id 'org.jetbrains.kotlin.plugin.serialization' version "${kotlin_version}"
id 'org.jetbrains.dokka' version "1.9.10"
}
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
compileKotlin {
kotlinOptions.jvmTarget = "17"
}
version = "${minecraft_version}-${mod_version}"
//////////////////
// Dependencies //
//////////////////
repositories {
maven {
name 'Kotlin for Forge'
url 'https://thedarkcolour.github.io/KotlinForForge/'
content { includeGroup "thedarkcolour" }
}
}
dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
implementation "thedarkcolour:kotlinforforge:${kotlinforforge_version}"
}
minecraft {
mappings channel: mappings_channel, version: mappings_version
runs {
client {
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
property 'forge.enabledGameTestNamespaces', 'betterrecords'
workingDirectory project.file('run')
mods {
betterrecords {
source sourceSets.main
}
}
}
server {
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
property 'forge.enabledGameTestNamespaces', 'betterrecords'
workingDirectory project.file('run')
mods {
betterrecords {
source sourceSets.main
}
}
}
}
}
///////////////
// Artifacts //
//////////////
def replacedProperties = [
version: version,
loader_range: loader_range,
forge_range: forge_range,
minecraft_range: minecraft_range,
]
processResources {
inputs.properties(replacedProperties)
filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
expand(replacedProperties)
}
}
task deobfJar(type: Jar) {
from sourceSets.main.output
//noinspection GroovyAccessibility
archiveClassifier = 'deobf'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
//noinspection GroovyAccessibility
archiveClassifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
//noinspection GroovyAccessibility
archiveClassifier = 'javadoc'
}
artifacts {
archives deobfJar
archives sourcesJar
archives javadocJar
}