-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
104 lines (93 loc) · 2.9 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
plugins {
id 'fabric-loom' version '0.2.4-SNAPSHOT'
id 'maven-publish'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = "com.github.NerdHubMC"
archivesBaseName = "Cardinal-Energy"
version = "${mod_version}"
minecraft {
}
repositories {
jcenter()
maven { url = "https://oss.sonatype.org/content/repositories/releases/" }
maven { url = "https://maven.abusedmaster.xyz" }
}
dependencies {
minecraft "com.mojang:minecraft:${mc_version}"
mappings "net.fabricmc:yarn:${yarn_mappings}"
modCompile "net.fabricmc:fabric-loader:${loader_version}"
modCompile "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
//Base
modCompile "com.github.NerdHubMC.Cardinal-Components-API:cardinal-components-base:${cardinal_components}"
include "com.github.NerdHubMC.Cardinal-Components-API:cardinal-components-base:${cardinal_components}"
//Block
modCompile "com.github.NerdHubMC.Cardinal-Components-API:cardinal-components-item:${cardinal_components}"
include "com.github.NerdHubMC.Cardinal-Components-API:cardinal-components-item:${cardinal_components}"
//Item
modCompile "com.github.NerdHubMC.Cardinal-Components-API:cardinal-components-block:${cardinal_components}"
include "com.github.NerdHubMC.Cardinal-Components-API:cardinal-components-block:${cardinal_components}"
}
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) {
afterEvaluate {
artifact remapJar.output
}
artifact sourcesJar
pom {
name = "Cardinal-Energy"
url = "https://github.com/NerdHubMC/Cardinal-Energy"
licenses {
license {
name = "MIT License"
url = "https://github.com/NerdHubMC/Cardinal-Energy/blob/master/LICENSE.md"
}
}
scm {
url = "https://github.com/NerdHubMC/Cardinal-Energy"
connection = "scm:git:git://github.com/NerdHubMC/Cardinal-Energy.git"
developerConnection = "scm:git:[email protected]:NerdHubMC/Cardinal-Energy.git"
}
issueManagement {
system = "github"
url = "https://github.com/NerdHubMC/Cardinal-Energy/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