-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
67 lines (56 loc) · 1.68 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
plugins {
id "fabric-loom" version "0.2.6-SNAPSHOT"
id "maven-publish"
id "signing"
}
group = "com.jamieswhiteshirt"
archivesBaseName = "developer-mode"
version = "1.0.15"
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
repositories {
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
minecraft {
}
dependencies {
minecraft "com.mojang:minecraft:1.15"
mappings "net.fabricmc:yarn:1.15+build.2:v2"
modImplementation "net.fabricmc:fabric-loader:0.7.2+build.174"
modImplementation "net.fabricmc.fabric-api:fabric-resource-loader-v0:0.1.+"
compileOnly "com.google.code.findbugs:jsr305:3.0.2"
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
project.ext.isReleaseVersion = !version.endsWith("-SNAPSHOT")
publishing {
publications {
mavenJava(MavenPublication) {
afterEvaluate {
artifact remapJar
artifact(sourcesJar.archiveFile) {
classifier = "sources"
builtBy remapSourcesJar
}
}
}
}
repositories {
maven {
def releasesRepoUrl = 'https://maven.jamieswhiteshirt.com/libs-release/'
def snapshotsRepoUrl = 'https://maven.jamieswhiteshirt.com/libs-snapshot/'
url = isReleaseVersion ? releasesRepoUrl : snapshotsRepoUrl
credentials {
username project.properties.mavenUser
password project.properties.mavenPassword
}
}
}
}
signing {
required = isReleaseVersion
sign publishing.publications.mavenJava
}