forked from vampire-studios/Randomly-Adding-Anything
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
188 lines (161 loc) · 6.02 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
plugins {
id 'fabric-loom' version '0.2.6-SNAPSHOT'
id 'maven-publish'
id "co.riiid.gradle" version "0.4.2"
id "com.matthewprenger.cursegradle" version "1.4.0"
id "com.wynprice.cursemaven" version "2.1.0"
}
repositories {
maven{ url="https://minecraft.curseforge.com/api/maven" }
maven{ url="https://maven.jamieswhiteshirt.com/libs-release/" }
maven{ url="https://maven.fabricmc.net" }
maven { url = "https://maven.swordglowsblue.com" }
maven { url = 'http://maven.sargunv.s3-website-us-west-2.amazonaws.com/' }
maven {
name = "Cotton"
url = "http://server.bbkr.space:8081/artifactory/libs-release"
}
maven { url "https://dl.bintray.com/shedaniel/autoconfig1u/" }
maven {
name = "NerdHubMC"
url = "https://maven.abusedmaster.xyz/"
}
maven { url = "https://jitpack.io"}
jcenter()
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
def buildnumber = ""
def gittoken = System.getenv('GH_TOKEN')
if (System.getenv('TRAVIS_BUILD_NUMBER') == "null" || System.getenv('TRAVIS_BUILD_NUMBER') == null) {
buildnumber = project.beta_version
} else {
buildnumber = System.getenv('TRAVIS_BUILD_NUMBER')
}
def buildbranch = System.getenv('TRAVIS_BRANCH')
archivesBaseName = project.archives_base_name
version = project.mod_version + "+build." + buildnumber
group = project.maven_group
minecraft {
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modCompile "net.fabricmc:fabric-loader:${project.loader_version}"
modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation "com.lettuce.fudge:artifice:0.4.1+1.15.1"
include ("com.lettuce.fudge:artifice:0.4.1+1.15.1")
modImplementation "vampirelib:vampirelib:${project.vampirelib_version}"
include ("vampirelib:vampirelib:${project.vampirelib_version}") {
exclude group :"net.fabricmc.fabric-api"
}
modRuntime 'curse.maven:slightly-altered-terrain-generation:2834529'
modRuntime 'curse.maven:trees-do-not-float:2833870'
modRuntime 'curse.maven:fabric-vertigo:2834529'
modRuntime 'curse.maven:expanded-storage:2832473'
modRuntime 'curse.maven:shulkerboxtooltip:2829477'
modRuntime 'curse.maven:leaf-decay:2827905'
modImplementation("com.github.Draylar:world-traveler:${world_traveler_version}") {
transitive = false
}
modImplementation 'curse.maven:simplex-terrain-generation:2850537'
modCompile "me.sargunvohra.mcmods:autoconfig1u:${project.auto_config_version}"
include ("me.sargunvohra.mcmods:autoconfig1u:${project.auto_config_version}") {
exclude group :"net.fabricmc.fabric-api"
}
modCompile "me.shedaniel.cloth:config-2:${project.cloth_config_version}"
include ("me.shedaniel.cloth:config-2:${project.cloth_config_version}") {
exclude group :"net.fabricmc.fabric-api"
}
modImplementation ("com.github.CottonMC:Jankson-Fabric:-SNAPSHOT")
include ("me.zeroeightsix:fiber:0.6.0-7") {
exclude group :"net.fabricmc.fabric-api"
}
modImplementation("me.shedaniel:RoughlyEnoughItems:${project.rei_version}") {
exclude group: "io.github.prospector.modmenu"
exclude group :"net.fabricmc.fabric-api"
}
}
github {
owner = 'vampire-studios'
repo = 'Randomly-Adding-Anything'
token = gittoken ?: "a key"
tagName = version + "-" + project.minecraft_version.replace(" ", "-")
name = version + "-" + "MC" + project.minecraft_version.replace(" ", "-")
targetCommitish = buildbranch
prerelease = true
assets = [
"build/libs/${archivesBaseName}-${version}-dev.jar",
"build/libs/${archivesBaseName}-${version}.jar",
"build/libs/${archivesBaseName}-${version}-sources-dev.jar",
"build/libs/${archivesBaseName}-${version}-sources.jar"
]
}
processResources {
inputs.property "version", project.version
from(sourceSets.main.resources.srcDirs) {
include "fabric.mod.json"
expand "version": project.version
}
from(sourceSets.main.resources.srcDirs) {
exclude "fabric.mod.json"
}
}
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}
jar {
from "LICENSE"
}
// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
// add all the jars that should be included when publishing to maven
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
}
}
// select the repositories you want to publish to
repositories {
// uncomment to publish to the local maven
// mavenLocal()
}
}
curseforge {
apiKey = System.getenv('CURSEKEY') ?: "a key"
project {
id = "341464"
releaseType = "release"
changelog = project.changelog
gameVersionStrings.clear()
gameVersionStrings.add("1.15-Snapshot")
gameVersionStrings.add("1.15")
gameVersionStrings.add("1.15.1")
gameVersionStrings.add("Fabric")
mainArtifact(file("build/libs/${archivesBaseName}-${version}.jar")) {
displayName = "[" + minecraft_version + "] " + version
relations {
requiredDependency "fabric-api"
embeddedLibrary "auto-config"
}
}
}
options{
forgeGradleIntegration = false
}
}