-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
68 lines (55 loc) · 1.42 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
plugins {
id "java"
id "idea"
id "eclipse"
id "maven-publish"
id "org.cadixdev.licenser" version "0.5.0"
}
group "dev.architectury"
def isSnapshot = System.getenv("PR_NUM") != null
def runNumber = (System.getenv("GITHUB_RUN_NUMBER") == null ? "9999" : System.getenv("GITHUB_RUN_NUMBER"))
if (!isSnapshot) {
version = base_version + "." + runNumber
} else {
version = base_version + "-PR." + System.getenv("PR_NUM") + "." + runNumber
}
logger.lifecycle(":building refmap remapper v${version}")
sourceCompatibility = targetCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
implementation "com.google.code.gson:gson:2.8.5"
compileOnly "org.jetbrains:annotations:20.1.0"
}
license {
header = rootProject.file("HEADER")
ext {
name = "architectury"
year = "2021"
}
include "**/*.java"
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier "sources"
from sourceSets.main.allSource
}
publishing {
publications {
main(MavenPublication) {
artifact(jar)
artifact(sourcesJar)
}
}
repositories {
if (System.getenv("MAVEN_PASS") != null) {
maven {
url = "https://deploy.shedaniel.me/"
credentials {
username = "shedaniel"
password = System.getenv("MAVEN_PASS")
}
}
}
}
}