-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathbuild.gradle
131 lines (113 loc) · 3.68 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
buildscript {
repositories {
jcenter()
mavenLocal()
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath "com.wynprice.cursemaven:CurseMaven:2.1.1"
classpath group: 'gradle.plugin.com.matthewprenger', name: 'CurseGradle', version: "1.+"
}
}
apply plugin: "com.wynprice.cursemaven"
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'maven'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'com.matthewprenger.cursegradle'
idea{
module{
inheritOutputDirs = false
outputDir = compileJava.destinationDir
testOutputDir = compileTestJava.destinationDir
}
}
sourceCompatibility = targetCompatibility = "1.8"
version = "1.12.2-" + project.modVersion
group = "p455w0rd.danknull"
archivesBaseName = "DankNull"
minecraft {
version = "1.12.2-14.23.5.2846"
mappings = "snapshot_20180814"
runDir = "run"
replace '@VERSION@', project.modVersion
replace '@FINGERPRINT@', project.findProperty('signSHA1')
serverJvmArgs += "-Dfml.doNotBackup=true"
serverJvmArgs += "-Dfml.queryResult=confirm"
clientJvmArgs += "-Dfml.doNotBackup=true"
clientRunArgs += "-username=Dev"
}
dependencies {
deobfCompile "curse.maven:p455w0rds-library:2830265"
deobfProvided "curse.maven:the-one-probe:2667280"
deobfProvided "curse.maven:jei:2803400"
deobfProvided "curse.maven:hwyla:2568753"
deobfProvided "curse.maven:chisel:2915375"
deobfProvided "curse.maven:ctm:2915363"
deobfProvided "curse.maven:extra-utilities:2678374"
deobfProvided "curse.maven:not-enough-items:2755792"
deobfProvided "curse.maven:codechicken:2779848"
deobfProvided "curse.maven:item-scroller:2581199"
deobfProvided "curse.maven:overloaded:2875265"
testCompile 'junit:junit:4.12'
testCompile "com.google.truth:truth:+"
}
task signJar(type: SignJar, dependsOn: reobfJar) {
onlyIf {
project.hasProperty('keyStore')
}
keyStore = project.findProperty('keyStore')
alias = project.findProperty('keyStoreAlias')
storePass = project.findProperty('keyStorePass')
keyPass = project.findProperty('keyStoreKeyPass')
inputFile = jar.archivePath
outputFile = jar.archivePath
}
reobfJar.finalizedBy(signJar)
processResources {
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
from(sourceSets.main.resources.srcDirs) {
include "mcmod.info"
expand "version": project.version, "mcversion": project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
exclude "mcmod.info"
}
rename '(.+_at.cfg)', 'META-INF/$1'
}
def curseRelations = {
optionalDependency 'better-builders-wands'
optionalDependency 'exchangers'
optionalDependency 'swingthroughgrass'
optionalDependency 'the-one-probe'
optionalDependency 'hwyla'
optionalDependency 'building-gadgets'
optionalDependency 'chisel'
optionalDependency 'jei'
optionalDependency 'waila'
requiredDependency 'p455w0rds-library'
}
curseforge {
if (project.hasProperty('curseForgeAPIKey')) {
apiKey = project.findProperty('curseForgeAPIKey')
}
project {
id = '272514'
changelog = file('CHANGELOG.md')
changelogType = 'markdown'
releaseType = 'beta'
relations curseRelations
}
}
// Make Gradle not Cache these so they always run
runClient.outputs.upToDateWhen { false }
runServer.outputs.upToDateWhen { false }