-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
91 lines (78 loc) · 2.77 KB
/
build.gradle
File metadata and controls
91 lines (78 loc) · 2.77 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
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
plugins {
id 'java-library'
id 'maven-publish'
id 'com.gradleup.shadow' version '9.0.0-beta11' apply false
}
group = 'com.github.MufHead'
version = '2.0.0'
def shadedModules = ['yrdatabase-allay', 'yrdatabase-nukkit', 'yrdatabase-waterdog']
allprojects {
repositories {
mavenCentral()
maven { url 'https://repo.opencollab.dev/maven-releases/' }
maven { url 'https://repo.opencollab.dev/maven-snapshots/' }
maven { url 'https://repo.waterdog.dev/main' }
maven { url 'https://storehouse.okaeri.eu/repository/maven-public/' }
maven { url 'https://jitpack.io' }
}
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'maven-publish'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withSourcesJar()
withJavadocJar()
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
tasks.withType(Javadoc).configureEach {
options.encoding = 'UTF-8'
options.addStringOption('Xdoclint:none', '-quiet')
failOnError = false
}
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.34'
annotationProcessor 'org.projectlombok:lombok:1.18.34'
}
publishing {
publications {
maven(MavenPublication) {
if (shadedModules.contains(project.name)) {
project.afterEvaluate {
artifact tasks.named('shadowJar').get()
artifact tasks.named('sourcesJar').get()
artifact tasks.named('javadocJar').get()
}
} else {
from components.java
}
pom {
name = project.name
description = project.description ?: 'YRDatabase module'
url = 'https://github.com/MufHead/YRDatabase'
licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'YiranKuma'
name = 'YiranKuma'
}
}
scm {
connection = 'scm:git:git://github.com/MufHead/YRDatabase.git'
developerConnection = 'scm:git:ssh://github.com/MufHead/YRDatabase.git'
url = 'https://github.com/MufHead/YRDatabase'
}
}
}
}
}
}