This repository was archived by the owner on May 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
62 lines (51 loc) · 1.43 KB
/
build.gradle
File metadata and controls
62 lines (51 loc) · 1.43 KB
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
plugins {
id "com.matthewprenger.cursegradle" version "1.1.2"
id 'fabric-loom' version '0.2.0-SNAPSHOT'
id "maven-publish"
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
def build_number = System.getenv('BUILD_NUMBER') != null ? System.getenv('BUILD_NUMBER') : 'CUSTOM'
group = package_group
archivesBaseName = mod_name
version = "${mc_version}-${mod_version}-${build_number}"
minecraft {
refmapName = mod_name.toLowerCase() + '-refmap.json'
}
dependencies {
minecraft "com.mojang:minecraft:${snapshot_version}"
mappings "net.fabricmc:yarn:${snapshot_version}.${mappings_version}"
modCompile "net.fabricmc:fabric-loader:${loader_version}"
modCompile "net.fabricmc:fabric:${api_version}"
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allJava
}
publishing {
tasks.publish.dependsOn 'build'
publications {
mavenJava(MavenPublication) {
artifact jar
artifact sourcesJar
}
}
repositories {
if (project.hasProperty('maven_repo')) {
maven { url maven_repo }
} else {
mavenLocal()
}
}
}
curseforge {
if (project.hasProperty('curse_key_TehNut'))
apiKey = project.curse_key_TehNut
project {
id = "${curse_id}"
releaseType = 'release'
gameVersionStrings.clear()
gameVersionStrings.add("1.14-Snapshot")
addArtifact sourcesJar
}
}