-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
58 lines (50 loc) · 1.17 KB
/
build.gradle
File metadata and controls
58 lines (50 loc) · 1.17 KB
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
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
}
group = 'org.relativitymc'
def baseVersion = '1.0'
def ENV = System.getenv()
def IS_EXPERIMENTAL = ENV.BRANCH_NAME != null && ENV.BRANCH_NAME.startsWith("exp/")
if (ENV.BUILD_NUMBER) {
if (IS_EXPERIMENTAL) {
version = baseVersion + '.0-alpha.' + ENV.BUILD_NUMBER
} else {
version = baseVersion + '.' + ENV.BUILD_NUMBER
}
} else {
version = baseVersion + '.local'
}
logger.lifecycle("Version: {}", version)
java {
sourceCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
maven {
url = "https://maven.minecraftforge.net/"
}
}
dependencies {
api "net.minecraftforge:bootstrap-api:2.1.8"
}
publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
repositories {
if (ENV.MAVEN_URL) {
maven {
url = ENV.MAVEN_URL
credentials {
username = ENV.MAVEN_CRED_USR
password = ENV.MAVEN_CRED_PSW
}
}
}
}
}