forked from TerraformersMC/ModMenu
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
133 lines (116 loc) · 2.75 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
buildscript {
repositories {
jcenter()
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
maven {
name = 'Forge'
url = 'https://files.minecraftforge.net/maven/'
}
maven {
name = 'Jitpack'
url = 'https://jitpack.io/'
}
}
dependencies {
classpath 'com.github.Earthcomputer:fabric-loom:7b42eb7b'
}
}
plugins {
id 'maven-publish'
id 'com.matthewprenger.cursegradle' version "1.1.2"
}
apply plugin: 'fabric-loom'
sourceCompatibility = 1.8
targetCompatibility = 1.8
archivesBaseName = project.archive_name
version = project.mod_version
group = project.maven_group
def ENV = System.getenv()
version = version + "+" + (ENV.BUILD_NUMBER ? ("build." + ENV.BUILD_NUMBER) : "custom")
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings loom.alphaMcp('2.2a.1', loom.mediafire('http://www.mediafire.com/file/vwgj80p8n1plrlq/mcp22a.zip')) { mappings ->
mappings.method 'net/minecraft/src/World', '(III)Z', 'func_708_k', 'canSeeTheSky'
}
modCompile "net.fabricmc:fabric-loader:${project.loader_version}"
compile 'com.google.code.gson:gson:2.8.6'
compile 'com.google.guava:guava:28.2-jre'
compile 'commons-io:commons-io:2.5'
compile 'org.apache.commons:commons-lang3:3.9'
compile 'org.apache.logging.log4j:log4j-api:2.13.0'
compile 'org.apache.logging.log4j:log4j-core:2.13.0'
}
minecraft {
refmapName = 'modmenu.refmap.json'
}
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"
}
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}
jar {
from "LICENSE"
}
remapJar {
toMappings = 'official'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact(sourcesJar) {
builtBy remapSourcesJar
}
afterEvaluate {
artifact(remapJar) {
builtBy remapJar
}
}
}
}
repositories {
if (project.hasProperty('mavenPass')) {
maven {
url = "http://mavenupload.modmuss50.me/"
credentials {
username = "buildslave"
password = project.getProperty('mavenPass')
}
}
}
}
}
curseforge {
if (project.hasProperty('curse_api_key')){
apiKey = project.getProperty('curse_api_key')
}
project {
id = '308702'
changelog = 'A changelog can be found at https://github.com/Prospector/ModMenu'
releaseType = 'release'
addGameVersion '1.15.2'
mainArtifact(remapJar) {
displayName = "ModMenu v$version for $project.minecraft_version"
}
afterEvaluate {
uploadTask.dependsOn("remapJar")
}
}
options{
forgeGradleIntegration = false
}
}