mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-21 04:22:09 +00:00
Upgradle and buildscript overhaul. Also remove thumbs
This commit is contained in:
1 parent
766aa180ae
commit
c2cda68415
19 files changed
+92
-39
No files matched your search
+17
-11
@@ -1,17 +1,23 @@
|
||||
.gradle/
|
||||
build/
|
||||
eclipse/
|
||||
out/
|
||||
asm/*
|
||||
#General use .gitignore for Minecraft modding.
|
||||
|
||||
#Folders
|
||||
/.gradle/*
|
||||
/build/*
|
||||
/eclipse/*
|
||||
/run/*
|
||||
/out/*
|
||||
/asm/*
|
||||
/bin/*
|
||||
/libs/*
|
||||
|
||||
#File Extensions
|
||||
*.psd
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
*.psd
|
||||
/bin
|
||||
*.psd
|
||||
*.classpath
|
||||
*.project
|
||||
/bin
|
||||
libs/*
|
||||
MCFPost.txt
|
||||
|
||||
#Specific files
|
||||
MCFPost.txt
|
||||
Thumbs.db
|
||||
+65
-26
@@ -1,46 +1,85 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
}
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
}
|
||||
maven { url = "http://files.minecraftforge.net/maven" }
|
||||
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
||||
classpath 'org.ajoberstar:gradle-git:0.10.1'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "1.7.10-1.1.4Beta3"
|
||||
group= ""
|
||||
archivesBaseName = "ElectroMagicTools"
|
||||
ext.configFile = file "build.properties"
|
||||
configFile.withReader {
|
||||
def prop = new Properties()
|
||||
prop.load(it)
|
||||
project.ext.config = new ConfigSlurper().parse prop
|
||||
}
|
||||
|
||||
version = config.mc_version + "-" + config.mod_version + "-" + config.build_number
|
||||
group= config.package_group
|
||||
archivesBaseName = config.mod_name
|
||||
|
||||
import org.ajoberstar.grgit.Grgit
|
||||
|
||||
def gitHash = 'unknown'
|
||||
if (new File(projectDir, '.git').exists()) {
|
||||
def repo = Grgit.open(project.file('.'))
|
||||
gitHash = repo.log().find().abbreviatedId
|
||||
}
|
||||
|
||||
minecraft {
|
||||
version = "1.7.10-10.13.0.1208"
|
||||
assetDir = "eclipse/assets"
|
||||
version = config.mc_version + "-" + config.forge_version
|
||||
runDir = "run"
|
||||
|
||||
if (project.hasProperty('mappings_version'))
|
||||
mappings = project.mappings_version
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: '*.jar')
|
||||
}
|
||||
processResources
|
||||
{
|
||||
// replace stuff in mcmod.info, nothing else
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
inputs.property "mcversion", project.minecraft.version
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'mcmod.info'
|
||||
|
||||
// replace version and mcversion
|
||||
expand 'version':project.version, 'mcversion':project.minecraft.version
|
||||
include '**/*.info'
|
||||
include '**/*.properties'
|
||||
|
||||
expand 'version': project.version, 'mcversion': project.minecraft.version
|
||||
}
|
||||
|
||||
// copy everything else, thats not the mcmod.info
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info'
|
||||
exclude '**/*.info'
|
||||
exclude '**/*.properties'
|
||||
exclude '**/*.db'
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
dependsOn "incrementBuildNumber"
|
||||
manifest.mainAttributes(
|
||||
"Built-By": System.getProperty('user.name'),
|
||||
"Created-By": "${System.getProperty('java.vm.version')} + (${System.getProperty('java.vm.vendor')})",
|
||||
"Implementation-Title": project.name,
|
||||
"Implementation-Version": project.version,
|
||||
"Git-Hash": gitHash
|
||||
)
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) { task ->
|
||||
task.options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
task("incrementBuildNumber") {
|
||||
// increment build number
|
||||
doFirst {
|
||||
// increment
|
||||
config.build_number = (config.build_number.toString().toInteger()) + 1
|
||||
|
||||
// write back to the file
|
||||
configFile.withWriter {
|
||||
config.toProperties().store(it, "")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#
|
||||
#Sat Sep 27 14:31:53 PDT 2014
|
||||
package_group=com.tombenpotter.emt
|
||||
mc_version=1.7.10
|
||||
forge_version=10.13.1.1217
|
||||
build_number=2
|
||||
mod_version=1.1.4
|
||||
mod_name=ElectroMagicTools
|
||||
Binary file not shown.
Vendored
BIN
Binary file not shown.
+2
-2
@@ -1,6 +1,6 @@
|
||||
#Wed Jul 02 15:54:47 CDT 2014
|
||||
#Fri Sep 26 11:20:52 CDT 2014
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip
|
||||
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user