-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
100 lines (78 loc) · 2.36 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
import de.undercouch.gradle.tasks.download.Download
import com.palantir.gradle.gitversion.VersionDetails
buildscript {
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}
plugins {
id 'java'
id 'de.undercouch.download' version '3.4.3'
id 'com.palantir.git-version' version '0.11.0'
//id 'com.matthewprenger.cursegradle' version '1.2.0'
}
apply plugin: 'maven-publish'
apply plugin: 'net.minecraftforge.gradle.forge'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
compileJava.sourceCompatibility = JavaVersion.VERSION_1_8
compileJava.targetCompatibility = JavaVersion.VERSION_1_8
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenCentral()
jcenter()
maven { url = 'http://files.minecraftforge.net/maven' }
maven { url = 'https://minecraft.curseforge.com/api/maven' }
}
version = "${gitVersion()}+mc${project.minecraft_version}"
group = mod_group
archivesBaseName = mod_name
final String FORGE = "${project.minecraft_version}-${project.forge_version}"
minecraft {
runDir = 'run'
version = FORGE
mappings = forge_mapping
makeObfSourceJar = false
replaceIn "${mod_name}.java"
replace "@VERSION@", project.version
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
}
processResources {
exclude '**/*.db'
exclude '**/*.DS_Store'
}
jar {
from 'LICENSE'
manifest {
attributes 'FMLAT': 'metaltransport_at.cfg'
}
}
task setupEclipseWorkspace(type: Download, dependsOn: setupDecompWorkspace) {
File forgeArchive = project.file('forge.zip')
src "http://files.minecraftforge.net/maven/net/minecraftforge/forge/${FORGE}/forge-${FORGE}-mdk.zip"
dest forgeArchive
doLast {
project.copy {
from zipTree(forgeArchive)
into 'forge'
}
project.file('forge/eclipse').renameTo(project.file('eclipse'))
project.file('forge.zip').delete()
project.file('forge').deleteDir()
}
}
task migrateSource() {
project.file('build/tmp/recompileMc/sources').renameTo(project.file('minecraftSrc'))
}
migrateSource.mustRunAfter eclipse
build {
doLast {
project.file('release').deleteDir()
project.file('build/libs').renameTo(project.file('release'))
}
}