forked from QuiltMC/enigma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
92 lines (76 loc) · 2.08 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
plugins {
id 'maven-publish'
}
subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
repositories {
mavenLocal()
mavenCentral()
maven {
url = "https://maven.quiltmc.org/repository/release/"
}
maven {
url = "https://maven.quiltmc.org/repository/snapshot/"
}
}
dependencies {
implementation libs.guava
implementation libs.gson
implementation libs.bundles.tinylog
testImplementation libs.junit
testRuntimeOnly libs.junit.engine
testImplementation libs.hamcrest
}
group = 'org.quiltmc'
version = '1.8.1'
var ENV = System.getenv()
version = version + (ENV.GITHUB_ACTIONS ? (ENV.SNAPSHOTS_URL ? "-SNAPSHOT" : "") : "+local")
java {
withSourcesJar()
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 17
}
test {
useJUnitPlatform()
}
// publishing {
// publications {
// "$project.name"(MavenPublication) {
// groupId project.group
// artifactId project.name
// version project.version
// from components.java
// }
// }
// }
}
allprojects {
publishing {
repositories {
mavenLocal()
def ENV = System.getenv()
if (ENV.MAVEN_URL) {
maven {
url ENV.MAVEN_URL
credentials {
username ENV.MAVEN_USERNAME
password ENV.MAVEN_PASSWORD
}
}
} else if (ENV.SNAPSHOTS_URL) {
maven {
url ENV.SNAPSHOTS_URL
credentials {
username ENV.SNAPSHOTS_USERNAME
password ENV.SNAPSHOTS_PASSWORD
}
}
}
}
}
}