Skip to content

Commit afa5f08

Browse files
Configure credentials for ossindex (#58)
* Bump gradle/actions from 4 to 5 Bumps [gradle/actions](https://github.com/gradle/actions) from 4 to 5. - [Release notes](https://github.com/gradle/actions/releases) - [Commits](gradle/actions@v4...v5) --- updated-dependencies: - dependency-name: gradle/actions dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Bump actions/github-script from 7 to 8 Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](actions/github-script@v7...v8) --- updated-dependencies: - dependency-name: actions/github-script dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Configure credentials for ossindex * Add changelog entry * Fix broken link * Don't fail build for missing ossindex credentials --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: kaklakariada <[email protected]>
1 parent f998678 commit afa5f08

File tree

6 files changed

+30
-9
lines changed

6 files changed

+30
-9
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
java-version: ${{ matrix.java }}
3939

4040
- name: Setup Gradle
41-
uses: gradle/actions/setup-gradle@v4
41+
uses: gradle/actions/setup-gradle@v5
4242

4343
- name: Cache SonarQube packages
4444
uses: actions/cache@v4
@@ -49,6 +49,10 @@ jobs:
4949

5050
- name: Build with Java ${{ matrix.java }}
5151
run: ./gradlew build --info --warning-mode all -PjavaVersion=${{ matrix.java }}
52+
env:
53+
ORG_GRADLE_PROJECT_ossIndexUsername: ${{ secrets.OSSINDEX_USERNAME }}
54+
ORG_GRADLE_PROJECT_ossIndexToken: ${{ secrets.OSSINDEX_TOKEN }}
55+
5256

5357
- name: Sonar analysis
5458
if: ${{ env.DEFAULT_JAVA == matrix.java && env.SONAR_TOKEN != null }}

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
java-version: 17
3333

3434
- name: Setup Gradle
35-
uses: gradle/actions/setup-gradle@v4
35+
uses: gradle/actions/setup-gradle@v5
3636

3737
- name: Initialize CodeQL
3838
uses: github/codeql-action/init@v3

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
- name: Fail if not running on main branch
2828
if: ${{ github.ref != 'refs/heads/main' }}
29-
uses: actions/github-script@v7
29+
uses: actions/github-script@v8
3030
with:
3131
script: |
3232
core.setFailed('Not running on main branch, github.ref is ${{ github.ref }}. Please start this workflow only on main')
@@ -37,7 +37,7 @@ jobs:
3737
java-version: 17
3838

3939
- name: Setup Gradle
40-
uses: gradle/actions/setup-gradle@v4
40+
uses: gradle/actions/setup-gradle@v5
4141

4242
- name: Build
4343
run: ./gradlew build --warning-mode all

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
- [PR #58](https://github.com/itsallcode/openfasttrace-gradle/pull/58)
10+
- Upgrade dependencies
11+
- Specify credentials for OssIndex
12+
913
## [3.1.0] - 2025-08-03
1014

1115
- [PR #51](https://github.com/itsallcode/openfasttrace-gradle/pull/51) (Thanks to [@koppor](https://github.com/koppor) for his contribution!)

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,15 @@ To use `openfasttrace` from source during development:
183183

184184
### Check dependencies for vulnerabilities
185185

186+
Get token for OssIndex from [ossindex.sonatype.org](https://ossindex.sonatype.org/) and add it to `~/.gradle/gradle.properties`:
187+
188+
```properties
189+
ossIndexUsername = <user>
190+
ossIndexToken = <token>
191+
```
192+
193+
Then run
194+
186195
```sh
187196
./gradlew ossIndexAudit
188197
```

build.gradle

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ plugins {
22
id 'java-gradle-plugin'
33
id 'jacoco'
44
id 'signing'
5-
id 'com.gradle.plugin-publish' version '1.3.1'
6-
id 'org.sonarqube' version '6.2.0.5505'
5+
id 'com.gradle.plugin-publish' version '2.0.0'
6+
id 'org.sonarqube' version '7.0.1.6134'
77
id 'pl.droidsonroids.jacoco.testkit' version '1.0.12'
8-
id 'com.github.ben-manes.versions' version '0.52.0'
9-
id 'org.sonatype.gradle.plugins.scan' version '3.1.2'
8+
id 'com.github.ben-manes.versions' version '0.53.0'
9+
id 'org.sonatype.gradle.plugins.scan' version '3.1.4'
1010
}
1111

1212
repositories {
@@ -21,7 +21,7 @@ group = 'org.itsallcode'
2121
ext {
2222
gradlePluginId = 'org.itsallcode.openfasttrace'
2323
oftVersion = '4.2.0'
24-
junitVersion = '5.13.4'
24+
junitVersion = '6.0.0'
2525
if (project.hasProperty('oftSourceDir')) {
2626
oftSourceDir = file(project.oftSourceDir)
2727
useOftSources = oftSourceDir.exists()
@@ -170,6 +170,10 @@ tasks.named("dependencyUpdates").configure {
170170
}
171171

172172
ossIndexAudit {
173+
if(project.hasProperty("ossIndexUsername") && project.hasProperty("ossIndexToken")) {
174+
username = findProperty("ossIndexUsername")
175+
password = findProperty("ossIndexToken")
176+
}
173177
allConfigurations = false
174178
useCache = true
175179
excludeVulnerabilityIds = []

0 commit comments

Comments
 (0)