-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
115 lines (101 loc) · 2.55 KB
/
build.gradle
File metadata and controls
115 lines (101 loc) · 2.55 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
107
108
109
110
111
112
113
114
115
plugins {
id "net.neoforged.moddev.legacyforge"
id "maven-publish"
id 'com.palantir.git-version' version '3.1.0'
id 'org.jetbrains.kotlin.jvm' version '2.1.21'
id 'org.jetbrains.kotlin.plugin.serialization' version '2.1.21'
}
version = gitVersion()
group = mod_group
archivesBaseName = archive_name
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
repositories {
mavenLocal()
mavenCentral()
maven {
name = "ModMaven"
url = "https://modmaven.dev/"
}
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
maven {
name = "CurseMaven"
url = "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}
maven {
name = "Kotlin for Forge"
url = "https://thedarkcolour.github.io/KotlinForForge/"
content {
includeGroup "thedarkcolour"
}
}
maven {
name = "SpongePowered"
url = "https://repo.spongepowered.org/repository/maven-public/"
}
}
dependencies {
// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.1.21"
implementation "thedarkcolour:kotlinforforge:4.12.0"
// Mixin
annotationProcessor "org.spongepowered:mixin:0.8.7:processor"
// macOS ARM native bridge for dev environment
if (System.getProperty("os.name").contains("Mac")) {
runtimeOnly "ca.weblite:java-objc-bridge:1.1"
}
}
kotlin {
jvmToolchain(17)
}
legacyForge {
version = "${minecraft_version}-${forge_version}"
mods {
"${id}" {
sourceSet sourceSets.main
}
}
runs {
configureEach {
gameDirectory = project.file('run')
}
client {
client()
}
server {
server()
}
}
}
processResources {
def props = [
"id": project.property("id"),
"name": project.property("name"),
"version": version.toString(),
"group": project.group.toString(),
"description": project.property("description"),
"author": project.property("author"),
"source": project.property("source"),
"minecraft_version_range": minecraft_version_range,
"forge_version_range": forge_version_range
]
inputs.properties(props)
filesMatching(["META-INF/mods.toml", "META-INF/MANIFEST.MF"]) {
expand props
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}