aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0449-MergedProperties-POC.patch
blob: e88b07af9e10e299af15bc79d5685cac19a03721 (plain)
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
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Date: Tue, 28 Nov 2023 19:28:45 -0700
Subject: [PATCH] MergedProperties POC


diff --git a/build.gradle.kts b/build.gradle.kts
index e827ee211e3c65dc68ac5867fd8476639df63645..7456c41ccf126790ec11652d244710e2b797f237 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,3 +1,5 @@
+import io.papermc.paperweight.util.MergedProperties
+
 plugins {
     `java-library`
     `maven-publish`
@@ -9,11 +11,13 @@ java {
     withJavadocJar()
 }
 
-val annotationsVersion = "24.0.1"
-val bungeeCordChatVersion = "1.20-R0.1"
-val adventureVersion = "4.14.0"
-val slf4jVersion = "1.8.0-beta4"
-val log4jVersion = "2.17.1"
+val versions = MergedProperties.fromAllProjects(project, "versions.properties")
+val annotationsVersion by versions
+val bungeeCordChatVersion by versions
+val adventureVersion by versions
+val slf4jVersion by versions
+val log4jVersion by versions
+val asmVersion by versions
 val apiAndDocs: Configuration by configurations.creating {
     attributes {
         attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
@@ -48,8 +52,8 @@ dependencies {
     api("org.apache.logging.log4j:log4j-api:$log4jVersion")
     api("org.slf4j:slf4j-api:$slf4jVersion")
 
-    implementation("org.ow2.asm:asm:9.4")
-    implementation("org.ow2.asm:asm-commons:9.4")
+    implementation("org.ow2.asm:asm:$asmVersion")
+    implementation("org.ow2.asm:asm-commons:$asmVersion")
     // Paper end
 
     api("org.apache.maven:maven-resolver-provider:3.8.5")
@@ -71,7 +75,7 @@ dependencies {
     testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
     testImplementation("org.hamcrest:hamcrest:2.2")
     testImplementation("org.mockito:mockito-core:5.5.0")
-    testImplementation("org.ow2.asm:asm-tree:9.5")
+    testImplementation("org.ow2.asm:asm-tree:$asmVersion")
 }
 
 // Paper start
diff --git a/versions.properties b/versions.properties
new file mode 100644
index 0000000000000000000000000000000000000000..4e284ef8c083571a6655c9beeaaa20bd554b8395
--- /dev/null
+++ b/versions.properties
@@ -0,0 +1,6 @@
+annotationsVersion = 24.0.1
+bungeeCordChatVersion = 1.20-R0.1
+adventureVersion = 4.14.0
+slf4jVersion = 1.8.0-beta4
+log4jVersion = 2.17.1
+asmVersion = 9.6