diff --git a/.github/workflows/build_and_push.yml b/.github/workflows/build_and_push.yml index 7c8bfa2..d21976e 100644 --- a/.github/workflows/build_and_push.yml +++ b/.github/workflows/build_and_push.yml @@ -9,9 +9,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2 + - name: cache - uses: actions/cache@v4 + uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # 5.0.5 with: path: | ~/.gradle/caches @@ -21,16 +22,18 @@ jobs: caches- - name: Set up JDK - uses: actions/setup-java@v4 + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # 5.2.0 with: distribution: 'temurin' - java-version: 21 + java-version: 25 + - name: Verify Gradle + uses: gradle/actions/wrapper-validation@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0 - name: Build with Gradle run: ./gradlew build - name: Upload-Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: artifact path: build/libs/ @@ -49,27 +52,27 @@ jobs: run: | echo IMAGE_TAG=$([ "$GITHUB_REF" = "refs/heads/master" ] && echo "latest" || ([ "$GITHUB_EVENT_NAME" = 'pull_request' ] && echo pr-${{github.event.pull_request.number}} || echo ${GITHUB_REF##*/})) >> $GITHUB_ENV echo IMAGE_NAME=${GITHUB_REPOSITORY,,} >>${GITHUB_ENV} - + - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2 - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1 with: name: artifact path: build/libs/ - name: Copy build file run: cp build/libs/galaxy-proxy-1.0-SNAPSHOT.jar docker/plugins - + - name: Log in to the Container registry - uses: docker/login-action@v3 + uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # 4.1.0 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - + - name: build run: docker build --build-arg BUILDKIT_INLINE_CACHE=1 --pull --cache-from $REGISTRY/$IMAGE_NAME:latest -t $REGISTRY/$IMAGE_NAME:$IMAGE_TAG . - + - name: push run: docker push $REGISTRY/$IMAGE_NAME:$IMAGE_TAG diff --git a/Dockerfile b/Dockerfile index 50c5264..03bd773 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ #syntax=docker/dockerfile:1 -FROM eclipse-temurin:21-jre-alpine +FROM eclipse-temurin:25-jre-alpine RUN apk add --no-cache bash RUN mkdir /app && chown 1000:100 /app USER 1000 @@ -8,7 +8,7 @@ WORKDIR /app COPY --chown=1000 --link docker /app # Download Velocity -ADD --chown=1000 --checksum=sha256:ef1a852bfae7397e84907837925e7ad21c6312066290edaae401b77f6f423ac3 --link https://fill-data.papermc.io/v1/objects/ef1a852bfae7397e84907837925e7ad21c6312066290edaae401b77f6f423ac3/velocity-3.4.0-SNAPSHOT-558.jar /app/velocity.jar +ADD --chown=1000 --checksum=sha256:25bfbee6155fbce24f709bf18f1bb915817c4151d6d418ca01282742ab1f123a --link https://fill-data.papermc.io/v1/objects/25bfbee6155fbce24f709bf18f1bb915817c4151d6d418ca01282742ab1f123a/velocity-3.5.0-SNAPSHOT-593.jar /app/velocity.jar # Run Server EXPOSE 25565 diff --git a/build.gradle.kts b/build.gradle.kts index 923b8da..43ce933 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,9 +2,9 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("jvm") version "2.3.0" - kotlin("kapt") version "2.3.0" - id("com.gradleup.shadow") version "9.3.0" + kotlin("jvm") version "2.3.20" + kotlin("kapt") version "2.3.20" + id("com.gradleup.shadow") version "9.4.1" } group = "one.oktw" @@ -22,19 +22,19 @@ repositories { } dependencies { - kapt("com.velocitypowered:velocity-api:3.4.0-SNAPSHOT") - compileOnly("com.velocitypowered:velocity-api:3.4.0-SNAPSHOT") - implementation("io.fabric8:kubernetes-client:7.4.0") - implementation("io.fabric8:kubernetes-httpclient-okhttp:7.4.0") + kapt("com.velocitypowered:velocity-api:3.5.0-SNAPSHOT") + compileOnly("com.velocitypowered:velocity-api:3.5.0-SNAPSHOT") + implementation("io.fabric8:kubernetes-client:7.6.1") + implementation("io.fabric8:kubernetes-httpclient-okhttp:7.6.1") implementation("com.github.fkorotkov:k8s-kotlin-dsl:3.5.0") - implementation("io.lettuce:lettuce-core:6.8.2.RELEASE") + implementation("io.lettuce:lettuce-core:7.5.1.RELEASE") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactive")// lettuce need this - implementation("one.oktw:galaxy-lib:2235da5") + implementation("one.oktw:galaxy-lib:9546e40") } tasks.withType().configureEach { compilerOptions { - jvmTarget = JvmTarget.JVM_21 + jvmTarget = JvmTarget.JVM_25 } } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index f8e1ee3..d997cfc 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 23449a2..c61a118 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index adff685..739907d 100755 --- a/gradlew +++ b/gradlew @@ -57,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/2d6327017519d23b96af35865dc997fcb544fb40/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. diff --git a/src/main/kotlin/one/oktw/galaxy/proxy/config/model/ProxyConfig.kt b/src/main/kotlin/one/oktw/galaxy/proxy/config/model/ProxyConfig.kt index 15862a8..ed34432 100644 --- a/src/main/kotlin/one/oktw/galaxy/proxy/config/model/ProxyConfig.kt +++ b/src/main/kotlin/one/oktw/galaxy/proxy/config/model/ProxyConfig.kt @@ -1,5 +1,5 @@ package one.oktw.galaxy.proxy.config.model data class ProxyConfig( - val ProtocolVersion: Int = 774 // default Minecraft 1.21.11 + val ProtocolVersion: Int = 775 // default Minecraft 26.1-26.1.2 ) diff --git a/src/main/resources/config/proxy.json b/src/main/resources/config/proxy.json index 9dfd065..db774a5 100644 --- a/src/main/resources/config/proxy.json +++ b/src/main/resources/config/proxy.json @@ -1,3 +1,3 @@ { - "ProtocolVersion": 774 + "ProtocolVersion": 775 }