-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
103 lines (88 loc) · 2.75 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
import org.apache.tools.ant.filters.ReplaceTokens
buildscript {
repositories {
maven {
name 'MinecraftForge'
url 'https://files.minecraftforge.net/maven'
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'net.minecraftforge.gradle.forge'
group = project.mod_maven_group
archivesBaseName = project.mod_jar_name
version = "${project.minecraft_version}-${project.mod_version}"
sourceCompatibility = compileJava.sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = compileJava.targetCompatibility = JavaVersion.VERSION_1_8
minecraft {
version = "${project.minecraft_version}-${project.forge_version}"
mappings = "${project.mappings_channel}_${project.mappings_version}"
runDir = "run"
}
repositories {
maven {
url 'https://cursemaven.com'
}
maven {
url "https://maven.ic2.player.to" // Forestry
}
maven {
url 'https://chickenbones.net/maven/' // CCL
}
maven {
url 'https://dvs1.progwml6.com/files/maven/' // JEI
}
}
dependencies {
compile "codechicken:CodeChickenLib:${project.deps_ccl_version}:universal"
deobfCompile "curse.maven:gregtech-${project.deps_gregtechceu_version}-${project.deps_gregtechceu_curse_ref}"
deobfCompile "net.sengir.forestry:forestry_${project.deps_forestry_version}"
compile "mezz.jei:jei_${project.deps_jei_version}"
}
processResources {
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand(project.properties)
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
duplicatesStrategy = 'include'
}
task processSource(type: Sync) {
from sourceSets.main.java
into "$buildDir/src"
filter(ReplaceTokens, tokens: [
MOD_ID : project.mod_id,
MOD_NAME : project.mod_name,
MOD_UPDATE_URL: project.mod_update_url,
])
}
compileJava {
source = processSource.outputs
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
jar {
finalizedBy 'reobfJar'
manifest {
attributes([
'Specification-Title' : project.mod_name,
'Specification-Version' : project.mod_version,
'Specification-Vendor' : project.mod_author,
'Implementation-Title' : project.mod_id,
'Implementation-Version' : project.mod_version,
'Implementation-Vendor' : project.mod_author,
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}