Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
Add support for the new modloader game version type. Default to Forge…
Browse files Browse the repository at this point in the history
… if ForgeGradle is detected.

Resolves #26
  • Loading branch information
matthewprenger committed Aug 13, 2019
1 parent 4b68ee5 commit 41bda32
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ext {
url = 'https://github.com/matthewprenger/CurseGradle'
}

version = '1.3.0'
version = '1.4.0'
group = 'com.matthewprenger'
description = 'Gradle plugin to upload artifacts to CurseForge'
archivesBaseName = 'CurseGradle'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class CurseVersions {
//noinspection GroovyAssignabilityCheck
VersionType[] types = Util.gson.fromJson(versionTypesJson, VersionType[].class)
types.each { type ->
if (type.slug.startsWith('minecraft') || type.slug == 'java') {
if (type.slug.startsWith('minecraft') || type.slug == 'java' || type.slug == 'modloader') {
validVersionTypes.add(type.id)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ class Integration {
if (project.minecraft.hasProperty('version')) {
log.info 'Found Minecraft version in FG < 3'
curseProject.addGameVersion(project.minecraft.version)
curseProject.addGameVersion('Forge')
} else if (project.getExtensions().getExtraProperties().has('MC_VERSION')) {
log.info 'Found Minecraft version in FG >= 3'
curseProject.addGameVersion(project.getExtensions().getExtraProperties().get('MC_VERSION'))
curseProject.addGameVersion('Forge')
} else {
log.warn 'Unable to extract Minecraft version from ForgeGradle'
}
Expand Down

0 comments on commit 41bda32

Please sign in to comment.