Skip to content

Commit

Permalink
ci: drop cursegradle plugin and use curseuploadpy
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTJP committed Dec 9, 2024
1 parent cfaf2c5 commit 6666c50
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 147 deletions.
3 changes: 2 additions & 1 deletion .github/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
fire==0.4.0
fire==0.4.0
curseuploadpy @ git+https://github.com/MrTJP/curseuploadpy.git@dev
36 changes: 34 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,41 @@ jobs:

- name: Curse publish
if: ${{ steps.release_type.outputs.publish_curse == 'true' }}
run: ./gradlew curseforge
run: |
# Base args for all modules
COMMON_ARGS=( \
-k $CURSE_TOKEN \
-rt $CURSE_RELEASE_TYPE \
-v 'Java 17' \
-v 1.20.1 \
-v Forge \
-c ./CHANGELOG.md \
--required-dep codechicken-lib-1-8 \
--required-dep cb-multipart \
)
# All submodules need PR Core
MODULE_ARGS=( \
"${COMMON_ARGS[@]}" \
--required-dep project-red-core \
)
# Fabrication is special and also needs Integration and Transmission
FAB_ARGS=( \
"${MODULE_ARGS[@]}" \
--required-dep project-red-integration \
--required-dep project-red-transmission \
)
python -m curseuploadpy "${COMMON_ARGS[@]}" -p 228702 -f core/build/libs/*-core.jar
python -m curseuploadpy "${MODULE_ARGS[@]}" -p 229048 -f expansion/build/libs/*-expansion.jar
python -m curseuploadpy "${MODULE_ARGS[@]}" -p 229049 -f exploration/build/libs/*-exploration.jar
python -m curseuploadpy "${FAB_ARGS[@]}" -p 230111 -f fabrication/build/libs/*-fabrication.jar
python -m curseuploadpy "${MODULE_ARGS[@]}" -p 229046 -f illumination/build/libs/*-illumination.jar
python -m curseuploadpy "${MODULE_ARGS[@]}" -p 229045 -f integration/build/libs/*-integration.jar
python -m curseuploadpy "${MODULE_ARGS[@]}" -p 478939 -f transmission/build/libs/*-transmission.jar
env:
AUTO_GENERATED_VERSION: ${{ steps.versioning.outputs.version }}
CURSE_RELEASE_TYPE: ${{ steps.release_type.outputs.release_type }}
CURSE_TOKEN: ${{ secrets.CURSE_TOKEN }}

Expand Down
21 changes: 0 additions & 21 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id 'net.neoforged.gradle'
id 'com.matthewprenger.cursegradle'
}

String mod_id = 'projectred_core'
Expand Down Expand Up @@ -46,23 +45,3 @@ dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
}

curseforge {
apiKey = System.getenv('CURSE_TOKEN') ?: 'XXX'

// Core
project {
id = '228702'
releaseType = System.getenv('CURSE_RELEASE_TYPE') ?: 'alpha'
changelogType = 'markdown'
changelog = rootProject.file('CHANGELOG.md')
relations {
requiredDependency 'codechicken-lib-1-8' // CCL is required for everything
requiredDependency 'cb-multipart' // CBMultipart is required for everything
}

// Java/ForgeGradle integrations don't work after 1.18.2 port
addGameVersion "${mc_version}"
addGameVersion "Java ${java_lang_version}"
}
}
20 changes: 0 additions & 20 deletions expansion/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id 'net.neoforged.gradle'
id 'com.matthewprenger.cursegradle'
id 'org.spongepowered.mixin'
}

Expand Down Expand Up @@ -45,22 +44,3 @@ mixin {
debug.verbose = true
debug.export = true
}

curseforge {
apiKey = System.getenv('CURSE_TOKEN') ?: 'XXX'

// Expansion
project {
id = '229048'
releaseType = System.getenv('CURSE_RELEASE_TYPE') ?: 'alpha'
changelogType = 'markdown'
changelog = rootProject.file('CHANGELOG.md')
relations {
requiredDependency 'project-red-core'
}

// Java/ForgeGradle integrations don't work after 1.18.2 port
addGameVersion "${mc_version}"
addGameVersion "Java ${java_lang_version}"
}
}
20 changes: 0 additions & 20 deletions exploration/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id 'net.neoforged.gradle'
id 'com.matthewprenger.cursegradle'
}

String mod_id = 'projectred_exploration'
Expand Down Expand Up @@ -33,22 +32,3 @@ dependencies {

implementation project(":core")
}

curseforge {
apiKey = System.getenv('CURSE_TOKEN') ?: 'XXX'

// Exploration
project {
id = '229049'
releaseType = System.getenv('CURSE_RELEASE_TYPE') ?: 'alpha'
changelogType = 'markdown'
changelog = rootProject.file('CHANGELOG.md')
relations {
requiredDependency 'project-red-core'
}

// Java/ForgeGradle integrations don't work after 1.18.2 port
addGameVersion "${mc_version}"
addGameVersion "Java ${java_lang_version}"
}
}
22 changes: 0 additions & 22 deletions fabrication/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id 'net.neoforged.gradle'
id 'com.matthewprenger.cursegradle'
id 'com.github.johnrengelman.shadow'
}

Expand Down Expand Up @@ -58,24 +57,3 @@ reobf {
jar { enabled = false } // Disable unshaded jar
shadowJar { } // Enable shadow jar reobf
}

curseforge {
apiKey = System.getenv('CURSE_TOKEN') ?: 'XXX'

// Fabrication
project {
id = '230111'
releaseType = System.getenv('CURSE_RELEASE_TYPE') ?: 'alpha'
changelogType = 'markdown'
changelog = rootProject.file('CHANGELOG.md')
relations {
requiredDependency 'project-red-core'
requiredDependency 'project-red-integration'
requiredDependency 'project-red-transmission'
}

// Java/ForgeGradle integrations don't work after 1.18.2 port
addGameVersion "${mc_version}"
addGameVersion "Java ${java_lang_version}"
}
}
20 changes: 0 additions & 20 deletions illumination/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id 'net.neoforged.gradle'
id 'com.matthewprenger.cursegradle'
}

String mod_id = 'projectred_illumination'
Expand Down Expand Up @@ -33,22 +32,3 @@ dependencies {

implementation project(":core")
}

curseforge {
apiKey = System.getenv('CURSE_TOKEN') ?: 'XXX'

// Illumination
project {
id = '229046'
releaseType = System.getenv('CURSE_RELEASE_TYPE') ?: 'alpha'
changelogType = 'markdown'
changelog = rootProject.file('CHANGELOG.md')
relations {
requiredDependency 'project-red-core'
}

// Java/ForgeGradle integrations don't work after 1.18.2 port
addGameVersion "${mc_version}"
addGameVersion "Java ${java_lang_version}"
}
}
20 changes: 0 additions & 20 deletions integration/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id 'net.neoforged.gradle'
id 'com.matthewprenger.cursegradle'
}

String mod_id = 'projectred_integration'
Expand Down Expand Up @@ -33,22 +32,3 @@ dependencies {

implementation project(":core")
}

curseforge {
apiKey = System.getenv('CURSE_TOKEN') ?: 'XXX'

// Integration
project {
id = '229045'
releaseType = System.getenv('CURSE_RELEASE_TYPE') ?: 'alpha'
changelogType = 'markdown'
changelog = rootProject.file('CHANGELOG.md')
relations {
requiredDependency 'project-red-core'
}

// Java/ForgeGradle integrations don't work after 1.18.2 port
addGameVersion "${mc_version}"
addGameVersion "Java ${java_lang_version}"
}
}
1 change: 0 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ pluginManagement {
id 'java'
id 'maven-publish'
id 'net.covers1624.signing' version '1.1.3' apply false
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
id 'net.neoforged.gradle' version '[6.0.18,6.2)' apply false
id 'org.spongepowered.mixin' version '0.7.+' apply false
id 'com.github.johnrengelman.shadow' version '7.1.+' apply false
Expand Down
20 changes: 0 additions & 20 deletions transmission/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id 'net.neoforged.gradle'
id 'com.matthewprenger.cursegradle'
}

String mod_id = 'projectred_transmission'
Expand Down Expand Up @@ -33,22 +32,3 @@ dependencies {

implementation project(":core")
}

curseforge {
apiKey = System.getenv('CURSE_TOKEN') ?: 'XXX'

// Transmission
project {
id = '478939'
releaseType = System.getenv('CURSE_RELEASE_TYPE') ?: 'alpha'
changelogType = 'markdown'
changelog = rootProject.file('CHANGELOG.md')
relations {
requiredDependency 'project-red-core'
}

// Java/ForgeGradle integrations don't work after 1.18.2 port
addGameVersion "${mc_version}"
addGameVersion "Java ${java_lang_version}"
}
}

0 comments on commit 6666c50

Please sign in to comment.