Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamesuta committed Sep 25, 2016
1 parent 8facc8b commit c1e0e13
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
11 changes: 7 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ apply plugin: 'curseforge'
// ext.build = System.getenv().BUILD_NUMBER ?: 'git'
ext.modversion = "${project.version_major}.${project.version_minor}.${project.version_micro}"

group = 'com.kamesuta.mc'
group = project.group
version = "${project.version_minecraft}-${modversion}"
compileJava.options.encoding = 'UTF-8'

Expand All @@ -41,9 +41,11 @@ minecraft {
if (!project.hasProperty('run_location'))
runDir = 'run'
else
runDir = run_location.replace('{modid}', project.name).replace('{mcversion}', project.version_minecraft)
runDir = run_location.replace('{modid}', project.modid).replace('{mcversion}', project.version_minecraft)

replaceIn 'Reference.java'
replace '${modid}', project.modid
replace '${modname}', project.modname
replace '${version}', modversion
replace '${mcversion}', project.version_minecraft
replace '${forgeversion}', project.version_forge
Expand All @@ -58,7 +60,8 @@ processResources {
include 'mcmod.info'

expand([
'modid' : project.name,
'modid' : project.modid,
'modname' : project.modname,
'version' : modversion,
'mcversion' : project.version_minecraft,
'forgeversion' : project.version_forge,
Expand Down Expand Up @@ -152,7 +155,7 @@ task signJars(dependsOn: ['reobf', 'devJar', 'sourceJar', 'apiJar']) {
if (!project.hasProperty('release_location'))
ext.release_location = '.'
else
ext.release_location = release_location.replace('{modid}', project.name).replace('{mcversion}', project.version_minecraft).replace('{version}', version)
ext.release_location = release_location.replace('{modid}', project.modid).replace('{mcversion}', project.version_minecraft).replace('{version}', version)

task release(dependsOn: 'signJars', type: Copy) {
from project.tasks.jar.destinationDir
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
group=com.kamesuta.mc
modid=signpic
modname=SignPicture
version_major=2
version_minor=1
version_micro=5
Expand Down

0 comments on commit c1e0e13

Please sign in to comment.