Skip to content

Commit

Permalink
ossIndexAudit
Browse files Browse the repository at this point in the history
  • Loading branch information
sdelamo committed Jan 8, 2025
1 parent ef0bc7d commit 4c0c5a7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 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.micronaut.crac.plugin)
implementation(libs.kotlin.gradle.plugin)
implementation(libs.kotlin.gradle.allopen)
implementation(libs.sonatype.scan)
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
plugins {
id("io.micronaut.build.internal.crac-base")
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 {
api(libs.managed.crac)
Expand Down
3 changes: 3 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spock = "2.3-groovy-4.0"
managed-crac = "1.5.0"

micronaut-logging = "1.4.0"
sonatype-scan = "3.0.0"

[libraries]
# Core
Expand All @@ -38,3 +39,5 @@ micronaut-gradle-plugin = { module = "io.micronaut.gradle:micronaut-gradle-plugi
micronaut-crac-plugin = { module = "io.micronaut.gradle:micronaut-crac-plugin", version.ref = 'micronaut-gradle-plugin' }
kotlin-gradle-plugin = { module = 'org.jetbrains.kotlin:kotlin-gradle-plugin', version.ref = 'kotlin' }
kotlin-gradle-allopen = { module = 'org.jetbrains.kotlin:kotlin-allopen', version.ref = 'kotlin' }
sonatype-scan = { module = "org.sonatype.gradle.plugins:scan-gradle-plugin", version.ref = "sonatype-scan" }

0 comments on commit 4c0c5a7

Please sign in to comment.