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

Commit

Permalink
Pull minecraft version from ForgeGradle if it is applied. Also add de…
Browse files Browse the repository at this point in the history
…bug option that stops just short of actually uploading the file
  • Loading branch information
matthewprenger committed Apr 13, 2015
1 parent 45e9647 commit e5e38f2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class CurseExtension {

final Collection<CurseProject> curseProjects = new ArrayList<>()

boolean debug = false

/**
* Define a new CurseForge project for deployment
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ class CurseUploadTask extends DefaultTask {
}

int uploadFile(String json, File file) throws IOException, URISyntaxException {

if (project.extensions.getByName(CurseGradlePlugin.EXTENSION_NAME).debug) {
logger.lifecycle("DEBUG: File: $file Json: $json")
return 0
}

int fileID
final String uploadUrl = String.format(CurseGradlePlugin.UPLOAD_URL, projectId)
log.info("Uploading file: {} to url: {} with json: {}", file, uploadUrl, json)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class Integration {
}

curseProject.uploadTask.dependsOn reobfTask

curseProject.addGameVersion(project.extensions.minecraft.version)
}
}
}

0 comments on commit e5e38f2

Please sign in to comment.