Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonatype Scan Gradle Plugin #985

Open
wants to merge 9 commits into
base: 4.8.x
Choose a base branch
from
22 changes: 15 additions & 7 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -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
}
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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: |
Expand Down
1 change: 1 addition & 0 deletions build-logic/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ repositories {

dependencies {
implementation(libs.micronaut.gradle.plugin)
implementation(libs.sonatype.scan)
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
plugins {
id 'io.micronaut.build.internal.grpc-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
excludeCompileOnly = true
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
projectVersion=4.8.1-SNAPSHOT
projectVersion=4.9.0-SNAPSHOT
projectGroup=io.micronaut.grpc
title=Micronaut gRPC
projectDesc=Integration between Micronaut and gRPC
Expand Down
13 changes: 7 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
managed-grpc = '1.68.2'
managed-grpc = '1.69.0'
managed-protobuf = '3.25.5'
managed-protobuf-gradle = '0.9.4'
managed-grpc-kotlin = '1.4.1'
Expand All @@ -14,15 +14,16 @@ javax-annotation-api = '1.3.2'
micronaut-docs = '2.0.0'
micronaut-gradle-plugin = '4.4.4'
micronaut-tracing-legacy = '3.2.7'
micronaut = "4.7.4"
micronaut = "4.7.11"
micronaut-platform = "4.5.1"
micronaut-discovery-client = "4.4.0"
micronaut-discovery-client = "4.5.0"
micronaut-reactor = "3.6.0"
micronaut-tracing = "6.9.0"
micronaut-validation = "4.8.0"
micronaut-kotlin = "4.4.0"
micronaut-kotlin = "4.5.0"
micronaut-logging = "1.5.1"
micronaut-test = "4.5.0"
micronaut-test = "4.6.2"
sonatype-scan = "3.0.0"

[libraries]
# Managed
Expand Down Expand Up @@ -70,6 +71,6 @@ netty-tcnative-boringssl-static = { module = 'io.netty:netty-tcnative-boringssl-

opentracing-grpc = { module = 'io.opentracing.contrib:opentracing-grpc', version.ref = 'opentracing-grpc' }
opentracing-mock = { module = 'io.opentracing:opentracing-mock', version.ref = 'opentracing-mock' }

sonatype-scan = { module = "org.sonatype.gradle.plugins:scan-gradle-plugin", version.ref = "sonatype-scan" }
[plugins]
protobuf = { id = 'com.google.protobuf', version.ref = 'managed-protobuf-gradle' }
3 changes: 1 addition & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading