@@ -31,6 +31,7 @@ apply from: 'gradle.properties'
3131
3232group = GROUP
3333archivesBaseName = ARCHIVE_NAME
34+ version = MAJORVERSION + " ." + MINORVERSION + " ." + REVISION
3435
3536targetCompatibility = ' 1.6'
3637sourceCompatibility = ' 1.6'
@@ -51,6 +52,12 @@ minecraft {
5152 // TODO(Baughn): After moving to 1.10, this should be replaced with the shadow plugin,
5253 // e.g. as used in https://github.com/Emberwalker/Laundarray/blob/master/build.gradle
5354 srgExtra " PK: org/apache/commons/math3 mods/eln/libs/org/apache/commons/math3"
55+
56+ replaceIn " Version.java"
57+ replace " @VERSION@" , project. version
58+ replace " @MAJORVERSION@" , MAJORVERSION
59+ replace " @MINORVERSION@" , MINORVERSION
60+ replace " @REVISION@" , REVISION
5461}
5562
5663configurations {
@@ -177,20 +184,6 @@ def getMinecratfDir() {
177184 return outDir
178185}
179186
180- task readVersion (type : JavaExec , dependsOn : classes) {
181- classpath configurations. runtime, sourceSets. main. output
182- main = " mods.eln.misc.Version"
183- standardOutput = new ByteArrayOutputStream ()
184- doLast {
185- project. setVersion(standardOutput. toString())
186- jar. manifest {
187- attributes ' Implementation-Version' : project. version
188- }
189- }
190- }
191-
192- jar. dependsOn(' readVersion' )
193-
194187// Custom task to build and copy the mod Jar to the default local Minecraft folder
195188task buildAndCopyJar (dependsOn : ' build' , type : Copy ) {
196189 group = ' ELN'
0 commit comments