|
1 | 1 | plugins { |
2 | | - `java-library` |
3 | | - `maven-publish` |
| 2 | + `java-library` |
| 3 | + `maven-publish` |
4 | 4 | } |
5 | 5 |
|
6 | 6 | java { |
7 | | - toolchain { |
8 | | - languageVersion.set(JavaLanguageVersion.of(21)) |
9 | | - } |
| 7 | + toolchain { |
| 8 | + languageVersion.set(JavaLanguageVersion.of(21)) |
| 9 | + } |
10 | 10 | } |
11 | 11 |
|
12 | 12 | dependencies { |
13 | | - implementation("org.jetbrains:annotations:26.0.2") |
| 13 | + implementation("org.jetbrains:annotations:26.0.2") |
14 | 14 |
|
15 | | - compileOnly("org.projectlombok:lombok:1.18.38") |
16 | | - annotationProcessor("org.projectlombok:lombok:1.18.38") |
| 15 | + compileOnly("org.projectlombok:lombok:1.18.38") |
| 16 | + annotationProcessor("org.projectlombok:lombok:1.18.38") |
17 | 17 |
|
18 | | - testRuntimeOnly("org.junit.platform:junit-platform-launcher") |
19 | | - testImplementation("org.junit.jupiter:junit-jupiter:5.13.3") |
20 | | - testImplementation("org.mockito:mockito-core:5.18.0") |
21 | | - testImplementation("org.mockito:mockito-junit-jupiter:5.18.0") |
| 18 | + testRuntimeOnly("org.junit.platform:junit-platform-launcher") |
| 19 | + testImplementation("org.junit.jupiter:junit-jupiter:5.13.3") |
| 20 | + testImplementation("org.mockito:mockito-core:5.18.0") |
| 21 | + testImplementation("org.mockito:mockito-junit-jupiter:5.18.0") |
22 | 22 | } |
23 | 23 |
|
24 | 24 | tasks { |
25 | | - processResources { |
26 | | - expand( |
27 | | - "version" to version, |
28 | | - "description" to description, |
29 | | - "url" to "https://modrinth.com/plugin/pistonqueue" |
30 | | - ) |
31 | | - } |
32 | | - test { |
33 | | - reports.junitXml.required = true |
34 | | - reports.html.required = true |
35 | | - useJUnitPlatform() |
36 | | - maxParallelForks = Runtime.getRuntime().availableProcessors().div(2).coerceAtLeast(1) |
| 25 | + processResources { |
| 26 | + filesMatching( |
| 27 | + listOf( |
| 28 | + "plugin.yml", |
| 29 | + "bungee.yml", |
| 30 | + "velocity-plugin.json", |
| 31 | + "pistonqueue-build-data.properties" |
| 32 | + ) |
| 33 | + ) { |
| 34 | + expand( |
| 35 | + "version" to project.version, |
| 36 | + "description" to project.description, |
| 37 | + "url" to "https://modrinth.com/plugin/pistonqueue", |
| 38 | + ) |
37 | 39 | } |
| 40 | + } |
| 41 | + test { |
| 42 | + reports.junitXml.required = true |
| 43 | + reports.html.required = true |
| 44 | + useJUnitPlatform() |
| 45 | + maxParallelForks = Runtime.getRuntime().availableProcessors().div(2).coerceAtLeast(1) |
| 46 | + } |
38 | 47 | } |
39 | 48 |
|
40 | 49 | tasks.withType<JavaCompile> { |
41 | | - options.encoding = "UTF-8" |
42 | | - options.compilerArgs.add("-Xlint:all,-serial,-processing") |
| 50 | + options.encoding = "UTF-8" |
| 51 | + options.compilerArgs.add("-Xlint:all,-serial,-processing") |
43 | 52 | } |
44 | 53 |
|
45 | 54 | val repoName = if (version.toString().endsWith("SNAPSHOT")) "maven-snapshots" else "maven-releases" |
46 | 55 | publishing { |
47 | | - repositories { |
48 | | - maven("https://repo.codemc.org/repository/${repoName}/") { |
49 | | - credentials.username = System.getenv("CODEMC_USERNAME") |
50 | | - credentials.password = System.getenv("CODEMC_PASSWORD") |
51 | | - name = "codemc" |
52 | | - } |
| 56 | + repositories { |
| 57 | + maven("https://repo.codemc.org/repository/${repoName}/") { |
| 58 | + credentials.username = System.getenv("CODEMC_USERNAME") |
| 59 | + credentials.password = System.getenv("CODEMC_PASSWORD") |
| 60 | + name = "codemc" |
53 | 61 | } |
54 | | - publications { |
55 | | - register<MavenPublication>("mavenJava") { |
56 | | - from(components["java"]) |
57 | | - pom { |
58 | | - name = "PistonQueue" |
59 | | - description = rootProject.description |
60 | | - url = "https://github.com/AlexProgrammerDE/PistonQueue" |
61 | | - organization { |
62 | | - name = "AlexProgrammerDE" |
63 | | - url = "https://pistonmaster.net" |
64 | | - } |
65 | | - developers { |
66 | | - developer { |
67 | | - id = "AlexProgrammerDE" |
68 | | - timezone = "Europe/Berlin" |
69 | | - url = "https://pistonmaster.net" |
70 | | - } |
71 | | - } |
72 | | - licenses { |
73 | | - license { |
74 | | - name = "GNU General Public License v3.0" |
75 | | - url = "https://www.gnu.org/licenses/gpl-3.0.html" |
76 | | - } |
77 | | - } |
78 | | - scm { |
79 | | - connection = "scm:git:https://github.com/AlexProgrammerDE/PistonQueue.git" |
80 | | - developerConnection = "scm:git:ssh://[email protected]/AlexProgrammerDE/PistonQueue.git" |
81 | | - url = "https://github.com/AlexProgrammerDE/PistonQueue" |
82 | | - } |
83 | | - ciManagement { |
84 | | - system = "GitHub Actions" |
85 | | - url = "https://github.com/AlexProgrammerDE/PistonQueue/actions" |
86 | | - } |
87 | | - issueManagement { |
88 | | - system = "GitHub" |
89 | | - url = "https://github.com/AlexProgrammerDE/PistonQueue/issues" |
90 | | - } |
91 | | - } |
| 62 | + } |
| 63 | + publications { |
| 64 | + register<MavenPublication>("mavenJava") { |
| 65 | + from(components["java"]) |
| 66 | + pom { |
| 67 | + name = "PistonQueue" |
| 68 | + description = rootProject.description |
| 69 | + url = "https://github.com/AlexProgrammerDE/PistonQueue" |
| 70 | + organization { |
| 71 | + name = "AlexProgrammerDE" |
| 72 | + url = "https://pistonmaster.net" |
| 73 | + } |
| 74 | + developers { |
| 75 | + developer { |
| 76 | + id = "AlexProgrammerDE" |
| 77 | + timezone = "Europe/Berlin" |
| 78 | + url = "https://pistonmaster.net" |
| 79 | + } |
| 80 | + } |
| 81 | + licenses { |
| 82 | + license { |
| 83 | + name = "GNU General Public License v3.0" |
| 84 | + url = "https://www.gnu.org/licenses/gpl-3.0.html" |
| 85 | + } |
| 86 | + } |
| 87 | + scm { |
| 88 | + connection = "scm:git:https://github.com/AlexProgrammerDE/PistonQueue.git" |
| 89 | + developerConnection = "scm:git:ssh://[email protected]/AlexProgrammerDE/PistonQueue.git" |
| 90 | + url = "https://github.com/AlexProgrammerDE/PistonQueue" |
| 91 | + } |
| 92 | + ciManagement { |
| 93 | + system = "GitHub Actions" |
| 94 | + url = "https://github.com/AlexProgrammerDE/PistonQueue/actions" |
| 95 | + } |
| 96 | + issueManagement { |
| 97 | + system = "GitHub" |
| 98 | + url = "https://github.com/AlexProgrammerDE/PistonQueue/issues" |
92 | 99 | } |
| 100 | + } |
93 | 101 | } |
| 102 | + } |
94 | 103 | } |
0 commit comments