-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
98 lines (87 loc) · 2.32 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
plugins {
id "java-library"
id "maven-publish"
id "me.qoomon.git-versioning" version "4.2.0"
id 'org.jetbrains.kotlin.jvm' version '1.5.20'
}
def ENV = System.getenv()
def releasesRepoUrl = "https://maven.modded-mc.com/repository/sandbox-maven/"
def snapshotsRepoUrl = "https://maven.modded-mc.com/repository/sandbox-snapshot/"
def javaVersion = JavaLanguageVersion.of(16)
version = "1.0.0-SNAPSHOT"
gitVersioning.apply {
branch {
pattern = "main"
versionFormat = '${version}'
}
branch {
pattern = "feature/(?<feature>.+)"
versionFormat = '${feature}-SNAPSHOT'
}
branch {
pattern = "pull/.+"
versionFormat = '${branch}-SNAPSHOT'
}
tag {
pattern = "v(?<tagVersion>[0-9].*)"
versionFormat = '${tagVersion}'
}
tag {
pattern = "release/(?<tagVersion>[0-9].*)"
versionFormat = '${tagVersion}'
}
commit {
versionFormat = '${commit.short}'
}
}
java {
toolchain {
languageVersion = javaVersion
}
withJavadocJar()
withSourcesJar()
}
compileKotlin {
kotlinOptions {
jvmTarget = javaVersion
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = javaVersion
}
}
repositories {
maven {
url "https://maven.modded-mc.com/repository/maven-public/"
}
mavenCentral()
}
dependencies {
api group: "org.joml", name: "joml", version: "1.10.1"
api group: "org.jetbrains", name: "annotations", version: "21.0.1"
api group: "com.google.code.findbugs", name: "jsr305", version: "3.0.2"
api group: "com.mojang", name: "datafixerupper", version: "1.0.20"
api group: "com.mojang", name: "brigadier", version: "1.0.17"
api group: "com.google.inject", name: "guice", version: "5.0.1"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId "org.sandboxpowered.api"
artifactId "api"
version project.version
from components.java
}
}
repositories {
maven {
url = rootProject.version.endsWith("-SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username ENV.MAVEN_USER
password ENV.MAVEN_PASS
}
}
}
}