Skip to content

Commit

Permalink
Merge pull request #58 from OSGP/feature/FDP-2896-gradle-wrapper-updates
Browse files Browse the repository at this point in the history
FDP-2896: Automatic gradle wrapper updates
  • Loading branch information
JelleHoffman authored Feb 25, 2025
2 parents 402dfe3 + 03d05fe commit 73b1dc2
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/gradle-wrapper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Automatic Gradle Wrapper Upgrade

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'

permissions: write-all

jobs:
upgradeGradleWrapper:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Git credentials
env:
TOKEN: ${{ secrets.GRADLE_WRAPPER_UPDATE_TOKEN}}
run: |
git config --global user.email "[email protected]"
git config --global user.name "IOTFDP"
git config --global url."https://unused-username:${TOKEN}@github.com/".insteadOf "https://github.com/"
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Upgrade Gradle Wrapper
run: ./gradlew upgradeGradleWrapperAll
env:
WRAPPER_UPGRADE_GIT_TOKEN: ${{ secrets.GRADLE_WRAPPER_UPDATE_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
with:
java-version: '21'
distribution: 'temurin'
cache: 'gradle'
- name: Setup Gradle to generate and submit dependency graphs
uses: gradle/actions/setup-gradle@v4
with:
Expand Down
10 changes: 10 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,20 @@ plugins {
alias(libs.plugins.sonarqube)
alias(libs.plugins.spotless)
alias(libs.plugins.eclipse)
alias(libs.plugins.gradleWrapperUpgrade)
}

version = System.getenv("GITHUB_REF_NAME")?.replace("/", "-")?.lowercase() ?: "develop"

wrapperUpgrade {
gradle {
register("sng-coap-http-proxy") {
repo.set("OSGP/sng-coap-http-proxy")
baseBranch.set("main")
}
}
}

sonar {
properties {
property("sonar.host.url", "https://sonarcloud.io")
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ avro-plugin = "1.9.1"
californium = "3.13.0"
commonsCodec = "1.18.0"
dependency-management = "1.1.7"
gradleWrapperUpgrade = "0.12"
gxf-utils = "2.1.2"
kotlin = "2.1.10"
kotlin-logging = "7.0.4"
Expand Down Expand Up @@ -57,6 +58,7 @@ gxfUtils = ["kafkaAvro", "kafkaAzureOAuth"]
avro = { id = "com.github.davidmc24.gradle.plugin.avro", version.ref = "avro-plugin" }
dependencyManagement = { id = "io.spring.dependency-management", version.ref = "dependency-management" }
eclipse = { id = "eclipse" }
gradleWrapperUpgrade = { id = "org.gradle.wrapper-upgrade", version.ref = "gradleWrapperUpgrade" }
jacoco = { id = "jacoco" }
jacocoReportAggregation = { id = "jacoco-report-aggregation" }
jpa = { id = "org.jetbrains.kotlin.plugin.jpa", version.ref = "kotlin" }
Expand Down

0 comments on commit 73b1dc2

Please sign in to comment.