-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
91 lines (81 loc) · 2.14 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
plugins {
id 'fabric-loom' version '0.2.0-SNAPSHOT'
id 'maven-publish'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = "nerdhub.playergraves"
archivesBaseName = "PlayerGraves"
version = "${mod_version}"
minecraft {
}
repositories {
jcenter()
maven { url = "https://oss.sonatype.org/content/repositories/releases/" }
}
dependencies {
minecraft "com.mojang:minecraft:${mc_version}"
mappings "net.fabricmc:yarn:${yarn_mappings}"
modCompile "net.fabricmc:fabric-loader:${loader_version}"
modCompile "net.fabricmc:fabric:${fabric_version}"
}
jar {
from "LICENSE.md"
manifest.mainAttributes(
"Implementation-Title": project.name,
"Implementation-Version": project.version,
"Maven-Artifact": "${project.group}:${project.archivesBaseName}:${project.version}".toLowerCase(Locale.ROOT),
"Built-On-Minecraft": "${mc_version}",
"Built-On-Java": "${System.getProperty("java.vm.version")} (${System.getProperty("java.vm.vendor")})"
)
}
task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
classifier = 'sources'
}
artifacts {
archives sourcesJar
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
artifact sourcesJar
pom {
name = "Player-Graves"
url = "https://github.com/NerdHubMC/Player-Graves"
licenses {
license {
name = "MIT License"
url = "https://github.com/NerdHubMC/Player-Graves/blob/master/LICENSE.md"
}
}
scm {
url = "https://github.com/NerdHubMC/Player-Graves"
connection = "scm:git:git://github.com/NerdHubMC/Player-Graves.git"
developerConnection = "scm:git:[email protected]:NerdHubMC/Player-Graves.git"
}
issueManagement {
system = "github"
url = "https://github.com/NerdHubMC/Player-Graves/issues"
}
}
}
}
repositories {
if (project.hasProperty("maven_user") && project.hasProperty("maven_pass")) {
maven {
name = "Abused's Maven"
url = findProperty("maven_url")
credentials {
username = findProperty("maven_user")
password = findProperty("maven_pass")
}
authentication {
basic(BasicAuthentication)
}
}
}
}
}
tasks.publish.dependsOn build