diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9c1f50..2c11fe9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,11 +16,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: distribution: temurin - java-version: '17' + java-version: '21' cache: maven - name: Set up Node.js (JS/TS analyzer tests need a Node runtime) diff --git a/.github/workflows/parity.yml b/.github/workflows/parity.yml index 94ce447..cc73b57 100644 --- a/.github/workflows/parity.yml +++ b/.github/workflows/parity.yml @@ -49,11 +49,11 @@ jobs: with: fetch-depth: 0 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: distribution: temurin - java-version: '17' + java-version: '21' - name: Set up Node.js 20 uses: actions/setup-node@v4 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bf15ccc..2f2adbd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -50,11 +50,11 @@ jobs: with: fetch-depth: 0 - - name: Set up JDK 17 + GPG + - name: Set up JDK 21 + GPG uses: actions/setup-java@v4 with: distribution: temurin - java-version: '17' + java-version: '21' server-id: central server-username: OSS_NEXUS_USER server-password: OSS_NEXUS_PASS diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 06e092a..e521b74 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -39,12 +39,13 @@ jobs: with: fetch-depth: 0 - # JDK 17 is the project's build/runtime target. Temurin is the safe default. - - name: Set up JDK 17 + # JDK 21 is the project's build/runtime target (required by + # sonarlint-analysis-engine 11.x / LTA 2026.1). Temurin is the safe default. + - name: Set up JDK 21 uses: actions/setup-java@v4 with: distribution: temurin - java-version: '17' + java-version: '21' # The JS/TS analyzer plugin spawns Node at runtime to lint JS/TS sources, # so Node must be on PATH when the scan runs (not just at build time). diff --git a/README.md b/README.md index d2093c6..0ee2f35 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ The JSON output carries both fields on every issue. | Requirement | For | |---|---| -| **Java 17+** (JDK or JRE) | running the CLI and daemon — auto-discovered (`JAVA_HOME` → `PATH` → common install locations) | +| **Java 21+** (JDK or JRE) | running the CLI and daemon — auto-discovered (`JAVA_HOME` → `PATH` → common install locations) | | **Linux or macOS** | the daemon uses Unix domain sockets (Windows support is on the roadmap) | | **`git`** | the `check --diff` workflow | | **Node.js 18.17+** | JavaScript / TypeScript analysis | diff --git a/pom.xml b/pom.xml index 02d7bcc..135a623 100644 --- a/pom.xml +++ b/pom.xml @@ -54,32 +54,51 @@ - 17 - 17 - 17 + + 21 + 21 + 21 UTF-8 2.17.2 5.10.2 - 10.24.0.81415 + + 11.3.0.85510 4.7.7 - 8.15.0.39343 - 5.5.0.23291 - 10.24.0.33043 - 3.46.0.13151 - 3.2.0.7239 + 8.29.0.43460 + 5.22.0.33216 + 12.5.0.41048 + 3.57.0.15976 + 3.6.0.9326 1.18.1.827 - 1.19.0.471 - 1.19.0.484 - 3.19.0.5695 - 2.13.0.5938 + 1.22.0.1992 + 1.23.0.2394 + 3.27.0.7699 + 2.17.0.7895 @@ -129,6 +148,18 @@ junit-jupiter test + + org.assertj + assertj-core + 3.27.7 + test + + + org.mockito + mockito-core + 5.15.2 + test + @@ -178,6 +209,27 @@ process-classes jar + + host-plugin-jar + process-test-classes + jar + + host + + io/github/randomcodespace/sonarpredict/hostplugin/** + + + + io.github.randomcodespace.sonarpredict.hostplugin.SonarPredictHostPlugin + sonarpredict-host + Sonar Predictor Host + ${project.version} + 9.9 + true + + + + @@ -348,6 +400,42 @@ + + + org.apache.maven.plugins + maven-antrun-plugin + 3.1.0 + + + copy-host-plugin-for-tests + process-test-classes + run + + + + + + + + + + + + + diff --git a/src/main/assembly/dist.xml b/src/main/assembly/dist.xml index b156c27..9b1960f 100644 --- a/src/main/assembly/dist.xml +++ b/src/main/assembly/dist.xml @@ -50,6 +50,17 @@ + + + ${project.build.directory} + plugins + + sonar-predictor-*-host.jar + + +