diff --git a/.github/workflows/archrules.yml b/.github/workflows/archrules.yml new file mode 100644 index 0000000..eea25f1 --- /dev/null +++ b/.github/workflows/archrules.yml @@ -0,0 +1,40 @@ +# action for evaluating archrules on a single project repo +name: Nebula ArchRules +on: + push: + branches: + - 'main' + pull_request: + +jobs: + buildmultijdk: + runs-on: ubuntu-latest + name: ArchRules + steps: + - uses: actions/checkout@v6 + - name: Setup git user + run: | + git config --global user.name "Nebula Plugin Maintainers" + git config --global user.email "nebula-plugins-oss@netflix.com" + - name: Set up JDKs + uses: actions/setup-java@v5 + with: + distribution: 'zulu' + java-version: 21 + java-package: jdk + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v5 + with: + cache-overwrite-existing: true + build-scan-publish: true + build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service' + build-scan-terms-of-use-agree: 'yes' + - name: Gradle run archrules + run: ./gradlew --stacktrace archRulesConsoleReport archRulesMarkdownReport + - name: Arch Rule Reports step summary + run: cat build/reports/archrules/report.md > $GITHUB_STEP_SUMMARY + - name: PR Comment + if: github.event_name == 'pull_request' + run: gh pr comment ${{ github.event.number }} --edit-last --create-if-none -b "[ArchRules report](${{ github.server.url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" + env: + GH_TOKEN: ${{ github.token }} \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c32d137..4219a5d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,6 +35,9 @@ jobs: uses: gradle/actions/setup-gradle@v5 with: cache-overwrite-existing: true + build-scan-publish: true + build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service' + build-scan-terms-of-use-agree: 'yes' - name: Gradle build run: ./gradlew --stacktrace build env: diff --git a/.github/workflows/refresh-locks.yml b/.github/workflows/refresh-locks.yml new file mode 100644 index 0000000..c0bdba0 --- /dev/null +++ b/.github/workflows/refresh-locks.yml @@ -0,0 +1,40 @@ +name: Refresh Dependency Locks +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + +jobs: + refresh-locks: + runs-on: ubuntu-latest + name: Refresh Dependency Locks + steps: + - uses: actions/checkout@v6 + - name: Setup git user + run: | + git config --global user.name "Nebula Plugin Maintainers" + git config --global user.email "nebula-plugins-oss@netflix.com" + - name: Set up JDKs + uses: actions/setup-java@v5 + with: + distribution: 'zulu' + java-version: 21 + java-package: jdk + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v5 + with: + cache-overwrite-existing: true + build-scan-publish: true + build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service' + build-scan-terms-of-use-agree: 'yes' + - name: Gradle build + run: ./gradlew resolve --write-locks --refresh-dependencies --stacktrace + - name: Commit + run: | + git checkout -b dependency-update + git commit -a -m "Update dependencies" + git push -u origin dependency-update + - name: Open PR + run: gh pr create -B main -H dependency-update --title 'Update dependencies' --body 'Created by Github action' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43103fd..86b8fa2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,7 @@ on: jobs: publish: + if: github.event.base_ref == 'refs/heads/main' # tags must be pushed to main runs-on: ubuntu-latest name: Gradle Build and Publish environment: @@ -22,7 +23,7 @@ jobs: GRADLE_PUBLISH_KEY: ${{ secrets.ORG_GRADLE_PUBLISH_KEY }} GRADLE_PUBLISH_SECRET: ${{ secrets.ORG_GRADLE_PUBLISH_SECRET }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup git user run: | git config --global user.name "Nebula Plugin Maintainers" @@ -39,6 +40,11 @@ jobs: uses: gradle/actions/setup-gradle@v5 with: cache-overwrite-existing: true + build-scan-publish: true + build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service' + build-scan-terms-of-use-agree: 'yes' + - name: Gradle build + run: ./gradlew --stacktrace build - name: Verify plugin publication if: (!contains(github.ref, '-rc.')) run: ./gradlew --stacktrace -Prelease.useLastTag=true final publishPlugin --validate-only -x check diff --git a/gradle.lockfile b/gradle.lockfile index 0846cbd..fe08c48 100644 --- a/gradle.lockfile +++ b/gradle.lockfile @@ -5,14 +5,14 @@ cglib:cglib-nodep:3.2.2=testRuntimeClasspath com.github.stefanbirkner:system-rules:1.19.0=testCompileClasspath,testRuntimeClasspath com.googlecode.javaewah:JavaEWAH:1.2.3=testCompileClasspath,testRuntimeClasspath com.jcraft:jzlib:1.1.2=archRulesCompileClasspath,archRulesRuntimeClasspath,archRulesTestCompileClasspath,archRulesTestRuntimeClasspath,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.netflix.nebula:archrules-common:0.9.0=archRulesCompileClasspath,archRulesRuntimeClasspath,archRulesTestCompileClasspath,archRulesTestRuntimeClasspath +com.netflix.nebula:archrules-common:0.11.2=archRulesCompileClasspath,archRulesRuntimeClasspath,archRulesTestCompileClasspath,archRulesTestRuntimeClasspath com.netflix.nebula:gradle-contacts-plugin:8.1.0=archRulesCompileClasspath,archRulesRuntimeClasspath,archRulesTestCompileClasspath,archRulesTestRuntimeClasspath,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.netflix.nebula:nebula-archrules-core:0.14.2=archRulesCompileClasspath,archRulesRuntimeClasspath,archRulesTestCompileClasspath,archRulesTestRuntimeClasspath +com.netflix.nebula:nebula-archrules-core:1.1.1=archRulesCompileClasspath,archRulesRuntimeClasspath,archRulesTestCompileClasspath,archRulesTestRuntimeClasspath com.netflix.nebula:nebula-gradle-interop:3.1.0=archRulesCompileClasspath,archRulesRuntimeClasspath,archRulesTestCompileClasspath,archRulesTestRuntimeClasspath,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.netflix.nebula:nebula-test:11.12.0=testCompileClasspath,testRuntimeClasspath +com.netflix.nebula:nebula-test:12.4.3=testCompileClasspath,testRuntimeClasspath com.perforce:p4java:2015.2.1365273=archRulesCompileClasspath,archRulesRuntimeClasspath,archRulesTestCompileClasspath,archRulesTestRuntimeClasspath,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.tngtech.archunit:archunit:1.4.1=archRulesCompileClasspath,archRulesRuntimeClasspath,archRulesTestCompileClasspath,archRulesTestRuntimeClasspath -commons-codec:commons-codec:1.20.0=testCompileClasspath,testRuntimeClasspath +com.tngtech.archunit:archunit:1.4.2=archRulesCompileClasspath,archRulesRuntimeClasspath,archRulesTestCompileClasspath,archRulesTestRuntimeClasspath +commons-codec:commons-codec:1.21.0=testCompileClasspath,testRuntimeClasspath io.leangen.geantyref:geantyref:1.3.16=testRuntimeClasspath junit:junit-dep:4.11=testCompileClasspath,testRuntimeClasspath junit:junit:4.13.2=testCompileClasspath,testRuntimeClasspath @@ -24,7 +24,7 @@ org.apache.groovy:groovy-bom:4.0.29=testCompileClasspath,testRuntimeClasspath org.apache.groovy:groovy:4.0.29=testCompileClasspath,testRuntimeClasspath org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath -org.eclipse.jgit:org.eclipse.jgit:7.5.0.202512021534-r=testCompileClasspath,testRuntimeClasspath +org.eclipse.jgit:org.eclipse.jgit:7.6.0.202603022253-r=testCompileClasspath,testRuntimeClasspath org.hamcrest:hamcrest-core:1.3=testCompileClasspath,testRuntimeClasspath org.hamcrest:hamcrest:3.0=testCompileClasspath,testRuntimeClasspath org.jetbrains.kotlin:kotlin-reflect:2.2.20=compileClasspath,embeddedKotlin,testCompileClasspath,testRuntimeClasspath @@ -33,21 +33,21 @@ org.jetbrains.kotlin:kotlin-stdlib:2.2.20=archRulesCompileClasspath,archRulesRun org.jetbrains:annotations:13.0=archRulesCompileClasspath,archRulesRuntimeClasspath,archRulesTestCompileClasspath,archRulesTestRuntimeClasspath,compileClasspath,embeddedKotlin,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.jspecify:jspecify:1.0.0=archRulesCompileClasspath,archRulesRuntimeClasspath,archRulesTestCompileClasspath,archRulesTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath org.junit.jupiter:junit-jupiter-api:5.12.2=archRulesTestCompileClasspath,archRulesTestRuntimeClasspath -org.junit.jupiter:junit-jupiter-api:5.14.3=testCompileClasspath,testRuntimeClasspath +org.junit.jupiter:junit-jupiter-api:5.14.4=testCompileClasspath,testRuntimeClasspath org.junit.jupiter:junit-jupiter-engine:5.12.2=archRulesTestCompileClasspath,archRulesTestRuntimeClasspath -org.junit.jupiter:junit-jupiter-engine:5.14.3=testRuntimeClasspath +org.junit.jupiter:junit-jupiter-engine:5.14.4=testRuntimeClasspath org.junit.jupiter:junit-jupiter-params:5.12.2=archRulesTestCompileClasspath,archRulesTestRuntimeClasspath -org.junit.jupiter:junit-jupiter-params:5.14.3=testCompileClasspath,testRuntimeClasspath +org.junit.jupiter:junit-jupiter-params:5.14.4=testCompileClasspath,testRuntimeClasspath org.junit.jupiter:junit-jupiter:5.12.2=archRulesTestCompileClasspath,archRulesTestRuntimeClasspath -org.junit.jupiter:junit-jupiter:5.14.3=testCompileClasspath,testRuntimeClasspath +org.junit.jupiter:junit-jupiter:5.14.4=testCompileClasspath,testRuntimeClasspath org.junit.platform:junit-platform-commons:1.12.2=archRulesTestCompileClasspath,archRulesTestRuntimeClasspath -org.junit.platform:junit-platform-commons:1.14.3=testCompileClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-commons:1.14.4=testCompileClasspath,testRuntimeClasspath org.junit.platform:junit-platform-engine:1.12.2=archRulesTestCompileClasspath,archRulesTestRuntimeClasspath -org.junit.platform:junit-platform-engine:1.14.3=testCompileClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-engine:1.14.4=testCompileClasspath,testRuntimeClasspath org.junit.platform:junit-platform-launcher:1.12.2=archRulesTestRuntimeClasspath -org.junit.platform:junit-platform-launcher:1.14.3=testCompileClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-launcher:1.14.4=testCompileClasspath,testRuntimeClasspath org.junit:junit-bom:5.12.2=archRulesTestCompileClasspath,archRulesTestRuntimeClasspath -org.junit:junit-bom:5.14.3=testCompileClasspath,testRuntimeClasspath +org.junit:junit-bom:5.14.4=testCompileClasspath,testRuntimeClasspath org.objenesis:objenesis:2.4=testRuntimeClasspath org.opentest4j:opentest4j:1.3.0=archRulesTestCompileClasspath,archRulesTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath org.slf4j:slf4j-api:2.0.17=archRulesCompileClasspath,archRulesRuntimeClasspath,archRulesTestCompileClasspath,archRulesTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath diff --git a/gradle.properties b/gradle.properties index 99befd8..8edf5ab 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,7 @@ org.gradle.caching=true org.gradle.configuration-cache=true systemProp.nebula.features.coreLockingSupport=true -nebula.integTest=false \ No newline at end of file +nebula.integTest=false +# Disable Kotlin FUS (Feature Usage Statistics) to fix configuration cache issue +# See: https://youtrack.jetbrains.com/issue/KT-69078/Gradle-Add-option-to-disable-FUS-Service +kotlin.internal.collectFUSMetrics=false \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 4f6bbd7..4bf5bb4 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,19 +1,13 @@ pluginManagement { plugins { + id("com.netflix.nebula.oss.settings") version("25.+") id("com.netflix.nebula.plugin-plugin") version ("25.+") id("com.netflix.nebula.archrules.library") version ("0.+") } } plugins { - id "com.gradle.develocity" version "4.2" -} - -develocity { - buildScan { - termsOfUseUrl = 'https://gradle.com/terms-of-service' - termsOfUseAgree = 'yes' - } + id("com.netflix.nebula.oss.settings") } rootProject.name='gradle-info-plugin' diff --git a/src/main/groovy/nebula/plugin/info/InfoPlugin.groovy b/src/main/groovy/nebula/plugin/info/InfoPlugin.groovy index 5508cf8..c9b3623 100644 --- a/src/main/groovy/nebula/plugin/info/InfoPlugin.groovy +++ b/src/main/groovy/nebula/plugin/info/InfoPlugin.groovy @@ -77,9 +77,9 @@ class InfoPlugin implements Plugin { project.plugins.apply(InfoJavaPlugin) // Reporting - project.plugins.apply(InfoPropertiesFilePlugin) - project.plugins.apply(InfoJarPropertiesFilePlugin) - project.plugins.apply(InfoJarManifestPlugin) + project.plugins.apply("com.netflix.nebula.info-props") + project.plugins.apply("com.netflix.nebula.info-jar-properties") + project.plugins.apply("com.netflix.nebula.info-jar") } }