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

Dependency updates and apply Sonatype Scan Gradle Plugin #2264

Merged
merged 12 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 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,12 @@ jobs:
run: |
[ -f ./setup.sh ] && ./setup.sh || [ ! -f ./setup.sh ]

- name: "🚔 Sonatype Scan"
id: sonatypescan
if: matrix.java == '17'
run: |
./gradlew ossIndexAudit --no-parallel

- name: "🛠 Build with Gradle"
id: gradle
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void run() {
GetOperationResponse result = serviceDiscoveryClient.getOperation(
GetOperationRequest.builder().operationId(operationId).build()
);
LOG.info("Service registration for operation {} resulted in {}", operationId, result.operation().status());
LOG.info("Service registration for operation {} resulted in {}", operationId, result == null || result.operation() == null ? null : result.operation().status());
if (result.operation().status() == OperationStatus.FAIL || result.operation().status() == OperationStatus.SUCCESS) {
registered = true; // either way we are done
if (result.operation().status() == OperationStatus.FAIL) {
Expand Down
3 changes: 2 additions & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ dependencies {
implementation libs.javapoet
implementation libs.gradle.micronaut
implementation libs.gradle.kotlin
}
implementation(libs.sonatype.scan)
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
plugins {
id "io.micronaut.build.internal.aws-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
excludeCoordinates = [
"org.eclipse.jetty:jetty-http:11.0.24" // no version of Jetty 11 patched https://ossindex.sonatype.org/component/pkg:maven/org.eclipse.jetty/jetty-http
]
}
}
configurations.all {
resolutionStrategy {
force("commons-io:commons-io:2.14.0") // first version patched https://ossindex.sonatype.org/component/pkg:maven/commons-io/commons-io
}
}
1 change: 1 addition & 0 deletions function-aws-api-proxy-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
dependencies {
api(mn.micronaut.http.server)
api(projects.micronautFunctionAwsApiProxy)
implementation(platform(mnServlet.boms.jetty))
implementation(libs.jetty.server)
testImplementation(mn.micronaut.http.client)
testImplementation(mn.micronaut.jackson.databind)
Expand Down
10 changes: 6 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
[versions]
micronaut = "4.7.2"
micronaut = "4.7.9"
micronaut-docs = "2.0.0"
micronaut-test = "4.5.0"
groovy = "4.0.22"
spock = "2.3-groovy-4.0"

bouncycastle = '1.70'
fileupload = '0.0.6'
jetty = '11.0.24'
logback-json-classic = '0.1.5'

micronaut-discovery = "4.5.0"
micronaut-groovy = "4.5.0"
micronaut-logging = "1.4.0"
micronaut-logging = "1.5.1"
micronaut-mongodb = "5.5.0"
micronaut-reactor = "3.6.0"
micronaut-security = "4.11.2"
Expand All @@ -35,6 +34,7 @@ micronaut-starter = "3.9.2"
slf4j = "2.0.16"
servlet-api = "2.5"
javapoet = "1.13.0"
sonatype-scan = "2.8.3"

# The following version should probably
# be defined in Micronaut Graal but it's not shipped with a BOM yet
Expand Down Expand Up @@ -90,7 +90,7 @@ bouncycastle-provider = { module = 'org.bouncycastle:bcprov-jdk15on', version.re
fileupload = { module = 'org.javadelight:delight-fileupload', version.ref = 'fileupload' }
graal-sdk = { module = 'org.graalvm.sdk:graal-sdk', version.ref = 'graal' }
jackson-afterburner = { module = 'com.fasterxml.jackson.module:jackson-module-afterburner' }
jetty-server = { module = 'org.eclipse.jetty:jetty-server', version.ref = 'jetty' }
jetty-server = { module = 'org.eclipse.jetty:jetty-server' }
jcl-over-slf4j = { module = 'org.slf4j:jcl-over-slf4j', version.ref = 'slf4j' }
junit-jupiter-engine = { module = 'org.junit.jupiter:junit-jupiter-engine' }
junit-jupiter-api = { module = 'org.junit.jupiter:junit-jupiter-api' }
Expand All @@ -115,6 +115,8 @@ managed-awssdk-secretsmanager = { module = 'software.amazon.awssdk:secretsmanage
managed-jcl-over-slf4j = { module = 'org.slf4j:jcl-over-slf4j', version.ref = 'slf4j' }

servlet-api = { module = 'javax.servlet:servlet-api', version.ref = 'servlet-api' }
sonatype-scan = { module = "org.sonatype.gradle.plugins:scan-gradle-plugin", version.ref = "sonatype-scan" }

# Gradle

gradle-micronaut = { module = "io.micronaut.gradle:micronaut-gradle-plugin", version.ref = "micronaut-gradle-plugin" }
Expand Down
Loading