Skip to content

Commit

Permalink
Merge pull request #203 from DecwLK/runner_migration
Browse files Browse the repository at this point in the history
checkstyle is now performed as gradle plugin; migration from self hos…
  • Loading branch information
DecwLK authored Mar 18, 2024
2 parents e5bea3f + 267eb99 commit a58b80b
Show file tree
Hide file tree
Showing 7 changed files with 376 additions and 33 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/checkstyle.yml

This file was deleted.

33 changes: 14 additions & 19 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: Java CI with Gradle

on: [push, pull_request]

permissions:
contents: read

name: Run Gradle on every push
on: push
jobs:
build:
runs-on: self-hosted
gradle:
steps:
- uses: actions/checkout@v3
- name: Build with Gradle
run: gradle build
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Execute Gradle build
run: ./gradlew build
7 changes: 6 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import net.ltgt.gradle.errorprone.errorprone

plugins {
jacoco
id("checkstyle")
id("com.github.johnrengelman.shadow") version "8.1.1"
id("java")
id("application")
Expand Down Expand Up @@ -48,6 +49,10 @@ tasks.withType<JavaCompile>().configureEach {
options.errorprone.disableWarningsInGeneratedCode.set(true)
}

checkstyle {
toolVersion = "10.12.5"
}

val generateGrammarSource by tasks.existing(AntlrTask::class) {
arguments.add("-visitor")
arguments.add("-package")
Expand Down Expand Up @@ -88,4 +93,4 @@ tasks {
shadowJar {
exclude("module-info.class")
}
}
}
10 changes: 10 additions & 0 deletions config/checkstyle/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0"?>

<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">

<suppressions>
<suppress files="[\\/]test[\\/]" checks=".*"/>
<suppress files="[\\/]generated-src[\\/]" checks=".*"/>
</suppressions>
Loading

0 comments on commit a58b80b

Please sign in to comment.