-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
61 lines (51 loc) · 1.43 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
plugins {
id 'java'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
group = 'com.mohistmc'
version = '1.20.5'
repositories {
mavenCentral()
maven { url 'https://maven.mohistmc.com/' }
}
java {
toolchain.languageVersion = JavaLanguageVersion.of(21)
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
dependencies {
implementation 'org.yaml:snakeyaml:2.2' // 1.20.2+
// implementation 'org.yaml:snakeyaml:2.0' // 1.20.1+
// implementation 'org.yaml:snakeyaml:1.30' // 1.18.2
// implementation 'org.yaml:snakeyaml:1.33' // 1.19.2-1.19.4
implementation 'javax.inject:javax.inject:1'
}
shadowJar {
archiveClassifier = null
dependencies {
include(dependency('org.yaml:snakeyaml:2.2'))
include(dependency('javax.inject:javax.inject:1'))
}
relocate("org.yaml.snakeyaml", "com.mohistmc.org.yaml.snakeyaml")
relocate("javax.inject", "com.mohistmc.javax.inject")
}
shadowJar.dependsOn(jar)
publishing {
publications {
maven(MavenPublication) {
groupId project.group
artifactId project.name.toLowerCase()
version project.version
from components.java
}
}
repositories {
mavenLocal()
maven {
name = "Mohist-Maven"
setUrl("file:/Mohist-Maven/maven/")
}
}
}