Skip to content

Commit

Permalink
Merge branch 'refs/heads/nightly' into fix/module-dependencies
Browse files Browse the repository at this point in the history
# Conflicts:
#	driver/src/main/java/eu/cloudnetservice/driver/module/DefaultModuleProvider.java
  • Loading branch information
DasBabyPixel committed Jul 9, 2024
2 parents 62c2a63 + f00c6c8 commit eed4786
Show file tree
Hide file tree
Showing 421 changed files with 3,376 additions and 32,354 deletions.
36 changes: 32 additions & 4 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,44 @@
"enabled": false
},
{
"description": "Breaks old databases so we don't need updates",
"description": "Disabled because we support sponge >=8",
"matchPackagePrefixes": [
"com.h2database:"
"org.spongepowered"
],
"enabled": false
},
{
"description": "Disabled because renovate does not understand minestom versioning",
"matchPackagePrefixes": [
"net.minestom:"
],
"enabled": false
},
{
"description": "Disabled because we cannot support waterdog v2 for now",
"matchPackagePrefixes": [
"dev.waterdog.waterdogpe:"
],
"enabled": false
},
{
"description": "Version is based on the latest push to a git repo and never needs updates",
"description": "Disabled because we don't want to pin our versions",
"matchPackagePrefixes": [
"com.github.juliarn:"
"azul/zulu-openjdk"
],
"enabled": false
},
{
"description": "Disabled because renovate is incapable of updating npc-lib",
"matchPackagePrefixes": [
"io.github.juliarn:"
],
"enabled": false
},
{
"description": "Breaks old databases so we don't need updates",
"matchPackagePrefixes": [
"com.h2database:"
],
"enabled": false
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup java
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
check-latest: true
distribution: 'zulu'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gradle-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
uses: actions/checkout@v4

- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v2
uses: gradle/actions/wrapper-validation@v3

- name: Setup java
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
check-latest: true
distribution: 'zulu'

Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:
fail-fast: false
matrix:
java:
- 17
- 21

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v2
uses: gradle/actions/wrapper-validation@v3

- name: Setup java
uses: actions/setup-java@v4
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Setup gradle cache
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/nightly' || matrix.java != 17 }}
cache-read-only: ${{ github.ref != 'refs/heads/nightly' || matrix.java != 21 }}

- name: Setup Loom cache
uses: actions/cache@v4
Expand All @@ -52,7 +52,7 @@ jobs:
run: ./gradlew build test shadowJar genUpdaterInformation --stacktrace

- name: Publish test summary
if: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && matrix.java == 17 }}
if: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && matrix.java == 21 }}
uses: EnricoMi/publish-unit-test-result-action@v2
with:
junit_files: "**/build/test-results/test/TEST-*.xml"
Expand All @@ -63,7 +63,7 @@ jobs:

- name: Publish updater metadata
uses: s0/git-publish-subdir-action@develop
if: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/heads/renovate/') && !startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && matrix.java == 17 }}
if: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/heads/renovate/') && !startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && matrix.java == 21 }}
env:
REPO: [email protected]:CloudNetService/launchermeta.git
BRANCH: ${{ steps.branch-name.outputs.current_branch }}
Expand All @@ -75,7 +75,7 @@ jobs:
MESSAGE: 'Update launcher meta for {target-branch} (commit: {sha})'

- name: Set version type in GitHub environment
if: ${{ matrix.java == 17 }}
if: ${{ matrix.java == 21 }}
run: |
if [ "$(./gradlew properties | awk '/^version:/ { print $2; }' | grep '\-SNAPSHOT')" ]; then
echo "STATUS=snapshot" >> $GITHUB_ENV
Expand All @@ -84,14 +84,14 @@ jobs:
fi
- name: Publish snapshot to Sonatype
if: ${{ github.event_name == 'push' && env.STATUS != 'release' && startsWith(github.ref, 'refs/heads/nightly') && !startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && matrix.java == 17 }}
if: ${{ github.event_name == 'push' && env.STATUS != 'release' && startsWith(github.ref, 'refs/heads/nightly') && !startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && matrix.java == 21 }}
run: ./gradlew publish
env:
SONATYPE_USER: "${{ secrets.SONATYPE_USER }}"
SONATYPE_TOKEN: "${{ secrets.SONATYPE_TOKEN }}"

- name: Prepare artifacts zip
if: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && matrix.java == 17 }}
if: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && matrix.java == 21 }}
run: |
mkdir -p temp/;
mkdir -p temp/plugins;
Expand All @@ -104,7 +104,7 @@ jobs:
- name: Upload artifacts zip
uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && matrix.java == 17 }}
if: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && matrix.java == 21 }}
with:
name: CloudNet
path: temp/
3 changes: 3 additions & 0 deletions .idea/codeStyles/Project.xml

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

1 change: 1 addition & 0 deletions .template/start.command
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash

cd "$(dirname "$0")" || exit 1

# check if java is installed
Expand Down
1 change: 1 addition & 0 deletions .template/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh

cd "$(dirname "$(readlink -fn "$0")")" || exit 1

# check if java is installed
Expand Down
2 changes: 1 addition & 1 deletion build-extensions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ repositories {

dependencies {
implementation("net.kyori", "indra-common", "3.1.3")
implementation("com.google.code.gson", "gson", "2.10.1")
implementation("com.google.code.gson", "gson", "2.11.0")
}
4 changes: 1 addition & 3 deletions build-extensions/src/main/kotlin/Files.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ object Files {

const val injectSupport = "platform-inject-support.jar"

const val chatPlugin = "cloudnet-chat.jar"
const val papiExpansion = "cloudnet-papi-expansion.jar"
const val simpleNameTagsPlugin = "cloudnet-simplenametags.jar"
const val luckPermsPlugin = "cloudnet-luckperms.jar"

const val bridge = "cloudnet-bridge.jar"
const val cloudflare = "cloudnet-cloudflare.jar"
const val cloudperms = "cloudnet-cloudperms.jar"
const val dockerizedServices = "cloudnet-dockerized-services.jar"
const val databaseMongo = "cloudnet-database-mongodb.jar"
const val databaseMysql = "cloudnet-database-mysql.jar"
Expand Down
2 changes: 1 addition & 1 deletion build-extensions/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
object Versions {

// internal versions
const val cloudNet = "4.0.0-RC10-SNAPSHOT"
const val cloudNet = "4.0.0-RC11-SNAPSHOT"
const val cloudNetCodeName = "Blizzard"
}
15 changes: 6 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ subprojects {
}

tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = JavaVersion.VERSION_17.toString()
targetCompatibility = JavaVersion.VERSION_17.toString()
sourceCompatibility = JavaVersion.VERSION_21.toString()
targetCompatibility = JavaVersion.VERSION_21.toString()
// options
options.encoding = "UTF-8"
options.isIncremental = true
Expand All @@ -120,13 +120,6 @@ subprojects {
toolVersion = rootProject.libs.versions.checkstyleTools.get()
}

// checkstyle issue https://github.com/checkstyle/checkstyle/issues/14211
configurations.named("checkstyle") {
resolutionStrategy.capabilitiesResolution.withCapability("com.google.collections:google-collections") {
select("com.google.guava:guava:0")
}
}

extensions.configure<SpotlessExtension> {
java {
licenseHeaderFile(rootProject.file("LICENSE_HEADER"))
Expand All @@ -148,6 +141,10 @@ subprojects {
applyDefaultJavadocOptions(options)
}

tasks.withType<JavaCompile> {
dependsOn(tasks.withType<ProcessResources>())
}

// all these projects are publishing their java artifacts
configurePublishing("java", true)
}
Expand Down
2 changes: 1 addition & 1 deletion checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
<property name="fileNamePattern" value="(module\-info\.java$)|(.*[\\|\/]fabric[\\|\/].*$)"/>
</module>
<module name="SuppressionFilter">
<property default="checkstyle-suppressions.xml" name="file"
Expand Down
4 changes: 4 additions & 0 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ dependencies {
"api"(libs.vavr)
"implementation"(libs.gson)
"implementation"(libs.guava)

"api"(libs.slf4jApi)
"api"(libs.logbackClassic)
"api"(libs.logbackCore)
}
20 changes: 10 additions & 10 deletions common/src/main/java/eu/cloudnetservice/common/io/FileUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

package eu.cloudnetservice.common.io;

import eu.cloudnetservice.common.log.LogManager;
import eu.cloudnetservice.common.log.Logger;
import io.vavr.CheckedConsumer;
import io.vavr.CheckedFunction1;
import java.io.IOException;
Expand All @@ -37,6 +35,8 @@
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.UnknownNullability;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* This file utility class wraps convenient non-blocking-io methods that use checked exceptions into methods that catch
Expand All @@ -49,7 +49,7 @@ public final class FileUtil {

public static final Path TEMP_DIR = Path.of(System.getProperty("cloudnet.tempDir", "temp"));

private static final Logger LOGGER = LogManager.logger(FileUtil.class);
private static final Logger LOGGER = LoggerFactory.getLogger(FileUtil.class);
private static final DirectoryStream.Filter<Path> ACCEPTING_FILTER = $ -> true;

private static final FileSystemProvider JAR_FILE_SYSTEM_PROVIDER;
Expand Down Expand Up @@ -81,7 +81,7 @@ public static void openZipFile(@NonNull Path zip, @NonNull CheckedConsumer<FileS
try (var fs = JAR_FILE_SYSTEM_PROVIDER.newFileSystem(zip, ZIP_FILE_SYSTEM_PROPERTIES)) {
consumer.accept(fs);
} catch (Throwable throwable) {
LOGGER.severe("Exception opening zip file system on %s", throwable, zip);
LOGGER.error("Exception opening zip file system on {}", zip, throwable);
}
}

Expand Down Expand Up @@ -122,7 +122,7 @@ public static void move(@NonNull Path from, @NonNull Path to, CopyOption @NonNul
try {
Files.move(from, to, options);
} catch (IOException exception) {
LOGGER.severe("Exception moving file from %s to %s", exception, from, to);
LOGGER.error("Exception moving file from {} to {}", from, to, exception);
}
}

Expand All @@ -139,7 +139,7 @@ public static void copy(@Nullable InputStream inputStream, @Nullable OutputStrea
try {
inputStream.transferTo(outputStream);
} catch (IOException exception) {
LOGGER.severe("Exception copying input stream to output stream", exception);
LOGGER.error("Exception copying input stream to output stream", exception);
}
}
}
Expand All @@ -158,7 +158,7 @@ public static void copy(@Nullable InputStream inputStream, @Nullable Path target
try (var out = Files.newOutputStream(target)) {
FileUtil.copy(inputStream, out);
} catch (IOException exception) {
LOGGER.severe("Exception copying input stream to %s", exception, target);
LOGGER.error("Exception copying input stream to {}", target, exception);
}
}
}
Expand All @@ -178,7 +178,7 @@ public static void copy(@NonNull Path from, @NonNull Path to) {
createDirectory(to.getParent());
Files.copy(from, to, StandardCopyOption.REPLACE_EXISTING);
} catch (IOException exception) {
LOGGER.severe("Exception copying file from %s to %s", exception, from, to);
LOGGER.error("Exception copying file from {} to {}", from, to, exception);
}
}

Expand Down Expand Up @@ -334,7 +334,7 @@ public static void walkFileTree(
consumer.accept(root, path);
}
} catch (IOException exception) {
LOGGER.severe("Exception walking down directory tree starting at %s", exception, root);
LOGGER.error("Exception walking down directory tree starting at {}", root, exception);
}
}
}
Expand All @@ -351,7 +351,7 @@ public static void createDirectory(@Nullable Path directoryPath) {
try {
Files.createDirectories(directoryPath);
} catch (IOException exception) {
LOGGER.severe("Exception creating directory at %s", exception, directoryPath);
LOGGER.error("Exception creating directory at {}", directoryPath, exception);
}
}
}
Expand Down
Loading

0 comments on commit eed4786

Please sign in to comment.