diff --git a/.editorconfig b/.editorconfig index 54f391eb..33905f72 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,2 +1,12 @@ -[*.{kt,kts}] -max_line_length = 120 +root = true + +[*] +insert_final_newline = true + +[{*.kt,*.kts}] +ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL + +# Disable wildcard imports entirely +ij_kotlin_name_count_to_use_star_import = 2147483647 +ij_kotlin_name_count_to_use_star_import_for_members = 2147483647 +ij_kotlin_packages_to_use_import_on_demand = unset diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index e2ee760b..02a7d9f0 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -1,61 +1,61 @@ name: Publish Release on: - push: - branches: - - stable + push: + branches: + - stable - paths: - - '**/gradle.properties' + paths: + - '**/gradle.properties' - workflow_dispatch: + workflow_dispatch: jobs: - publish: - runs-on: ubuntu-latest - - steps: - # https://github.com/marketplace/actions/checkout - - uses: actions/checkout@v4 - - # https://github.com/marketplace/actions/setup-java-jdk - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: 17 - distribution: temurin - - - name: Set gradlew execution permission - run: chmod u+x gradlew - - # https://github.com/marketplace/actions/generate-version - - name: Get release version - uses: HardNorth/github-version-generate@v1.3.0 - with: - version-source: file - version-file: gradle.properties - version-file-extraction-pattern: '(?<=version=).+' - - # https://github.com/marketplace/actions/semver-parser - - name: Parse release version - uses: apexskier/github-semver-parse@v1 - id: semver - with: - version: ${{ env.RELEASE_VERSION }} - - # https://github.com/marketplace/actions/gradle-build-action - - name: Build artifacts - uses: gradle/gradle-build-action@v2 - with: - arguments: build - - # https://github.com/marketplace/actions/create-release - - name: Create release - uses: ncipollo/release-action@v1 - with: - name: Gateway ${{ env.RELEASE_VERSION }} - tag: v${{ env.RELEASE_VERSION }} - generateReleaseNotes: true - artifacts: 'build/libs/*.jar' - prerelease: ${{ !!steps.semver.outputs.prerelease }} - token: ${{ secrets.GITHUB_TOKEN }} + publish: + runs-on: ubuntu-latest + + steps: + # https://github.com/marketplace/actions/checkout + - uses: actions/checkout@v4 + + # https://github.com/marketplace/actions/setup-java-jdk + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 21 + distribution: temurin + + - name: Set gradlew execution permission + run: chmod u+x gradlew + + # https://github.com/marketplace/actions/generate-version + - name: Get release version + uses: HardNorth/github-version-generate@v1.4.0 + with: + version-source: file + version-file: gradle.properties + version-file-extraction-pattern: '(?<=version=).+' + + # https://github.com/marketplace/actions/semver-parser + - name: Parse release version + uses: apexskier/github-semver-parse@v1 + id: semver + with: + version: ${{ env.RELEASE_VERSION }} + + # https://github.com/marketplace/actions/gradle-build-action + - name: Build artifacts + uses: gradle/actions/setup-gradle@v3 + with: + arguments: build + + # https://github.com/marketplace/actions/create-release + - name: Create release + uses: ncipollo/release-action@v1 + with: + name: Gateway ${{ env.RELEASE_VERSION }} + tag: v${{ env.RELEASE_VERSION }} + generateReleaseNotes: true + artifacts: 'build/libs/*.jar' + prerelease: ${{ !!steps.semver.outputs.prerelease }} + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pull_request_check.yml b/.github/workflows/pull_request_check.yml index 881e1e1f..096c49aa 100644 --- a/.github/workflows/pull_request_check.yml +++ b/.github/workflows/pull_request_check.yml @@ -1,66 +1,66 @@ name: Check Pull Request on: - pull_request: - branches: - - stable - - develop + pull_request: + branches: + - stable + - develop - paths: - - '**/*.kt' - - '**/*.kts' + paths: + - '**/*.kt' + - '**/*.kts' jobs: - build: - runs-on: ubuntu-latest + build: + runs-on: ubuntu-latest - steps: - # https://github.com/marketplace/actions/checkout - - uses: actions/checkout@v4 + steps: + # https://github.com/marketplace/actions/checkout + - uses: actions/checkout@v4 - # https://github.com/marketplace/actions/setup-java-jdk - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: 17 - distribution: temurin + # https://github.com/marketplace/actions/setup-java-jdk + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 21 + distribution: temurin - - name: Set gradlew execution permission - run: chmod u+x gradlew + - name: Set gradlew execution permission + run: chmod u+x gradlew - # https://github.com/marketplace/actions/gradle-build-action - - name: Build artifacts - uses: gradle/gradle-build-action@v2 - with: - arguments: build --stacktrace + # https://github.com/marketplace/actions/gradle-build-action + - name: Build artifacts + uses: gradle/actions/setup-gradle@v3 + with: + arguments: build --stacktrace - ktlint: - runs-on: ubuntu-latest + ktlint: + runs-on: ubuntu-latest - steps: - # https://github.com/marketplace/actions/checkout - - uses: actions/checkout@v4 + steps: + # https://github.com/marketplace/actions/checkout + - uses: actions/checkout@v4 - # https://github.com/marketplace/actions/run-ktlint-with-reviewdog - - uses: ScaCap/action-ktlint@v1.8.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - ktlint_version: '1.0.1' - reporter: github-pr-review - fail_on_error: true + # https://github.com/marketplace/actions/run-ktlint-with-reviewdog + - uses: ScaCap/action-ktlint@v1.9.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + ktlint_version: '1.3.1' + reporter: github-pr-review + fail_on_error: true - detekt: - runs-on: ubuntu-latest + detekt: + runs-on: ubuntu-latest - steps: - # https://github.com/marketplace/actions/checkout - - uses: actions/checkout@v4 + steps: + # https://github.com/marketplace/actions/checkout + - uses: actions/checkout@v4 - # https://github.com/marketplace/actions/run-detekt-with-reviewdog - - name: Run detekt with reviewdog - uses: alaegin/Detekt-Action@v1.23.3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - detekt_config: config/detekt/detekt.yml - detekt_build_upon_default_config: true - reporter: github-pr-review + # https://github.com/marketplace/actions/run-detekt-with-reviewdog + - name: Run detekt with reviewdog + uses: alaegin/Detekt-Action@v1.23.6 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + detekt_config: config/detekt/detekt.yml + detekt_build_upon_default_config: true + reporter: github-pr-review diff --git a/.gitignore b/.gitignore index 7ad9fcc2..6e52f056 100644 --- a/.gitignore +++ b/.gitignore @@ -91,3 +91,6 @@ gradle-app.setting # Paper run run/ + +# Gradle docker cache +.gradleDocker diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 73f69e09..00000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml -# Editor-based HTTP Client requests -/httpRequests/ diff --git a/.idea/aws.xml b/.idea/aws.xml deleted file mode 100644 index 8e173182..00000000 --- a/.idea/aws.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/checkstyle-idea.xml b/.idea/checkstyle-idea.xml deleted file mode 100644 index 9da0b8ca..00000000 --- a/.idea/checkstyle-idea.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/checkstyleidea-libs/readme.txt b/.idea/checkstyleidea-libs/readme.txt deleted file mode 100644 index b4fa42cc..00000000 --- a/.idea/checkstyleidea-libs/readme.txt +++ /dev/null @@ -1,6 +0,0 @@ -This folder contains libraries copied from the "Gateway" project. -It is managed by the CheckStyle-IDEA IDE plugin. -Do not modify this folder while the IDE is running. -When the IDE is stopped, you may delete this folder at any time. It will be recreated as needed. -In order to prevent the CheckStyle-IDEA IDE plugin from creating this folder, -uncheck the "Copy libraries from project directory" option in the CheckStyle-IDEA settings dialog. diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index a2157208..00000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index 79ee123c..00000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml index b589d56e..b86273d9 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/detekt.xml b/.idea/detekt.xml deleted file mode 100644 index 31ac8051..00000000 --- a/.idea/detekt.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - true - $PROJECT_DIR$/config/detekt/detekt.yml - - \ No newline at end of file diff --git a/.idea/discord.xml b/.idea/discord.xml deleted file mode 100644 index d8e95616..00000000 --- a/.idea/discord.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index d079ef83..00000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/ktor.xml b/.idea/git_toolbox_blame.xml similarity index 50% rename from .idea/ktor.xml rename to .idea/git_toolbox_blame.xml index fac1a302..7dc12496 100644 --- a/.idea/ktor.xml +++ b/.idea/git_toolbox_blame.xml @@ -1,6 +1,6 @@ - - \ No newline at end of file diff --git a/.idea/git_toolbox_prj.xml b/.idea/git_toolbox_prj.xml index bcb1d9df..02b915b8 100644 --- a/.idea/git_toolbox_prj.xml +++ b/.idea/git_toolbox_prj.xml @@ -6,11 +6,6 @@ -