-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
105 lines (89 loc) · 2.59 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
99
100
101
102
103
104
105
buildscript {
repositories {
gradlePluginPortal()
mavenCentral()
}
dependencies {
classpath 'com.gradleup.shadow:shadow-gradle-plugin:8.3.0'
}
}
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
id 'com.gradleup.shadow' version '8.3.0'
}
tasks.register('publishAll') {
dependsOn ':api:publishToMavenLocal', ':plugin:publishToMavenLocal'
}
subprojects {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'com.gradleup.shadow'
group 'fr.joupi.games.engine'
version '1.0-SNAPSHOT'
compileJava.options.encoding 'UTF-8'
repositories {
mavenLocal()
mavenCentral()
maven {
url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
maven {
url 'https://repo.glaremasters.me/repository/concuncan/'
}
}
dependencies {
compileOnly 'org.slf4j:slf4j-api:2.0.13'
compileOnly 'org.spigotmc:spigot:1.8.8-R0.1-SNAPSHOT'
compileOnly 'org.projectlombok:lombok:1.18.34'
compileOnly 'com.grinderwolf:slimeworldmanager-plugin:2.2.1'
compileOnly 'com.github.ben-manes.caffeine:caffeine:3.1.8'
annotationProcessor 'org.projectlombok:lombok:1.18.34'
}
publishing {
publications {
if (project.name == 'api') {
mavenJava(MavenPublication) {
from components.java
groupId 'fr.joupi.games.engine'
artifactId 'api'
version '1.0.0'
}
}
if (project.name == 'plugin') {
shadow(MavenPublication) {
groupId 'fr.joupi.games.engine'
artifactId 'plugin'
version '1.0.0'
artifact(tasks.shadowJar) {
classifier ''
extension 'jar'
}
tasks.withType(Jar) {
if (name == 'jar') {
enabled = false as Publication
}
}
}
}
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
compileJava {
sourceCompatibility = JavaVersion.VERSION_21
}
tasks.withType(Test).tap {
configureEach {
systemProperty "file.encoding", "UTF-8"
}
}
}