Skip to content

Commit c6165e7

Browse files
committed
refactor: replace :plugins:plugin-data-driven with :plugins:common module
1 parent b1a9cc5 commit c6165e7

File tree

16 files changed

+21
-39
lines changed

16 files changed

+21
-39
lines changed

gradle/libs.versions.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
[versions]
2+
kotlin = "2.3.0"
3+
kotlinx-coroutines = "1.10.2"
4+
kotlinx-serialization = "1.10.0"
5+
26
bettercommand = "1.4.3"
37
betterhud = "1.14.1"
48
bettermodel = "2.1.0"
@@ -9,8 +13,6 @@ hikaricp = "7.0.2"
913
jnoise = "4.1.0"
1014
kaml = "0.104.0"
1115
koin = "4.1.1"
12-
kotlin = "2.3.0"
13-
kotlinx-coroutines = "1.10.2"
1416
mccoroutine = "2.22.0"
1517
minecraftexposed = "1.0.0-R0.1-SNAPSHOT"
1618
minecraftserialization = "1.0.0-R0.6-SNAPSHOT"
@@ -30,6 +32,7 @@ shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
3032
[libraries]
3133
# Language
3234
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
35+
kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "kotlinx-serialization" }
3336

3437
# Dependency Injection (DI)
3538
koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" }

plugins/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ subprojects {
2323
}
2424

2525
gradle.projectsEvaluated {
26-
val pluginShadowJarTasks = subprojects.map { it.tasks.named<ShadowJar>("shadowJar") }
27-
val pluginShadowJarFiles = subprojects.map { project ->
26+
val pluginProjects = subprojects.filter { it.name.startsWith("plugin-") }
27+
val pluginShadowJarTasks = pluginProjects.map { it.tasks.named<ShadowJar>("shadowJar") }
28+
val pluginShadowJarFiles = pluginProjects.map { project ->
2829
project.tasks.named<ShadowJar>("shadowJar").flatMap { it.archiveFile }
2930
}
3031

plugins/common/build.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dependencies {
2+
compileOnly(libs.kotlinx.serialization.core)
3+
compileOnly(libs.minecraftserialization.adventure)
4+
compileOnly(libs.minecraftserialization.valueproviders)
5+
}

plugins/plugin-data-driven/src/main/kotlin/net/azisaba/vanilife/datadriven/ItemStackProvider.kt renamed to plugins/common/src/main/kotlin/net/azisaba/vanilife/ItemStackProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package net.azisaba.vanilife.datadriven
1+
package net.azisaba.vanilife
22

33
import io.papermc.paper.registry.RegistryAccess
44
import io.papermc.paper.registry.RegistryKey

plugins/plugin-data-driven/build.gradle.kts

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

plugins/plugin-data-driven/src/main/kotlin/net/azisaba/vanilife/datadriven/Main.kt

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

plugins/plugin-data-driven/src/main/resources/paper-plugin.yml

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

plugins/plugin-islands/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dependencies {
2-
compileOnly(project(":plugins:plugin-data-driven"))
32
compileOnly(project(":plugins:plugin-runtime"))
3+
compileOnly(libs.bettermodel.bukkit.api)
44
implementation(libs.entitylib)
55
implementation(libs.koin.core)
66
implementation(libs.minecraftexposed.adventure)

plugins/plugin-islands/src/main/kotlin/net/azisaba/vanilife/islands/listener/IslandPlayerListener.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,15 @@ import com.github.shynixn.mccoroutine.folia.launch
44
import io.papermc.paper.event.player.AsyncChatEvent
55
import io.papermc.paper.event.player.AsyncPlayerSpawnLocationEvent
66
import io.papermc.paper.registry.keys.EnchantmentKeys
7-
import io.papermc.paper.registry.keys.ItemTypeKeys
8-
import io.papermc.paper.registry.keys.SoundEventKeys
97
import kotlinx.coroutines.runBlocking
10-
import net.azisaba.serialization.IntProvider
118
import net.azisaba.vanilife.Vanilife
12-
import net.azisaba.vanilife.datadriven.ItemStackProvider
139
import net.azisaba.vanilife.islands.IslandManager
1410
import net.azisaba.vanilife.islands.wrack.WrackType
15-
import net.kyori.adventure.sound.Sound
1611
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer
17-
import org.bukkit.Material
1812
import org.bukkit.event.EventHandler
1913
import org.bukkit.event.Listener
2014
import org.bukkit.event.player.PlayerJoinEvent
2115
import org.bukkit.event.player.PlayerQuitEvent
22-
import org.bukkit.inventory.ItemStack
2316
import org.bukkit.plugin.Plugin
2417

2518
internal class IslandPlayerListener(private val plugin: Plugin, private val service: IslandManager) : Listener {

plugins/plugin-islands/src/main/kotlin/net/azisaba/vanilife/islands/wrack/WrackType.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import kotlinx.serialization.Serializable
1111
import kr.toxicity.model.api.BetterModel
1212
import kr.toxicity.model.api.data.renderer.ModelRenderer
1313
import net.azisaba.serialization.KeySerializer
14-
import net.azisaba.vanilife.datadriven.ItemStackProvider
14+
import net.azisaba.vanilife.ItemStackProvider
1515
import net.azisaba.vanilife.islands.Island
1616
import net.kyori.adventure.key.Key
1717
import net.kyori.adventure.sound.Sound

0 commit comments

Comments
 (0)