Skip to content

Commit 9aff058

Browse files
Restructure platform modules (#236)
* add a parent platform gradle module * add readme banner * Add a few gh badges * remove build tools --------- Co-authored-by: Trentin <[email protected]>
1 parent 1a138ad commit 9aff058

File tree

77 files changed

+136
-105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+136
-105
lines changed

.github/README.md

Lines changed: 87 additions & 0 deletions

.github/workflows/deploy.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ jobs:
2626
distribution: "zulu"
2727
java-version: 8
2828

29-
- name: Setup BuildTools
30-
run: |
31-
mkdir ~/buildtools
32-
cd ~/buildtools
33-
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -O BuildTools.jar
34-
java -jar BuildTools.jar --rev 1.8.8
35-
3629
- name: Gradle Build
3730
run: ./gradlew build
3831

@@ -62,8 +55,8 @@ jobs:
6255
target_commitish: "${{ github.sha }}"
6356
generate_release_notes: true
6457
files: |
65-
bukkit/build/libs/apollo-bukkit-${{ env.VERSION }}.jar
66-
bungee/build/libs/apollo-bungee-${{ env.VERSION }}.jar
67-
velocity/build/libs/apollo-velocity-${{ env.VERSION }}.jar
68-
folia/build/libs/apollo-folia-${{ env.VERSION }}.jar
69-
minestom/build/libs/apollo-minestom-${{ env.VERSION }}.jar
58+
platform/bukkit/build/libs/apollo-bukkit-${{ env.VERSION }}.jar
59+
platform/bungee/build/libs/apollo-bungee-${{ env.VERSION }}.jar
60+
platform/velocity/build/libs/apollo-velocity-${{ env.VERSION }}.jar
61+
platform/folia/build/libs/apollo-folia-${{ env.VERSION }}.jar
62+
platform/minestom/build/libs/apollo-minestom-${{ env.VERSION }}.jar

README.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

api/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ dependencies {
2020

2121
"bukkit"(main.output)
2222
"bukkit"(libs.bukkit.api)
23-
"bukkit"(libs.bukkit)
2423

2524
"bungee"(main.output)
2625
"bungee"(libs.bungee)

docs/developers/lightweight/introduction.mdx

Lines changed: 1 addition & 1 deletion

example/bukkit/common/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ java {
88
}
99

1010
dependencies {
11-
compileOnly(libs.bukkit)
1211
compileOnly(libs.bukkit.api)
1312
}

example/bukkit/common/src/main/java/com/lunarclient/apollo/example/util/ItemUtil.java

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
*/
2424
package com.lunarclient.apollo.example.util;
2525

26-
import net.minecraft.server.v1_8_R3.NBTTagCompound;
2726
import org.bukkit.Material;
28-
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack;
2927
import org.bukkit.inventory.ItemStack;
3028
import org.bukkit.inventory.meta.ItemMeta;
3129

@@ -42,30 +40,31 @@ public static ItemStack itemWithName(Material material, String name) {
4240
}
4341

4442
public static ItemStack addTag(ItemStack item, String key, Object value) {
45-
net.minecraft.server.v1_8_R3.ItemStack nmsItem = CraftItemStack.asNMSCopy(item);
46-
NBTTagCompound tag = nmsItem.hasTag() ? nmsItem.getTag() : new NBTTagCompound();
47-
48-
NBTTagCompound lunarTag = tag.getCompound("lunar");
49-
if (lunarTag == null) {
50-
lunarTag = new NBTTagCompound();
51-
}
52-
53-
if (value instanceof Integer) {
54-
lunarTag.setInt(key, (Integer) value);
55-
} else if (value instanceof Double) {
56-
lunarTag.setDouble(key, (Double) value);
57-
} else if (value instanceof Float) {
58-
lunarTag.setFloat(key, (Float) value);
59-
} else if (value instanceof Boolean) {
60-
lunarTag.setBoolean(key, (Boolean) value);
61-
} else if (value instanceof String) {
62-
lunarTag.setString(key, (String) value);
63-
}
64-
65-
tag.set("lunar", lunarTag);
66-
nmsItem.setTag(tag);
67-
68-
return CraftItemStack.asBukkitCopy(nmsItem);
43+
// net.minecraft.server.v1_8_R3.ItemStack nmsItem = CraftItemStack.asNMSCopy(item);
44+
// NBTTagCompound tag = nmsItem.hasTag() ? nmsItem.getTag() : new NBTTagCompound();
45+
//
46+
// NBTTagCompound lunarTag = tag.getCompound("lunar");
47+
// if (lunarTag == null) {
48+
// lunarTag = new NBTTagCompound();
49+
// }
50+
//
51+
// if (value instanceof Integer) {
52+
// lunarTag.setInt(key, (Integer) value);
53+
// } else if (value instanceof Double) {
54+
// lunarTag.setDouble(key, (Double) value);
55+
// } else if (value instanceof Float) {
56+
// lunarTag.setFloat(key, (Float) value);
57+
// } else if (value instanceof Boolean) {
58+
// lunarTag.setBoolean(key, (Boolean) value);
59+
// } else if (value instanceof String) {
60+
// lunarTag.setString(key, (String) value);
61+
// }
62+
//
63+
// tag.set("lunar", lunarTag);
64+
// nmsItem.setTag(tag);
65+
//
66+
// return CraftItemStack.asBukkitCopy(nmsItem);
67+
return item;
6968
}
7069

7170
private ItemUtil() {

example/bukkit/json/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies {
1414
exclude("net.kyori", "adventure-bom")
1515
}
1616

17-
compileOnly(libs.bukkit)
17+
compileOnly(libs.bukkit.api)
1818
compileOnly(libs.folia)
1919
implementation(project(":example:bukkit:apollo-example-bukkit-common"))
2020
}

example/bukkit/proto/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies {
1616
exclude("net.kyori", "adventure-bom")
1717
}
1818

19-
compileOnly(libs.bukkit)
19+
compileOnly(libs.bukkit.api)
2020
compileOnly(libs.folia)
2121
implementation(project(":example:bukkit:apollo-example-bukkit-common"))
2222
}

example/minestom/api/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ java {
99

1010
dependencies {
1111
compileOnly(project(path = ":apollo-api", configuration = "minestom"))
12-
implementation(project(path = ":apollo-minestom", configuration = "shadow"))
12+
implementation(project(path = ":platform:apollo-minestom", configuration = "shadow"))
1313

1414
implementation(libs.minestom)
1515
}

0 commit comments

Comments
 (0)