Skip to content
This repository was archived by the owner on Dec 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7a98d9c
In the middle of the progress just saving
twisti-dev Feb 17, 2025
c9be79a
add math utility functions and refactor allowlist terminology ~ copilot
twisti-dev Feb 19, 2025
db836f1
add abstract service class for Exposed DAO entities with caching support
twisti-dev Feb 21, 2025
4ae67c5
refactor CloudPlayerService to extend AbstractExposedDAOService and s…
twisti-dev Feb 21, 2025
f353788
add utility functions for single element retrieval from collections a…
twisti-dev Feb 22, 2025
46e9202
implement server connection handling and update player information on…
twisti-dev Feb 22, 2025
b8e772c
add optional response classes for various data types and implement re…
twisti-dev Feb 23, 2025
1570e41
add JPA entities for CloudPlayer and name history, implement caching …
twisti-dev Feb 28, 2025
03dfb27
update build configuration for Velocity plugin, add API validation se…
twisti-dev Mar 5, 2025
ca04e38
add dumped api
twisti-dev Mar 5, 2025
7f8f88f
refactor: update CloudPlayer management and implement offline player …
twisti-dev Mar 14, 2025
48e474b
refactor: streamline dependency management and enhance offline player…
twisti-dev Mar 16, 2025
f00cf59
refactor: update caching configuration and adjust Spring profiles for…
twisti-dev Mar 17, 2025
cc83cbd
refactor: add logging handler to connection pipeline and improve serv…
twisti-dev Mar 20, 2025
b134ed6
refactor: annotate instance properties as internal API in Cloud classes
twisti-dev Mar 20, 2025
9d47d6e
refactor: add compiler options for InternalApi annotation in Kotlin c…
twisti-dev Mar 20, 2025
092ef34
refactor: add ClientboundBatchUpdateServer packet to the protocol stream
twisti-dev Mar 20, 2025
156de98
refactor: improve error message for unannotated NettyPacket classes
twisti-dev Mar 20, 2025
fc3c784
refactor: improve error message for unannotated NettyPacket classes
twisti-dev Mar 20, 2025
055792e
refactor: add ServerboundRequestOfflinePlayerData and ResponseRequest…
twisti-dev Mar 20, 2025
88f7163
refactor: Migrate CloudPlayer persistence & update player data protocols
twisti-dev Apr 8, 2025
f55593d
dump api
twisti-dev Apr 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 25 additions & 0 deletions .github/workflows/qodana_code_quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Qodana
on:
workflow_dispatch:
pull_request:
push:
branches:
- master

jobs:
qodana:
runs-on: ubuntu-latest
uses: production
permissions:
contents: write
pull-requests: write
checks: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: 'Qodana Scan'
uses: JetBrains/[email protected]
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
30 changes: 0 additions & 30 deletions .idea/dataSources.xml

This file was deleted.

1 change: 0 additions & 1 deletion .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 67 additions & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,29 +1,85 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
import dev.slne.surf.surfapi.gradle.util.slnePublic

buildscript {
repositories {
gradlePluginPortal()
maven("https://repo.slne.dev/repository/maven-unsafe/") { name = "maven-unsafe" }
maven("https://repo.slne.dev/repository/maven-public/") { name = "maven-public" }
}
dependencies {
classpath("dev.slne.surf:surf-api-gradle-plugin:1.21.4+")
}
}

plugins {
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.17.0"
id("io.freefair.aspectj.post-compile-weaving") version "8.13.1"
java
}

allprojects {
apply(plugin = "java")
apply(plugin = "io.freefair.aspectj.post-compile-weaving")
group = "dev.slne.surf.cloud"
version = findProperty("version") as String

repositories {
slnePublic()
}

dependencies {
implementation(platform("org.springframework.boot:spring-boot-dependencies:3.4.3"))
implementation(platform("io.ktor:ktor-bom:3.0.3"))
implementation(platform("org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:2025.2.2"))

compileOnly("org.springframework.boot:spring-boot-configuration-processor:3.4.3")
// "kapt"("org.springframework.boot:spring-boot-configuration-processor:3.4.3")
}


tasks {
withType<ShadowJar> {
mergeServiceFiles {
setPath("META-INF")
exclude("META-INF/MANIFEST.MF")
}
configureShadowJar()
configureJar()
}

isZip64 = true
}
setupPublishing()
}

apiValidation {
ignoredProjects.addAll(
listOf(
"surf-cloud-core",
"surf-cloud-core-common",
"surf-cloud-core-client",
"surf-cloud-bukkit",
"surf-cloud-velocity",
"surf-cloud-standalone",
"surf-cloud-standalone-launcher",
"surf-cloud-test-standalone"
)
)
nonPublicMarkers.add("dev.slne.surf.cloud.api.common.util.annotation.InternalApi")
}

private fun TaskContainerScope.configureShadowJar() = withType<ShadowJar> {
mergeServiceFiles {
setPath("META-INF")
exclude("META-INF/MANIFEST.MF")
}

isZip64 = true
}

withType<Jar> {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
private fun TaskContainerScope.configureJar() = withType<Jar> {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

private fun setupPublishing() = afterEvaluate {
if (plugins.hasPlugin(PublishingPlugin::class)) {
configure<PublishingExtension> {
repositories {
slnePublic()
}
}
}
}
12 changes: 7 additions & 5 deletions buildSrc/src/main/kotlin/core-convention.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ plugins {
java
}

group = "dev.slne.surf.cloud"
version = "1.21.1-1.0.0-SNAPSHOT"


repositories {
mavenCentral()
}

dependencies {
implementation(platform("org.springframework.boot:spring-boot-dependencies:3.3.6"))
implementation(platform("org.springframework.boot:spring-boot-dependencies:3.4.3"))
implementation(platform("io.ktor:ktor-bom:3.0.3"))
implementation(platform("org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:2025.2.2"))


compileOnly("org.springframework.boot:spring-boot-configuration-processor:3.3.6")
"kapt"("org.springframework.boot:spring-boot-configuration-processor:3.3.6")
compileOnly("org.springframework.boot:spring-boot-configuration-processor:3.4.3")
// "kapt"("org.springframework.boot:spring-boot-configuration-processor:3.4.3")
}
6 changes: 6 additions & 0 deletions buildSrc/src/main/kotlin/exclude-kotlin.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
configurations {
"runtimeClasspath" {
exclude("org.jetbrains.kotlin", "kotlin-stdlib")
exclude("org.jetbrains.kotlin", "kotlin-reflect")
}
}
32 changes: 0 additions & 32 deletions buildSrc/src/main/kotlin/library-conventions.gradle.kts

This file was deleted.

1 change: 0 additions & 1 deletion docs/DocsModule.md

This file was deleted.

17 changes: 0 additions & 17 deletions docs/build.gradle.kts

This file was deleted.

5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
kapt.include.compile.classpath=false
org.gradle.parallel=true
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx4G

kotlin.stdlib.default.dependency=false

org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
kapt.use.k2=true

version=1.21.1-1.0.0-SNAPSHOT
79 changes: 76 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,81 @@
[versions]
velocity-version = "3.4.0-SNAPSHOT"
auto-service = "1.1.1"
aide-reflection = "1.3"
netty = "4.1.117.Final"
nbt = "6.1"
datafixerupper = "8.0.16"
byte-buddy = "1.15.10"
exposed = "0.60.0"
maven-impl = "4.0.0-rc-2"
maven-resolver = "2.0.5"
jline = "3.26.3"
brigadier = "1.3.10"
terminalconsoleappender = "1.3.0"
bson-kotlinx = "5.3.0"
aspectjweaver = "1.9.22.1"
zstd-jni = "1.5.6-9"
luckperms-api = "5.4"
reactive-streams = "1.0.4"
ehcache = "3.10.8"


[libraries]
velocity-native = { module = "com.velocitypowered:velocity-native", version.ref = "velocity-version" }
auto-service-annotations = { module = "com.google.auto.service:auto-service-annotations", version.ref = "auto-service" }
auto-service = { module = "com.google.auto.service:auto-service", version.ref = "auto-service" }
spring-boot-starter = { module = "org.springframework.boot:spring-boot-starter" }
spring-boot-starter-cache = { module = "org.springframework.boot:spring-boot-starter-cache" }
jackson-core = { module = "com.fasterxml.jackson.core:jackson-core" }
jackson-databind = { module = "com.fasterxml.jackson.core:jackson-databind" }
jackson-module-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin" }
aide-reflection = { module = "tech.hiddenproject:aide-reflection", version.ref = "aide-reflection" }
netty-all = { module = "io.netty:netty-all", version.ref = "netty" }
nbt = { module = "com.github.Querz:NBT", version.ref = "nbt" }
spring-data-jpa = { module = "org.springframework.data:spring-data-jpa" }
datafixerupper = { module = "com.mojang:datafixerupper", version.ref = "datafixerupper" }
byte-buddy = { module = "net.bytebuddy:byte-buddy", version.ref = "byte-buddy" }
jakarta-persistence-api = { module = "jakarta.persistence:jakarta.persistence-api" }
exposed-spring-boot-starter = { module = "org.jetbrains.exposed:exposed-spring-boot-starter", version.ref = "exposed" }
exposed-java-time = { module = "org.jetbrains.exposed:exposed-java-time", version.ref = "exposed" }
maven-impl = { module = "org.apache.maven:maven-impl", version.ref = "maven-impl" }
maven-resolver = { module = "org.apache.maven.resolver:maven-resolver-supplier-mvn4", version.ref = "maven-resolver" }
jline = { module = "org.jline:jline", version.ref = "jline" }
brigadier = { module = "com.mojang:brigadier", version.ref = "brigadier" }
terminalconsoleappender = { module = "net.minecrell:terminalconsoleappender", version.ref = "terminalconsoleappender" }
ktor-server-core-jvm = { module = "io.ktor:ktor-server-core-jvm" }
ktor-server-netty = { module = "io.ktor:ktor-server-netty" }
ktor-server-core = { module = "io.ktor:ktor-server-core" }
ktor-server-html-builder = { module = "io.ktor:ktor-server-html-builder" }
kotlin-css = { module = "org.jetbrains.kotlin-wrappers:kotlin-css" }
ktor-server-websockets = { module = "io.ktor:ktor-server-websockets" }
ktor-serialization-kotlinx-json = { module = "io.ktor:ktor-serialization-kotlinx-json" }
bson-kotlinx = { module = "org.mongodb:bson-kotlinx", version.ref = "bson-kotlinx" }
aspectjweaver = { module = "org.aspectj:aspectjweaver" }
aspectjrt = { module = "org.aspectj:aspectjrt" }
zstd-jni = { module = "com.github.luben:zstd-jni", version.ref = "zstd-jni" }
luckperms-api = { module = "net.luckperms:api", version.ref = "luckperms-api" }
mariadb-java-client = { module = "org.mariadb.jdbc:mariadb-java-client" }
mysql-connector-j = { module = "com.mysql:mysql-connector-j" }
spring-boot-starter-data-jpa = { module = "org.springframework.boot:spring-boot-starter-data-jpa" }
reactive-streams = { module = "org.reactivestreams:reactive-streams", version.ref = "reactive-streams" }
hibernate-jcache = { module = "org.hibernate.orm:hibernate-jcache" }
ehcache = { module = "org.ehcache:ehcache", version.ref = "ehcache" }
ktor-server-status-pages = { module = "io.ktor:ktor-server-status-pages" }
spring-boot-starter-log4j2 = { module = "org.springframework.boot:spring-boot-starter-log4j2" }
spring-aop = { module = "org.springframework:spring-aop" }
spring-aspects = { module = "org.springframework:spring-aspects" }
flyway-core = { module = "org.flywaydb:flyway-core" }
flyway-mysql = { module = "org.flywaydb:flyway-mysql" }
spring-instrument = { module = "org.springframework:spring-instrument" }


[plugins]
spring-boot = { id = "org.springframework.boot" }

[bundles]
spring-aop = ["spring-aop", "aspectjweaver", "aspectjrt", "spring-aspects"]
spring-api-common = ["spring-boot-starter", "spring-boot-starter-cache"]
jackson-api-common = ["jackson-core", "jackson-databind", "jackson-module-kotlin"]
exposed-api-server = ["exposed-spring-boot-starter", "exposed-java-time"]
maven-libraries = ["maven-impl", "maven-resolver"]
console-api = ["jline", "brigadier", "terminalconsoleappender"]
ktor-api-server = ["ktor-server-core-jvm", "ktor-server-netty", "ktor-server-core", "ktor-server-html-builder", "kotlin-css", "ktor-server-websockets", "ktor-serialization-kotlinx-json"]
flyway = ["flyway-core", "flyway-mysql"]
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
31 changes: 31 additions & 0 deletions qodana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#-------------------------------------------------------------------------------#
# Qodana analysis is configured by qodana.yaml file #
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
#-------------------------------------------------------------------------------#
version: "1.0"

#Specify inspection profile for code analysis
profile:
name: qodana.starter

#Enable inspections
#include:
# - name: <SomeEnabledInspectionId>

#Disable inspections
#exclude:
# - name: <SomeDisabledInspectionId>
# paths:
# - <path/where/not/run/inspection>

projectJDK: "21" #(Applied in CI/CD pipeline)

#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
#bootstrap: sh ./prepare-qodana.sh

#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
#plugins:
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)

#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
linter: jetbrains/qodana-jvm:2024.3
Loading