Skip to content

Commit 9357248

Browse files
committed
Hook up publishing. WIP
1 parent 0e917d7 commit 9357248

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

build.gradle

+25-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ plugins {
1818
id "com.modrinth.minotaur" version "2.+"
1919
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
2020
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
21+
id "me.hypherionmc.modutils.modpublisher" version "1.+"
2122
}
2223

2324
apply plugin: 'org.spongepowered.mixin'
@@ -328,7 +329,7 @@ build.dependsOn tasks.jarJar
328329

329330
// TODO: Should trigger automated publishes using GitHub actions when a release is made.
330331

331-
if (modrinth_publish && (System.getenv("MODRINTH_TOKEN") != null || project.hasProperty('modrinthToken'))) {
332+
/*if (modrinth_publish && (System.getenv("MODRINTH_TOKEN") != null || project.hasProperty('modrinthToken'))) {
332333
modrinth {
333334
token = System.getenv("MODRINTH_TOKEN") ?: project.findProperty("modrinthToken")
334335
projectId = "${modrinth_projectId}"
@@ -351,6 +352,25 @@ if (modrinth_publish && (System.getenv("MODRINTH_TOKEN") != null || project.hasP
351352
optional.project "u6dRKJwZ"
352353
}
353354
}
355+
}*/
356+
357+
358+
publisher {
359+
apiKeys {
360+
curseforge = System.getenv("CURSEFORGE_TOKEN")
361+
modrinth = System.getenv("MODRINTH_TOKEN")
362+
}
363+
364+
debug = true // When enabled, no files will actually be uploaded
365+
curseID = curseforge_projectId
366+
modrinthID = modrinth_projectId
367+
versionType = release_type
368+
changelog = ""
369+
version = "${getVersionString()}"
370+
displayName = "Ender IO - ${getVersionString()}"
371+
gameVersions = [minecraft_version]
372+
loaders = ["forge"]
373+
artifact = tasks.jarJar
354374
}
355375

356376
publishing {
@@ -416,6 +436,10 @@ tasks.withType(JavaCompile).configureEach {
416436
// * enderio-1.19.1-6.2.1-nightly-4 :: nightly build no. 4 for version 6.2.1
417437
// * enderio-1.19.1-6.5.1-dev-c91c8ee6e :: dev (local) build for commit c91c8ee6e
418438
String getVersionString() {
439+
// We've configured TeamCity to give us build numbers;
440+
if (System.getenv('TEAMCITY_VERSION') != null)
441+
return "${System.getenv('BUILD_NUMBER')}-${project.release_type}"
442+
419443
def build_server = System.getenv('CI') != null || System.getenv('BUILD_NUMBER') != null
420444

421445
def version_patch_lc = project.version_patch

gradle.properties

+1-2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,5 @@ jade_cf_id=4614153
4848
# ===========================
4949

5050
# Modrinth support
51-
modrinth_publish = true
5251
modrinth_projectId = 49ZofO4f
53-
combi_modrinth_body = enderio-all.md
52+
curseforge_projectId = 64578

settings.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ pluginManagement {
33
gradlePluginPortal()
44
maven { url = 'https://maven.minecraftforge.net/' }
55
maven { url = 'https://maven.parchmentmc.org' }
6+
maven { url "https://maven.firstdarkdev.xyz/releases" }
67
}
78
}
89

0 commit comments

Comments
 (0)