This commit is contained in:
@@ -2,12 +2,37 @@ name: CI
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
env:
|
||||||
|
JAVA_VERSION: '25'
|
||||||
|
GRADLE_VERSION: '8.14.5'
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: woryzen
|
name: Compile, test and publish
|
||||||
|
runs-on: home
|
||||||
|
timeout-minutes: 30
|
||||||
|
container:
|
||||||
|
image: gitea.woggioni.net/woggioni/gitea-runner/debian:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Set up JDK
|
||||||
|
uses: actions/setup-java@v5
|
||||||
|
with:
|
||||||
|
distribution: 'oracle'
|
||||||
|
java-version: ${{ env.JAVA_VERSION }}
|
||||||
|
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@v6
|
||||||
|
with:
|
||||||
|
gradle-version: ${{ env.GRADLE_VERSION }}
|
||||||
|
# Only the main branch writes to the cache; PRs/feature branches read-only
|
||||||
|
cache-read-only: false
|
||||||
|
|
||||||
|
- name: Run Gradle build
|
||||||
|
run: ./gradlew build --no-daemon
|
||||||
|
|
||||||
- name: Execute Gradle build
|
- name: Execute Gradle build
|
||||||
env:
|
env:
|
||||||
PUBLISHER_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}
|
PUBLISHER_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import org.gradle.api.tasks.compile.JavaCompile;
|
|||||||
import javax.tools.Diagnostic;
|
import javax.tools.Diagnostic;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.jar.Attributes;
|
import java.util.jar.Attributes;
|
||||||
import java.util.jar.Manifest;
|
import java.util.jar.Manifest;
|
||||||
|
|
||||||
@@ -56,7 +57,10 @@ public class FinalGuardPlugin implements Plugin<Project> {
|
|||||||
tasks.withType(JavaCompile.class, javaCompileTask -> {
|
tasks.withType(JavaCompile.class, javaCompileTask -> {
|
||||||
javaCompileTask.doFirst(t -> {
|
javaCompileTask.doFirst(t -> {
|
||||||
final CompileOptions options = javaCompileTask.getOptions();
|
final CompileOptions options = javaCompileTask.getOptions();
|
||||||
options.setAnnotationProcessorPath(options.getAnnotationProcessorPath().plus(javacPluginConfiguration));
|
options.setAnnotationProcessorPath(Optional.ofNullable(options.getAnnotationProcessorPath())
|
||||||
|
.orElseGet(project::files)
|
||||||
|
.plus(javacPluginConfiguration)
|
||||||
|
);
|
||||||
final StringBuilder xpluginArg = new StringBuilder("-Xplugin:").append(JAVAC_PLUGIN_NAME);
|
final StringBuilder xpluginArg = new StringBuilder("-Xplugin:").append(JAVAC_PLUGIN_NAME);
|
||||||
appendOption(xpluginArg, "default.level", finalGuardExtension.getDefaultLevel());
|
appendOption(xpluginArg, "default.level", finalGuardExtension.getDefaultLevel());
|
||||||
appendOption(xpluginArg, "local.variable.level", finalGuardExtension.getLocalVariableLevel());
|
appendOption(xpluginArg, "local.variable.level", finalGuardExtension.getLocalVariableLevel());
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
lys.catalog.version=2026.06.08
|
lys.catalog.version=2026.06.08
|
||||||
version.myGradlePlugins=2026.06.09
|
version.myGradlePlugins=2026.07.13
|
||||||
version.gradle=8.14.5
|
version.gradle=8.14.5
|
||||||
|
|
||||||
gitea.maven.url = https://gitea.woggioni.net/api/packages/woggioni/maven
|
gitea.maven.url = https://gitea.woggioni.net/api/packages/woggioni/maven
|
||||||
|
|||||||
Reference in New Issue
Block a user