forked from EternalBlueFlame/Traincraft-5
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
104 lines (83 loc) · 2.47 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
buildscript {
repositories {
maven {
url "https://repo1.maven.org/maven2"
}
maven {
name = "forge"
url = "https://maven.minecraftforge.net/"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath ('com.anatawa12.forge:ForgeGradle:1.2-1.1.+') {
changing = true
}
}
}
apply plugin: 'forge'
apply plugin: 'idea'
sourceCompatibility = targetCompatibility = "1.7"
compileJava { sourceCompatibility = targetCompatibility = "1.7" }
ext.configFile = file "build.properties"
configFile.withReader {
def prop = new Properties()
prop.load(it)
project.ext.config = new ConfigSlurper().parse prop
}
version = config.modVersion.toString()
group= "src.train" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Traincraft"
minecraft {
version = "1.7.10-10.13.4.1614-1.7.10"
runDir = "run"
replaceIn "Info.java"
replace "@VERSION1@", config.modVersion.toString()
}
task packApi(type: Jar, dependsOn: "classes") {
// Jar will always be updated
outputs.upToDateWhen {false}
// Set the jar's base name
baseName = "Traincraft"
from (sourceSets.main.output) {
excludes.addAll('**/*.info')
excludes.addAll('assets/tc/textures/trains')
excludes.addAll('assets/tc/sounds')
excludes.addAll('assets/tc/sounds.json')
}
}
repositories {
maven {
name "gt"
url "https://gregtech.overminddl1.com/"
}
maven {
name "codechicken"
url "https://maven.cil.li/"
}
ivy {
name "BuildCraft"
artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision]-[classifier].[ext]"
}
}
dependencies {
// `compile` will compile it and run with `runClient`/`runServer`
// `compileOnly will only compile but not load in dev testing (can still put in the instance mods directory though)
compileOnly "li.cil.oc:OpenComputers:MC1.7.10-1.7.2.1204:dev"
compileOnly "com.mod-buildcraft:buildcraft:7.1.23:dev"
compile "codechicken:CodeChickenLib:1.7.10-1.1.3.136:dev"
compile "codechicken:CodeChickenCore:1.7.10-1.0.4.35:dev"
compile "codechicken:NotEnoughItems:1.7.10-1.0.4.90:dev"
// quality of life line to simplify importing jars for experimental testing
compile fileTree(dir: 'libs', include: ['*.jar'])
}
idea
{
module
{
inheritOutputDirs = true
}
}