Skip to content

Commit 4331307

Browse files
committed
simplified versioning and added ftb releases repository
1 parent f2cf016 commit 4331307

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

build.gradle

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ tasks.named('wrapper', Wrapper).configure {
1010
distributionType = Wrapper.DistributionType.BIN
1111
}
1212

13-
version = "${minecraft_version}.${mod_minor}.${mod_revision}"
13+
def mcMinorAndPatch = getMinorAndPatchFromMc()
14+
15+
version = "${mcMinorAndPatch}.${mod_version}"
1416
group = project.maven_group
1517

1618
base {
@@ -67,6 +69,12 @@ configurations {
6769
}
6870

6971
repositories {
72+
maven {
73+
url = "https://maven.ftb.dev/releases"
74+
content {
75+
includeGroup("dev.ftb.mods")
76+
}
77+
}
7078
maven {
7179
url = "https://maven.ftb.dev/snapshots"
7280
content {
@@ -127,6 +135,12 @@ idea {
127135
}
128136
}
129137

138+
def getMinorAndPatchFromMc() {
139+
String mcVersion = project.minecraft_version
140+
String[] split = mcVersion.split("\\.")
141+
return split[0] + "." + split[1] + "." + (split.length > 2 ? split[2] : "0")
142+
}
143+
130144
publishMods {
131145
def CFToken = providers.environmentVariable("CURSEFORGE_KEY");
132146

gradle.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ org.gradle.configuration-cache=true
66

77
mod_name=FTB Obsidian
88
mod_id=ftbobsidian
9-
mod_minor=0
10-
mod_revision=0
9+
mod_version=0
1110

1211
minecraft_version=26.1
1312
pack_format=84

0 commit comments

Comments
 (0)