-
Notifications
You must be signed in to change notification settings - Fork 27
/
build.gradle
120 lines (105 loc) · 3.03 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
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "Modmuss50"
url = "http://maven.modmuss50.me/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'ModsIOUpload:ModsIOUpload:+'
}
}
plugins {
id "com.matthewprenger.cursegradle" version "1.4.0"
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'net.cazzar.gradle.modsio'
allprojects {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
version = "7.0.5"
group= "the_fireplace.ias"
archivesBaseName = "InGameAccountSwitcher-1.12.2"
minecraft {
version = "1.12.2-14.23.5.2768"
runDir = "run"
replace '${version}', project.version
replace '${secretSalt}', project.hasProperty("secretSalt")? project.secretSalt : ""
mappings = "stable_39"
}
dependencies {}
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'
}
}
task showVersion {
description "Displays the current version"
group "help"
compileJava.dependsOn showVersion
deobfCompileDummyTask.dependsOn showVersion
extractMcpMappings.dependsOn showVersion
doLast {
def versionFile = new File(buildDir, '.version');
versionFile.getParentFile().mkdirs();
versionFile.text = version;
}
outputs.upToDateWhen { false }
}
task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'deobf'
}
artifacts {
archives jar
archives deobfJar
archives sourceJar
}
curseforge {
apiKey = project.hasProperty("curseForgeApiKey")? project.curseForgeApiKey : "empty"
project {
id = '232676'
changelog = file('changelog.txt')
releaseType = 'release'
addGameVersion '1.12.2'
addGameVersion '1.12.1'
addGameVersion '1.12'
addGameVersion 'Java 8'
mainArtifact(jar) {
displayName = jar.archiveName.replace(".jar", "")
}
addArtifact(sourceJar) {
displayName = sourceJar.archiveName.replace(".jar", "")
changelog = "*This is a file for mod developers. If you don't know what to do with it, don't use it!*"
}
addArtifact(deobfJar) {
displayName = deobfJar.archiveName.replace(".jar", "")
changelog = "*This is a file for mod developers. If you don't know what to do with it, don't use it!*"
}
}
}
modsIO {
key = project.hasProperty("modsioApiKey")? project.modsioApiKey : "empty"
project{
artifact = new File(jar.destinationDir, archivesBaseName+"-"+version+".jar")
modid = "1221"
minecraft = "1.12.2"
try{changelog = file('changelog.txt').text}catch(Exception e){changelog=""}
tag = ""
current = true
}
}