Skip to content

Commit

Permalink
Jenkins will now publish to curseforge
Browse files Browse the repository at this point in the history
  • Loading branch information
LunNova committed Jun 20, 2017
1 parent 64ff2e8 commit 14eec30
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ buildscript {
classpath 'org.minimallycorrect.libloader:LibLoaderGradle:0.1-SNAPSHOT'
}
}
plugins {
id "com.matthewprenger.cursegradle" version "1.0.9"
}
apply plugin: 'org.minimallycorrect.libloader.LibLoaderGradle'
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'idea'
Expand Down Expand Up @@ -72,6 +75,11 @@ tasks.withType(JavaCompile) {
}
}

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}

minecraft {
version = "${project.mcVersion}-${project.forgeVersion}"
runDir = "run"
Expand Down Expand Up @@ -108,3 +116,16 @@ wrapper {
batchScript.write batchScript.text.replace("set $optsEnvVar=", "set $optsEnvVar=$jvmOpts")
}
}

if (System.getenv("CURSEFORGE_API_KEY") != null) {
curseforge {
apiKey = System.getenv("CURSEFORGE_API_KEY") // This should really be in a gradle.properties file
project {
id = "270330"
changelog = "git log -1 --pretty=%B".execute()
releaseType = "beta"
addArtifact jar
addArtifact sourcesJar
}
}
}

0 comments on commit 14eec30

Please sign in to comment.