Skip to content

Commit

Permalink
sonatype
Browse files Browse the repository at this point in the history
  • Loading branch information
sdelamo committed Jan 9, 2025
1 parent 279cc3b commit d42bc9f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OSS_INDEX_USERNAME: ${{ secrets.OSS_INDEX_USERNAME }}
OSS_INDEX_PASSWORD: ${{ secrets.OSS_INDEX_PASSWORD }}
OSS_INDEX_PASSWORD: ${{ secrets.OSS_INDEX_PASSWORD }}
steps:
# https://github.com/actions/virtual-environments/issues/709
- name: "🗑 Free disk space"
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- name: "🚔 Sonatype Scan"
id: sonatypescan
run: |
./gradlew ossIndexAudit --no-parallel
./gradlew ossIndexAudit --no-parallel --info
- name: "🛠 Build with Gradle"
id: gradle
Expand Down
1 change: 1 addition & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ dependencies {
implementation libs.gradle.kotlin
implementation libs.gradle.kotlin.allopen
implementation libs.gradle.kotlin.noarg
implementation(libs.sonatype.scan)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,14 @@ plugins {
id "java-library"
id "io.micronaut.build.internal.r2dbc-dependencies"
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
}
}
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ managed-r2dbc-mssql = "1.0.2.RELEASE"
micronaut-gradle-plugin = "4.4.4"
micronaut-test-resources = "2.6.2"
kotlin-gradle-plugin = "1.9.25"
sonatype-scan = "3.0.0"

[libraries]
# Core
Expand Down Expand Up @@ -77,4 +78,4 @@ gradle-micronaut = { module = "io.micronaut.gradle:micronaut-gradle-plugin", ver
gradle-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin-gradle-plugin" }
gradle-kotlin-allopen = { module = "org.jetbrains.kotlin:kotlin-allopen", version.ref = "kotlin-gradle-plugin" }
gradle-kotlin-noarg = { module = "org.jetbrains.kotlin:kotlin-noarg", version.ref = "kotlin-gradle-plugin" }

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

0 comments on commit d42bc9f

Please sign in to comment.