Refactor: Modernize build and publishing workflow

- Upgraded Kotlin from 1.7.20 to 1.9.20.
- Upgraded JDK from 11 to 21 across all GitHub Actions workflows.
- Replaced the legacy `maven-publish` plugin with `com.vanniktech.maven.publish` for simplified publishing to Maven Central.
- Removed the `publishSnapshot.yml` workflow, as snapshot publishing is now managed by the new plugin.
- Updated `publishRelease.yml` to use the `publishToMavenCentral` task and new secrets (`MAVEN_CENTRAL_USERNAME`, `MAVEN_CENTRAL_PASSWORD`).
- Simplified `build.gradle.kts` by removing manual publishing and signing logic.
- Set the JVM target to "21".
- Bumped the project version to `3.1.1`.
- Removed `js` targets and related configurations.
- Added a new code style configuration file for the project (`.idea/codeStyles/Project.xml`).
This commit is contained in:
2025-10-14 12:05:41 +02:00
parent 772eeb0465
commit 6f5ed9c681
5 changed files with 92 additions and 173 deletions

View File

@@ -19,20 +19,18 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 11
distribution: temurin
java-version: '21'
# Runs upload, and then closes & releases the repository
- name: Publish to MavenCentral
run: ./gradlew publish --max-workers 1
run: ./gradlew publishToMavenCentral
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
SNAPSHOT: false

View File

@@ -1,35 +0,0 @@
name: Publish Snapshot
on:
push:
branches: [master]
jobs:
test:
uses: ./.github/workflows/test.yml
secrets: inherit
publish:
needs: test
name: Publish Snapshot
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11
# Runs upload, and then closes & releases the repository
- name: Publish to snapshot to Sonatype
run: ./gradlew publish --max-workers 1
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
SNAPSHOT: true

View File

@@ -12,11 +12,11 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 11
distribution: temurin
java-version: '21'
# Builds the release artifacts of the library
- name: Test