11buildscript {
2- repositories {
3- jcenter()
4- maven { url = " http://files.minecraftforge.net/maven" }
5- }
6- dependencies {
7- classpath ' net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
8- }
2+ repositories {
3+ jcenter()
4+ maven { url = " http://files.minecraftforge.net/maven" }
5+ }
6+ dependencies {
7+ classpath ' net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
8+ }
99}
10+
1011apply plugin : ' net.minecraftforge.gradle.forge'
12+
1113// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
1214
1315
14- version = " 1.12.2-0.7.1e "
15- group = " com.ferreusveritas.dynamictrees " // http://maven.apache.org/guides/mini/guide-naming-conventions.html
16- archivesBaseName = " DynamicTrees "
16+ version = " ${ mc_version } - ${ mod_version } "
17+ group = package_group
18+ archivesBaseName = mod_name
1719
1820sourceCompatibility = targetCompatibility = ' 1.8' // Need this here so eclipse task generates correctly.
1921compileJava {
20- sourceCompatibility = targetCompatibility = ' 1.8'
22+ sourceCompatibility = targetCompatibility = ' 1.8'
2123}
2224
2325minecraft {
24- version = " 1.12.2-14.23.1.2555 "
25- runDir = " run"
26-
27- // the mappings can be changed at any time, and must be in the following format.
28- // snapshot_YYYYMMDD snapshot are built nightly.
29- // stable_# stables are built at the discretion of the MCP team.
30- // Use non-default mappings at your own risk. they may not always work.
31- // simply re-run your setup task after changing the mappings to update your workspace.
32- mappings = " snapshot_20170624 "
33- // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
26+ version = " ${ mc_version } - ${ forge_version } "
27+ runDir = " run"
28+
29+ replace " @VERSION@ " , project . version
30+ replaceIn " ModConstants.java "
31+
32+ makeObfSourceJar = false
33+
34+ if (project . hasProperty( ' mappings_version ' ))
35+ mappings = project . mappings_version
3436}
3537
3638dependencies {
37- // you may put jars on which you depend on in ./libs
38- // or you may define them like so..
39- // compile "some.group:artifact:version:classifier"
40- // compile "some.group:artifact:version"
41-
42- // real examples
43- // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
44- // compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
45-
46- // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
47- // provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
48-
49- // the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
50- // except that these dependencies get remapped to your current MCP mappings
51- // deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
52- // deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
53-
54- // for more info...
55- // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
56- // http://www.gradle.org/docs/current/userguide/dependency_management.html
5739
5840}
5941
6042processResources {
61- // this will ensure that this task is redone when the versions change.
62- inputs. property " version" , project. version
63- inputs. property " mcversion" , project. minecraft. version
64-
65- // replace stuff in mcmod.info, nothing else
66- from(sourceSets. main. resources. srcDirs) {
67- include ' mcmod.info'
68-
69- // replace version and mcversion
70- expand ' version' :project. version, ' mcversion' :project. minecraft. version
71- }
72-
73- // copy everything else except the mcmod.info
74- from(sourceSets. main. resources. srcDirs) {
75- exclude ' mcmod.info'
76- }
77- }
43+ inputs. property " version" , project. version
44+ inputs. property " mcversion" , project. minecraft. version
45+
46+ from(sourceSets. main. resources. srcDirs) {
47+ include ' mcmod.info'
48+
49+ expand ' version' :project. version, ' mcversion' :project. minecraft. version
50+ }
51+
52+ from(sourceSets. main. resources. srcDirs) {
53+ exclude ' mcmod.info'
54+ }
55+ }
0 commit comments