Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ plugins {
alias(libs.plugins.klibs.gradle.publication) apply false
alias(libs.plugins.klibs.gradle.rootinfo) apply false
alias(libs.plugins.klibs.minecraft.resource.processor) apply false
alias(libs.plugins.neoforgegradle) apply false
alias(libs.plugins.gradle.neoforgegradle) apply false
}

apply(plugin = "ru.astrainteractive.gradleplugin.dokka.root")
Expand Down
14 changes: 7 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ services:
EULA: true
ONLINE_MODE: false
# Forge --------------------
TYPE: NEOFORGE
VERSION: "1.21.1"
NEOFORGE_VERSION: "21.1.129"
#TYPE: NEOFORGE
#VERSION: "1.21.1"
#NEOFORGE_VERSION: "21.1.129"
# Paper --------------------
# TYPE: PAPER
# VERSION: 1.21.8
TYPE: PAPER
VERSION: 1.21.8
# Custom -------------------
# CUSTOM_SERVER: https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/121/downloads/paper-1.21.1-121.jar
volumes:
- ./build/neoforge:/data # Forge
# - ./build/bukkit:/data # Bukkit/Paper/Spigot
# - ./build/neoforge:/data # Forge
- ./build/bukkit:/data # Bukkit/Paper/Spigot
# - ./build/velocity:/data # Velocity
# - ./build/fabric:/data # Fabric
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ makeevrserg.java.ktarget=21
# Project
makeevrserg.project.name=SoulKeeper
makeevrserg.project.group=ru.astrainteractive.soulkeeper
makeevrserg.project.version.string=1.2.3
makeevrserg.project.version.string=1.2.4
makeevrserg.project.description=Keep your items after death
makeevrserg.project.developers=makeevrserg|Makeev Roman|makeevrserg@gmail.com
makeevrserg.project.url=https://github.com/Astra-Interactive/SoulKeeper
Expand Down
74 changes: 36 additions & 38 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,65 +1,61 @@
[versions]
cache4k = "0.14.0"
discordsrv = "1.30.2"
discordsrv = "1.30.3"
driver-h2 = "2.4.240"
driver-jdbc = "3.50.3.0"
driver-jdbc = "3.51.1.0"
driver-mariadb = "3.5.6"
driver-mysql = "8.0.33"
exposed = "0.61.0"
forgegradle = "[6.0,6.2)"
neoforgegradle = "7.1.6"
gradle-buildconfig = "5.7.0"
gradle-buildconfig = "6.0.6"
gradle-ftp = "0.1.2"
gradle-shadow = "9.2.2"
gson = "2.13.2"
guava = "33.5.0-jre"
jda = "6.1.0"
jda = "6.1.3"
jda-webhook = "0.8.4"
klibs-gradleplugin = "1.13.2"
klibs-kdi = "1.4.8"
klibs-kstorage = "4.4.1"
klibs-mikro = "1.16.0"
kotlin-benchmark = "0.4.14"
klibs-mikro = "1.16.1"
kotlin-benchmark = "0.4.15"
kotlin-coroutines = "1.10.2"
kotlin-datetime = "0.7.1-0.6.x-compat"
kotlin-json = "1.9.0"
kotlin-serialization-kaml = "0.102.0"
kotlin-serialization = "1.9.0"
kotlin-serialization-kaml = "0.104.0"
kotlin-version = "2.2.0"
ktor = "3.3.1"
kyori = "4.25.0"
kyori-adventure = "4.25.0"
mcprotocollib = "1.21.7-SNAPSHOT"
minecraft-astralibs = "3.31.1"
ktor = "3.3.3"
minecraft-astralibs = "3.31.2"
minecraft-bstats = "3.1.0"
minecraft-bungee = "1.21-R0.5-SNAPSHOT"
minecraft-essentialsx = "2.21.2"
minecraft-fabric-api = "0.136.3+"
minecraft-fabric-api = "0.139.5+"
minecraft-fabric-kotlin = "1.13.7+"
minecraft-fabric-loader = "0.17.3"
minecraft-fabric-loom = "1.12.5"
minecraft-fabric-loader = "0.18.2"
minecraft-fabric-loom = "1.14.6"
minecraft-kyori = "4.25.0"
minecraft-luckperms = "5.5"
minecraft-mcprotocollib = "1.21.7-SNAPSHOT"
minecraft-mockbukkit = "4.33.2"
minecraft-mojang-version = "1.21.1"
minecraft-packetevents = "2.10.1"
minecraft-papi = "2.11.6"
minecraft-neoforgeversion = "21.1.129"
minecraft-packetevents = "2.11.0"
minecraft-papi = "2.11.7"
minecraft-protocollib = "5.3.0"
minecraft-spigot = "1.21.9-R0.1-SNAPSHOT"
minecraft-towny = "0.101.2.1"
minecraft-towny = "0.102.0.0"
minecraft-vault = "1.7.1"
minecraft-velocity = "4.0.0-SNAPSHOT"
minecraft-forgeversion = "47.2.20"
minecraft-neoforgeversion = "21.1.129"
shadow = "8.1.8"
minecraft-neoforgegradle = "7.1.11"
telegrambots = "9.2.0"
tests-junit-bom = "6.0.1"
tests-junit-jupiter-api = "6.0.1"
tests-mockito = "5.20.0"
tests-mockito = "5.21.0"
tests-org-testing = "7.11.0"
turbine = "1.2.1"
tests-turbine = "1.2.1"

[libraries]
minecraft-astralibs-core = { module = "ru.astrainteractive.astralibs:core", version.ref = "minecraft-astralibs" }
cache4k = { module = "io.github.reactivecircus.cache4k:cache4k-jvm", version.ref = "cache4k" }
discord-webhook = { module = "club.minnced:discord-webhooks", version.ref = "jda-webhook" }
driver-h2 = { module = "com.h2database:h2", version.ref = "driver-h2" }
Expand All @@ -84,9 +80,9 @@ kotlin-coroutines-coreJvm = { module = "org.jetbrains.kotlinx:kotlinx-coroutines
kotlin-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlin-coroutines" }
kotlin-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime-jvm", version.ref = "kotlin-datetime" }
kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin-version" }
kotlin-serialization-kaml = { module = "com.charleskorn.kaml:kaml", version.ref = "kotlin-serialization-kaml" }
kotlin-serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin-version" }
kotlin-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlin-serialization" }
kotlin-serialization-kaml = { module = "com.charleskorn.kaml:kaml", version.ref = "kotlin-serialization-kaml" }
kotlin-serialization-protobuf = { module = "org.jetbrains.kotlinx:kotlinx-serialization-protobuf", version.ref = "kotlin-json" }
kotlin-tooling-core = { module = "org.jetbrains.kotlin:kotlin-tooling-core", version.ref = "kotlin-version" }
ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" }
Expand All @@ -95,15 +91,11 @@ ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
ktor-client-json = { module = "io.ktor:ktor-client-json", version.ref = "ktor" }
ktor-logging = { module = "io.ktor:ktor-client-logging", version.ref = "ktor" }
ktor-serialization-json = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" }
kyori-plain = { module = "net.kyori:adventure-text-serializer-plain", version.ref = "kyori-adventure" }
kyori-api = { module = "net.kyori:adventure-api", version.ref = "kyori" }
kyori-gson = { module = "net.kyori:adventure-text-serializer-gson", version.ref = "kyori" }
kyori-legacy = { module = "net.kyori:adventure-text-serializer-legacy", version.ref = "kyori" }
kyori-minimessage = { module = "net.kyori:adventure-text-minimessage", version.ref = "kyori" }
mcprotocollib = { module = "org.geysermc.mcprotocollib:protocol", version.ref = "mcprotocollib" }
minecraft-astralibs-command = { module = "ru.astrainteractive.astralibs:command", version.ref = "minecraft-astralibs" }
minecraft-astralibs-command-bukkit = { module = "ru.astrainteractive.astralibs:command-bukkit", version.ref = "minecraft-astralibs" }
minecraft-astralibs-core = { module = "ru.astrainteractive.astralibs:core", version.ref = "minecraft-astralibs" }
minecraft-astralibs-core-bukkit = { module = "ru.astrainteractive.astralibs:core-bukkit", version.ref = "minecraft-astralibs" }
minecraft-astralibs-core-forge = { module = "ru.astrainteractive.astralibs:core-forge", version.ref = "minecraft-astralibs" }
minecraft-astralibs-core-neoforge = { module = "ru.astrainteractive.astralibs:core-neoforge", version.ref = "minecraft-astralibs" }
minecraft-astralibs-exposed = { module = "ru.astrainteractive.astralibs:exposed", version.ref = "minecraft-astralibs" }
minecraft-astralibs-menu-bukkit = { module = "ru.astrainteractive.astralibs:menu-bukkit", version.ref = "minecraft-astralibs" }
Expand All @@ -116,8 +108,15 @@ minecraft-fabric-api = { module = "net.fabricmc.fabric-api:fabric-api", version.
minecraft-fabric-kotlin = { module = "net.fabricmc:fabric-language-kotlin", version.ref = "minecraft-fabric-kotlin" }
minecraft-fabric-loader = { module = "net.fabricmc:fabric-loader", version.ref = "minecraft-fabric-loader" }
minecraft-fabric-mojang = { module = "com.mojang:minecraft", version.ref = "minecraft-mojang-version" }
minecraft-kyori-plain = { module = "net.kyori:adventure-text-serializer-plain", version.ref = "minecraft-kyori" }
minecraft-kyori-api = { module = "net.kyori:adventure-api", version.ref = "minecraft-kyori" }
minecraft-kyori-gson = { module = "net.kyori:adventure-text-serializer-gson", version.ref = "minecraft-kyori" }
minecraft-kyori-legacy = { module = "net.kyori:adventure-text-serializer-legacy", version.ref = "minecraft-kyori" }
minecraft-kyori-minimessage = { module = "net.kyori:adventure-text-minimessage", version.ref = "minecraft-kyori" }
minecraft-luckperms = { module = "net.luckperms:api", version.ref = "minecraft-luckperms" }
minecraft-mcprotocollib = { module = "org.geysermc.mcprotocollib:protocol", version.ref = "minecraft-mcprotocollib" }
minecraft-mockbukkit = { module = "com.github.MockBukkit:MockBukkit", version.ref = "minecraft-mockbukkit" }
minecraft-neoforgeversion = { module = "net.neoforged:neoforge", version.ref = "minecraft-neoforgeversion" }
minecraft-packetevents = { module = "com.github.retrooper:packetevents-spigot", version.ref = "minecraft-packetevents" }
minecraft-paper-api = { module = "io.papermc.paper:paper-api", version.ref = "minecraft-spigot" }
minecraft-papi = { module = "me.clip:placeholderapi", version.ref = "minecraft-papi" }
Expand All @@ -127,7 +126,6 @@ minecraft-spigot-core = { module = "org.spigotmc:spigot", version.ref = "minecra
minecraft-towny = { module = "com.palmergames.bukkit.towny:towny", version.ref = "minecraft-towny" }
minecraft-vaultapi = { module = "com.github.MilkBowl:VaultAPI", version.ref = "minecraft-vault" }
minecraft-velocity-api = { module = "com.velocitypowered:velocity-api", version.ref = "minecraft-velocity" }
minecraft-neoforgeversion = { module = "net.neoforged:neoforge", version.ref = "minecraft-neoforgeversion" }
telegrambots-client = { module = "org.telegram:telegrambots-client", version.ref = "telegrambots" }
telegrambots-extensions = { module = "org.telegram:telegrambots-extensions", version.ref = "telegrambots" }
telegrambots-longpolling = { module = "org.telegram:telegrambots-longpolling", version.ref = "telegrambots" }
Expand All @@ -138,19 +136,20 @@ tests-junit5 = { module = "org.jetbrains.kotlin:kotlin-test-junit5" }
tests-kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test" }
tests-mockito = { module = "org.mockito:mockito-core", version.ref = "tests-mockito" }
tests-org-testing = { module = "org.testng:testng", version.ref = "tests-org-testing" }
turbine = { module = "app.cash.turbine:turbine", version.ref = "turbine" }
tests-turbine = { module = "app.cash.turbine:turbine", version.ref = "tests-turbine" }

[plugins]
fabric-loom = { id = "fabric-loom", version.ref = "minecraft-fabric-loom" }
forgegradle = { id = "net.minecraftforge.gradle", version.ref = "forgegradle" }
gradle-buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "gradle-buildconfig" }
neoforgegradle = { id = "net.neoforged.gradle.userdev", version.ref = "neoforgegradle" }
gradle-fabric-loom = { id = "fabric-loom", version.ref = "minecraft-fabric-loom" }
gradle-forgegradle = { id = "net.minecraftforge.gradle", version.ref = "forgegradle" }
gradle-ftp = { id = "ru.astrainteractive.ftpplugin.gradleftp", version.ref = "gradle-ftp" }
gradle-neoforgegradle = { id = "net.neoforged.gradle.userdev", version.ref = "minecraft-neoforgegradle" }
gradle-shadow = { id = "com.gradleup.shadow", version.ref = "gradle-shadow" }
klibs-gradle-detekt = { id = "ru.astrainteractive.gradleplugin.detekt", version.ref = "klibs-gradleplugin" }
klibs-gradle-detekt-compose = { id = "ru.astrainteractive.gradleplugin.detekt.compose", version.ref = "klibs-gradleplugin" }
klibs-gradle-dokka-module = { id = "ru.astrainteractive.gradleplugin.dokka.module", version.ref = "klibs-gradleplugin" }
klibs-gradle-dokka-root = { id = "ru.astrainteractive.gradleplugin.dokka.root", version.ref = "klibs-gradleplugin" }
klibs-gradle-java-core = { id = "ru.astrainteractive.gradleplugin.java.core", version.ref = "klibs-gradleplugin" }
klibs-gradle-java-version = { id = "ru.astrainteractive.gradleplugin.java.version", version.ref = "klibs-gradleplugin" }
klibs-gradle-minecraft-empty = { id = "ru.astrainteractive.gradleplugin.minecraft.empty", version.ref = "klibs-gradleplugin" }
klibs-gradle-minecraft-multiplatform = { id = "ru.astrainteractive.gradleplugin.minecraft.multiplatform", version.ref = "klibs-gradleplugin" }
Expand All @@ -165,4 +164,3 @@ kotlin-gradle = { id = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-version" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin-version" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin-version" }
shadow = { id = "io.github.goooler.shadow", version.ref = "shadow" }
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class RootModule(plugin: LifecyclePlugin) {

private val soulsDaoModule = SoulsDaoModule.Default(
dataFolder = coreModule.dataFolder,
ioScope = coreModule.ioScope
ioScope = coreModule.ioScope,
dispatchers = coreModule.dispatchers
)

private val bukkitPlatformServiceModule = BukkitPlatformServiceModule(
Expand Down
8 changes: 4 additions & 4 deletions instances/neoforge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ru.astrainteractive.gradleplugin.property.extension.ModelPropertyValueExt
plugins {
kotlin("jvm")
kotlin("plugin.serialization")
alias(libs.plugins.neoforgegradle)
alias(libs.plugins.gradle.neoforgegradle)
alias(libs.plugins.klibs.minecraft.resource.processor)
alias(libs.plugins.gradle.shadow)
}
Expand All @@ -23,9 +23,9 @@ dependencies {
shadow(libs.klibs.kstorage)
shadow(libs.driver.h2)
shadow(libs.driver.jdbc)
shadow(libs.kyori.plain)
shadow(libs.kyori.legacy)
shadow(libs.kyori.gson)
shadow(libs.minecraft.kyori.plain)
shadow(libs.minecraft.kyori.legacy)
shadow(libs.minecraft.kyori.gson)
// Local
shadow(projects.modules.core)
shadow(projects.modules.commandNeoforge)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package ru.astrainteractive.soulkeeper.di

import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.MainCoroutineDispatcher
import net.neoforged.fml.loading.FMLPaths
import ru.astrainteractive.astralibs.coroutines.NeoForgeMainDispatcher
import ru.astrainteractive.astralibs.lifecycle.Lifecycle
Expand All @@ -28,7 +29,7 @@ class RootModule(private val plugin: Lifecycle) {
CoreModule(
dataFolder = dataFolder,
dispatchers = object : KotlinDispatchers {
override val Main: CoroutineDispatcher by lazy {
override val Main: MainCoroutineDispatcher by lazy {
NeoForgeMainDispatcher()
}
override val IO: CoroutineDispatcher = Dispatchers.IO
Expand All @@ -41,7 +42,8 @@ class RootModule(private val plugin: Lifecycle) {
private val soulsDaoModule by lazy {
SoulsDaoModule.Default(
dataFolder = coreModule.dataFolder,
ioScope = coreModule.ioScope
ioScope = coreModule.ioScope,
dispatchers = coreModule.dispatchers
)
}
private val forgePlatformServiceModule by lazy {
Expand Down
2 changes: 1 addition & 1 deletion modules/command-neoforge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies {
implementation(libs.klibs.mikro.core)
implementation(libs.klibs.mikro.extensions)
// kyori
implementation(libs.kyori.api)
implementation(libs.minecraft.kyori.api)
// Test
testImplementation(libs.tests.kotlin.test)
// Local
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import org.jetbrains.exposed.sql.SchemaUtils
import org.jetbrains.exposed.sql.transactions.TransactionManager
import org.jetbrains.exposed.sql.transactions.transaction
import ru.astrainteractive.astralibs.lifecycle.Lifecycle
import ru.astrainteractive.klibs.mikro.core.dispatchers.KotlinDispatchers
import ru.astrainteractive.klibs.mikro.exposed.model.DatabaseConfiguration
import ru.astrainteractive.klibs.mikro.exposed.util.connect
import ru.astrainteractive.soulkeeper.module.souls.dao.SoulsDao
Expand All @@ -30,7 +31,8 @@ interface SoulsDaoModule {

class Default(
dataFolder: File,
ioScope: CoroutineScope
ioScope: CoroutineScope,
dispatchers: KotlinDispatchers
) : SoulsDaoModule {
override val databaseFlow: Flow<Database> = flow {
if (!dataFolder.exists()) dataFolder.mkdirs()
Expand All @@ -52,7 +54,7 @@ interface SoulsDaoModule {

override val lifecycle: Lifecycle = Lifecycle.Lambda(
onDisable = {
GlobalScope.launch {
GlobalScope.launch(dispatchers.IO) {
TransactionManager.closeAndUnregister(databaseFlow.first())
}
}
Expand Down
Loading