forked from austinv11/PeripheralsPlusPlus
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild.gradle
192 lines (176 loc) · 5.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
jcenter()
maven { url = "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.0.9"
}
}
repositories {
jcenter()
maven {
url "https://dl.bintray.com/rolandoislas/The-Framework"
}
maven {
name = "chickenbones"
url = "http://chickenbones.net/maven"
}
maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
url = "http://dvs1.progwml6.com/files/maven"
}
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "modmaven.k-4u.nl"
}
maven {
name "JBoss"
url = "https://repository.jboss.org/nexus/content/repositories/releases/"
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
apply plugin: "com.matthewprenger.cursegradle"
ext.build = System.getenv('TRAVIS_BUILD_NUMBER')
ext.tag = System.getenv("TRAVIS_TAG")
version = "1.12.2-1.1"
version = version + "-build-T" + ext.build
group= "com.rolandoislas.peripheralsplusone" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "PeripheralsPlusOne"
minecraft {
version = "1.12.2-14.23.1.2555"
mappings = "snapshot_20171003"
runDir = "run"
replace("@VERSION@",project.version)
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact sourceJar
artifact deobfJar
}
}
}
// deobf jars
task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'deobf'
manifest {
attributes 'FMLAT': 'ppp_at.cfg'
}
}
if (ext.tag) {
if (ext.tag.contains("release"))
ext.releaseType = "release"
else if (ext.tag.contains("beta"))
ext.releaseType = "beta"
else
ext.releaseType = "alpha"
curseforge {
apiKey = System.getenv("CURSE_API_KEY") ?: ""
project {
id = "279746"
changelog = System.getenv("TRAVIS_COMMIT_MESSAGE") ?: ""
releaseType = project.releaseType
mainArtifact jar
relations {
requiredLibrary "the-framework"
}
}
}
bintray {
user = 'rolandoislas'
key = System.getenv("BINTRAY_API_KEY") ?: ""
dryRun = false
publish = true
publications = ['mavenJava']
pkg {
repo = "PeripheralsPlusOne"
name = "PeripheralsPlusOne"
desc = "A ComputerCraft Addon"
websiteUrl = "https://github.com/rolandoislas/PeripheralsPlusOne"
issueTrackerUrl = "https://github.com/rolandoislas/PeripheralsPlusOne/issues"
vcsUrl = "https://github.com/rolandoislas/PeripheralsPlusOne.git"
licenses = ["GPL v2"]
publicDownloadNumbers = true
version {
name = project.version + "-" + project.releaseType
}
}
}
}
configurations {
compileBundle
}
ext.freettsVersion = "1.2.2"
dependencies {
compile "com.rolandoislas.theframework:TheFramework:1.12.2-1.0-build-T8:deobf"
compile "mezz.jei:jei_1.12.2:4.8.5.132"
compileBundle "com.michaelwflaherty:cleverbotapi:1.0.2"
compileBundle "com.fasterxml.jackson.core:jackson-databind:2.9.1"
compileBundle "org.mobicents.external.freetts:cmulex:$freettsVersion"
compileBundle "org.mobicents.external.freetts:en_us:$freettsVersion"
compileBundle "org.mobicents.external.freetts:freetts:$freettsVersion"
compileBundle "org.mobicents.external.freetts:mbrola:$freettsVersion"
compileBundle "org.mobicents.external.freetts:cmu_us_kal:$freettsVersion"
compileBundle "org.bouncycastle:bcprov-jdk15on:1.57"
compileBundle "org.bouncycastle:bcpg-jdk15on:1.57"
compileBundle "name.neuhalfen.projects.crypto.bouncycastle.openpgp:bouncy-gpg:2.+"
configurations.compile.extendsFrom(configurations.compileBundle)
}
processResources
{
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
jar {
manifest {
attributes 'FMLAT': 'ppp_at.cfg'
}
for (Object depToBundle : configurations.compileBundle.collect()) {
if (depToBundle.isDirectory())
from depToBundle
else if (depToBundle.toString().contains("freetts-${freettsVersion}.jar"))
from(zipTree(depToBundle).matching {
exclude "de/dfki/lt/freetts/mbrola/**"
})
else
from(zipTree(depToBundle).matching {
exclude "META-INF/LICENSE", "META-INF/NOTICE", "META-INF/*.DSA", "META-INF/*.RSA", "META-INF/*.SF"
})
}
}
build {
dependsOn deobfJar
}
idea {
module {
inheritOutputDirs = true
}
}