Last active
November 11, 2015 21:24
-
-
Save robrotheram/f081718cc5cadd7d13e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
maven { | |
name = "forge" | |
url = "http://files.minecraftforge.net/maven" | |
} | |
maven { | |
name = "sonatype" | |
url = "https://oss.sonatype.org/content/repositories/snapshots/" | |
} | |
} | |
dependencies { | |
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' | |
} | |
} | |
apply plugin: 'forge' | |
version = "1.0" | |
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html | |
archivesBaseName = "modid" | |
minecraft { | |
version = "1.7.10-10.13.4.1448-1.7.10" | |
runDir = "eclipse" | |
} | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile group: "org.apache.commons", name: "commons-dbcp2", version: "2.0.1" | |
compile group: "mysql", name: "mysql-connector-java", version: "5.1.34" | |
} | |
processResources | |
{ | |
// this will ensure that this task is redone when the versions change. | |
inputs.property "version", project.version | |
inputs.property "mcversion", project.minecraft.version | |
// replace stuff in mcmod.info, nothing else | |
from(sourceSets.main.resources.srcDirs) { | |
include 'mcmod.info' | |
// replace version and mcversion | |
expand 'version':project.version, 'mcversion':project.minecraft.version | |
} | |
// copy everything else, thats not the mcmod.info | |
from(sourceSets.main.resources.srcDirs) { | |
exclude 'mcmod.info' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment