This repository has been archived by the owner on Jan 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
executable file
·101 lines (86 loc) · 2.87 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
// DON'T TOUCH THE BUILDSCRIPT[] BLOCK
// its special, and it is only there to make ForgeGradle work correctly.
buildscript {
repositories {
mavenCentral()
mavenLocal()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT"
}
}
repositories {
maven {
url "http://dvs1.progwml6.com/files/maven"
}
}
repositories {
// JEI
maven {
url "http://dvs1.progwml6.com/files/maven"
}
}
apply plugin: "net.minecraftforge.gradle.forge" // adds the forge dependency
apply plugin: 'maven' // for uploading to a maven repo
ext.configFile = file "build.properties"
configFile.withReader {
// Load config. It shall from now be referenced as simply config or project.config
def prop = new Properties()
prop.load(it)
project.ext.config = new ConfigSlurper().parse prop
}
version = config.mod_version
group = "com.mod-buildcraft.complication"
archivesBaseName = "buildcraft-complication" // the name that all artifacts will use as a base. artifacts names follow this pattern: [baseName]-[appendix]-[version]-[classifier].[extension]
sourceCompatibility = 1.8
targetCompatibility = 1.8
minecraft {
version = config.mc_version + "-" + config.forge_version
runDir = "run"
// the mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD snapshot are built nightly.
// stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not allways work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings = config.mappings_version
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
// replacing stuff in the source
replace '@VERSION@', project.version
replace '@MC_VERSION@', version
useDepAts = true
}
// configure the source folders
sourceSets {
main {
java {
srcDir "common"
}
resources {
srcDir "resources"
}
}
}
processResources {
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
// ${version} and ${mcversion} are the exact strings being replaced
expand 'version': project.version, 'mcversion': project.minecraft.version
}
// copy everything else, that's not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}