This is an automated email from the ASF dual-hosted git repository. jdaugherty pushed a commit to branch license-audit in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit b16eae1277ea6bb3deb6c868df0d8eb01376b6aa Author: James Daugherty <[email protected]> AuthorDate: Mon Apr 21 19:03:26 2025 -0400 Setup build to run Apache RAT --- .github/workflows/rat.yml | 36 ++++++++++++++++++++++++++++++++++++ build.gradle | 1 + buildSrc/build.gradle | 1 + gradle/rat-root-config.gradle | 12 ++++++++++++ 4 files changed, 50 insertions(+) diff --git a/.github/workflows/rat.yml b/.github/workflows/rat.yml new file mode 100644 index 0000000000..6c6556c7a5 --- /dev/null +++ b/.github/workflows/rat.yml @@ -0,0 +1,36 @@ +name: RAT Report +on: + push: + branches: + - '[4-9]+.[0-9]+.x' + - '[3-9]+.[3-9]+.x' + pull_request: + branches: + - '[4-9]+.[0-9]+.x' + - '[3-9]+.[3-9]+.x' +jobs: + rat-audit: + permissions: + contents: read # to fetch code (actions/checkout) + runs-on: ubuntu-latest + steps: + - name: "📥 Checkout repository" + uses: actions/checkout@v4 + - name: "☕️ Setup JDK" + uses: actions/setup-java@v4 + with: + distribution: liberica + java-version: 17 + - name: "🐘 Setup Gradle" + uses: gradle/actions/setup-gradle@v4 + with: + develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} + - name: "🔨 Build project" + working-directory: 'grails-gradle' + run: ./gradlew rat + - name: Upload RAT HTML report + if: always() + uses: actions/upload-artifact@v3 + with: + name: rat-report + path: build/reports/rat/report.html \ No newline at end of file diff --git a/build.gradle b/build.gradle index 329e664ed3..78ea59cc20 100644 --- a/build.gradle +++ b/build.gradle @@ -79,6 +79,7 @@ tasks.register('clean', Delete).configure { apply { from layout.projectDirectory.file('gradle/assemble-root-config.gradle') from layout.projectDirectory.file('gradle/publish-root-config.gradle') + from layout.projectDirectory.file('gradle/rat-root-config.gradle') } // For debugging the gradle task graph: Uncomment to show task dependencies when a task is run diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index bd51a2d578..5d45f8d0a6 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -30,4 +30,5 @@ dependencies { implementation 'org.apache.grails:grails-gradle-plugins' implementation 'org.asciidoctor:asciidoctor-gradle-jvm' implementation 'org.springframework.boot:spring-boot-gradle-plugin' + implementation 'org.nosphere.apache.rat:org.nosphere.apache.rat.gradle.plugin:0.8.1' } \ No newline at end of file diff --git a/gradle/rat-root-config.gradle b/gradle/rat-root-config.gradle new file mode 100644 index 0000000000..185a7dd36d --- /dev/null +++ b/gradle/rat-root-config.gradle @@ -0,0 +1,12 @@ +apply plugin: 'org.nosphere.apache.rat' + +tasks.named('rat') { + excludes = [ + '.asf.yaml', // ASF metadata for github integration excluded from src zip + '**/build/**', // Gradle generated build directories + '**/.gradle/**', '**/wrapper/**', 'gradlew*', // gradle wrapper files excluded from src zip + '**/*.html', // html files are only in test + '**/resources/*', // exclude test artifacts + 'out/**', '*.ipr', '**/*.iml', '*.iws', '.idea/**', // Intellij generated files + ] +} \ No newline at end of file
