mirror of
https://github.com/GTNewHorizons/bdlib.git
synced 2026-11-13 16:54:11 +00:00
Switched to use the token replacement in forgegradle
This commit is contained in:
1 parent
377fe3c27a
commit
b6fe2dc14d
3 files changed
+6
-27
No files matched your search
+3
-24
@@ -1,10 +1,6 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = "bdew"
|
||||
url = "http://jenkins.bdew.net/maven"
|
||||
}
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
@@ -32,11 +28,11 @@ ext.versuffix = "mc164"
|
||||
|
||||
minecraft {
|
||||
version = "1.6.4-9.11.1.964"
|
||||
replace("BDLIB_VER", project.version)
|
||||
}
|
||||
|
||||
import org.apache.tools.ant.filters.ReplaceTokens
|
||||
|
||||
def myTokens = [BdLibVer: project.version]
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
@@ -47,30 +43,13 @@ sourceSets {
|
||||
srcDir 'resources'
|
||||
}
|
||||
}
|
||||
processed {
|
||||
scala {
|
||||
srcDir 'build/stage'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task stage(type: Sync) {
|
||||
inputs.property "tokens", myTokens
|
||||
from sourceSets.main.scala
|
||||
into 'build/stage'
|
||||
filter(ReplaceTokens, tokens: myTokens)
|
||||
}
|
||||
|
||||
compileScala {
|
||||
source = sourceSets.processed.scala
|
||||
dependsOn stage
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "tokens", myTokens
|
||||
inputs.property "tokens", minecraft.replacements
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'mcmod.info'
|
||||
filter(ReplaceTokens, tokens: myTokens)
|
||||
filter(ReplaceTokens, tokens: minecraft.replacements)
|
||||
}
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"modid": "bdlib",
|
||||
"name": "BD Lib",
|
||||
"description": "",
|
||||
"version": "@BdLibVer@",
|
||||
"version": "@BDLIB_VER@",
|
||||
"url": "bdew.net/mods/",
|
||||
"updateUrl": "",
|
||||
"authorList": [
|
||||
|
||||
@@ -3,9 +3,9 @@ package net.bdew.lib
|
||||
import cpw.mods.fml.common.Mod
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent
|
||||
|
||||
@Mod(modid = "bdlib", version = "@BdLibVer@", modLanguage = "scala")
|
||||
@Mod(modid = "bdlib", name="BD lib", version = "BDLIB_VER", modLanguage = "scala")
|
||||
object BdLib {
|
||||
def preInit(ev: FMLPreInitializationEvent) {
|
||||
ev.getModLog.info("bdlib @BdLibVer@ loaded")
|
||||
ev.getModLog.info("bdlib BDLIB_VER loaded")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user