diff --git a/.github/renovate.json b/.github/renovate.json index 09c2a59831..99eeec1058 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,24 +1,32 @@ { "extends": [ - "config:base" + "config:recommended" + ], + "addLabels": [ + "type: dependency-upgrade" ], - "addLabels": ["type: dependency-upgrade"], "schedule": [ - "after 10pm every day" + "after 10pm" ], "prHourlyLimit": 1, "prConcurrentLimit": 20, "timezone": "Europe/Prague", "packageRules": [ { - "matchPackagePatterns": ["actions.*"], "dependencyDashboardApproval": true, - "matchUpdateTypes": ["patch"], + "matchUpdateTypes": [ + "patch" + ], "matchCurrentVersion": "!/^0/", - "automerge": true + "automerge": true, + "matchPackageNames": [ + "/actions.*/" + ] }, { - "matchUpdateTypes": ["patch"], + "matchUpdateTypes": [ + "patch" + ], "matchCurrentVersion": "!/^0/", "automerge": true } diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 571e79a24a..32d879ad18 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -30,6 +30,8 @@ jobs: PREDICTIVE_TEST_SELECTION: "${{ github.event_name == 'pull_request' && 'true' || 'false' }}" SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OSS_INDEX_USERNAME: ${{ secrets.OSS_INDEX_USERNAME }} + OSS_INDEX_PASSWORD: ${{ secrets.OSS_INDEX_PASSWORD }} steps: # https://github.com/actions/virtual-environments/issues/709 - name: "🗑 Free disk space" @@ -58,6 +60,11 @@ jobs: run: | [ -f ./setup.sh ] && ./setup.sh || [ ! -f ./setup.sh ] + - name: "🚔 Sonatype Scan" + id: sonatypescan + run: | + ./gradlew ossIndexAudit --no-parallel --info + - name: "🛠 Build with Gradle" id: gradle run: | diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index c72824333b..b78e6f381a 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -21,4 +21,5 @@ dependencies { implementation libs.gradle.spring.boot implementation libs.gradle.spring.dependencies implementation libs.gradle.shadow + implementation(libs.sonatype.scan) } diff --git a/buildSrc/src/main/groovy/io.micronaut.build.internal.data-module.gradle b/buildSrc/src/main/groovy/io.micronaut.build.internal.data-module.gradle index 10e7df7bef..ca1f3ba866 100644 --- a/buildSrc/src/main/groovy/io.micronaut.build.internal.data-module.gradle +++ b/buildSrc/src/main/groovy/io.micronaut.build.internal.data-module.gradle @@ -1,8 +1,17 @@ plugins { id "io.micronaut.build.internal.data-base" id "io.micronaut.build.internal.module" + id("org.sonatype.gradle.plugins.scan") +} +String ossIndexUsername = System.getenv("OSS_INDEX_USERNAME") ?: project.properties["ossIndexUsername"] +String ossIndexPassword = System.getenv("OSS_INDEX_PASSWORD") ?: project.properties["ossIndexPassword"] +boolean sonatypePluginConfigured = ossIndexUsername != null && ossIndexPassword != null +if (sonatypePluginConfigured) { + ossIndexAudit { + username = ossIndexUsername + password = ossIndexPassword + } } - dependencies { testRuntimeOnly mnSerde.micronaut.serde.jackson } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8bbaf233fc..5dbe14dac1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -42,6 +42,7 @@ jmh-gradle-plugin = "0.7.2" spring-boot-gradle-plugin = "3.4.1" spring-dependency-management-gradle-plugin = "1.1.7" shadow-gradle-plugin = "8.0.0" +sonatype-scan = "3.0.0" # Dependency versions which are found in the platform BOM # meaning that they should be extracted into their own BOM @@ -121,3 +122,4 @@ gradle-jmh = { module = "me.champeau.jmh:jmh-gradle-plugin", version.ref = "jmh- gradle-spring-boot = { module = "org.springframework.boot:spring-boot-gradle-plugin", version.ref = "spring-boot-gradle-plugin" } gradle-spring-dependencies = { module = "io.spring.gradle:dependency-management-plugin", version.ref = "spring-dependency-management-gradle-plugin" } gradle-shadow = { module = "gradle.plugin.com.github.johnrengelman:shadow", version.ref = "shadow-gradle-plugin" } +sonatype-scan = { module = "org.sonatype.gradle.plugins:scan-gradle-plugin", version.ref = "sonatype-scan" } diff --git a/gradlew b/gradlew index f5feea6d6b..f3b75f3b0d 100755 --- a/gradlew +++ b/gradlew @@ -86,8 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s -' "$PWD" ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum