Skip to content

Commit efe5b13

Browse files
committed
Switch to Kotlin Gradle DSL
1 parent 5924ce4 commit efe5b13

3 files changed

Lines changed: 118 additions & 106 deletions

File tree

build.gradle

Lines changed: 0 additions & 105 deletions
This file was deleted.

build.gradle.kts

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
plugins {
2+
id("fabric-loom") version "1.14-SNAPSHOT"
3+
id("maven-publish")
4+
}
5+
6+
base {
7+
archivesName = properties["archives_name"] as String
8+
version = properties["mod_version"] as String
9+
group = properties["maven_group"] as String
10+
}
11+
12+
configurations.all {
13+
// Check for snapshots more frequently than Gradle's default of 1 day. 0 = every build.
14+
resolutionStrategy.cacheChangingModulesFor(0, "seconds")
15+
}
16+
17+
repositories {
18+
maven {
19+
url = uri("https://jm.gserv.me/repository/maven-public/")
20+
content {
21+
includeGroup("info.journeymap")
22+
}
23+
}
24+
maven {
25+
url = uri("https://api.modrinth.com/maven/")
26+
content {
27+
includeGroup("maven.modrinth")
28+
}
29+
}
30+
maven {
31+
url = uri("https://www.cursemaven.com")
32+
}
33+
maven {
34+
url = uri("https://masa.dy.fi/maven")
35+
}
36+
// YACL
37+
maven {
38+
url = uri("https://maven.isxander.dev/releases")
39+
}
40+
// YACL Snapshots
41+
maven {
42+
name = "Xander Snapshot Maven"
43+
url = uri("https://maven.isxander.dev/snapshots")
44+
}
45+
// Where Is It, JackFredLib
46+
maven {
47+
url = uri("https://maven.jackf.red/releases/")
48+
// Meteor Client
49+
}
50+
maven {
51+
name = "meteor-maven"
52+
url = uri("https://maven.meteordev.org/releases")
53+
}
54+
maven {
55+
name = "meteor-maven-snapshots"
56+
url = uri("https://maven.meteordev.org/snapshots")
57+
}
58+
mavenCentral()
59+
gradlePluginPortal()
60+
}
61+
62+
dependencies {
63+
// Fabric
64+
minecraft("com.mojang:minecraft:${properties["minecraft_version"] as String}")
65+
mappings("net.fabricmc:yarn:${properties["yarn_mappings"] as String}:v2")
66+
modImplementation("net.fabricmc:fabric-loader:${properties["loader_version"] as String}")
67+
68+
// Fabric API
69+
modImplementation("net.fabricmc.fabric-api:fabric-api:${properties["fabric_version"] as String}")
70+
71+
// Mixin extras
72+
annotationProcessor("io.github.llamalad7:mixinextras-fabric:0.5.0")
73+
74+
// Meteor Client
75+
modImplementation(files("libs\\baritone-unoptimized-fabric-1.15.0-2-gf7a53504.jar"))
76+
modImplementation("meteordevelopment:meteor-client:${properties["minecraft_version"] as String}-SNAPSHOT")
77+
implementation("org.meteordev:starscript:0.2.5")
78+
implementation("meteordevelopment:orbit:0.2.4")
79+
80+
// Xaero's Mods
81+
modCompileOnly("maven.modrinth:xaeros-world-map:${properties["xwm_fabric_version"] as String}") // Xaero's World Map
82+
modCompileOnly("maven.modrinth:xaeros-minimap:${properties["xmm_fabric_version"] as String}") // Xaero's Minimap
83+
84+
// Chest Tracker
85+
modImplementation("red.jackf:whereisit:${properties["where_is_it_version"] as String}")
86+
}
87+
88+
loom {
89+
accessWidenerPath = file("src/main/resources/meteorplus.accesswidener")
90+
}
91+
92+
tasks {
93+
processResources {
94+
val propertyMap = mapOf(
95+
"version" to project.version,
96+
"mc_version" to project.property("minecraft_version"),
97+
"gh_hash" to (System.getenv("GITHUB_SHA") ?: ""),
98+
)
99+
100+
filesMatching("fabric.mod.json") {
101+
expand (propertyMap)
102+
}
103+
}
104+
jar {
105+
val licenseSuffix = project.base.archivesName.get()
106+
from("LICENSE") {
107+
rename { "${it}_${licenseSuffix}" }
108+
}
109+
}
110+
java {
111+
sourceCompatibility = JavaVersion.VERSION_21
112+
targetCompatibility = JavaVersion.VERSION_21
113+
}
114+
withType<JavaCompile> {
115+
options.encoding = "UTF-8"
116+
options.release = 21
117+
}
118+
}

gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ org.gradle.jvmargs=-Xmx4G
44
minecraft_version=1.21.11
55
yarn_mappings=1.21.11+build.3
66
loader_version=0.18.2
7-
loom_version=1.14-SNAPSHOT
87

98
# Fabric API
109
fabric_version=0.139.5+1.21.11

0 commit comments

Comments
 (0)