Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Automate gradle wrapper upgrade (#2535)
Browse files Browse the repository at this point in the history
* Add Gradle Wrapper Upgrade Plugin

* Add Action to automate Wrapper upgrades
  • Loading branch information
StefMa authored Sep 2, 2023
1 parent 1fc4331 commit 693eddc
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/upgrade-gradle-wrapper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Gradle Wrapper Upgrade'

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

jobs:
upgrade-gradle-wrapper:
runs-on: ubuntu-latest
env:
WRAPPER_UPGRADE_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup git
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git config --global url."https://unused-username:${WRAPPER_UPGRADE_GIT_TOKEN}@github.com/".insteadOf "https://github.com/"
- name: Upgrade Gradle Wrapper
run: ./gradlew upgradeGradleWrapperIvyWallet
11 changes: 11 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ plugins {
// ./gradlew detekt // Simple report in the console
// ./gradlew detektFormat // To check with enabled auto-correction
id("ivy.lint")

alias(libs.plugins.gradleWrapperUpgrade)
}

tasks {
Expand Down Expand Up @@ -41,3 +43,12 @@ fun isNonStable(version: String): Boolean {
val isStable = stableKeyword || regex.matches(version)
return isStable.not()
}

wrapperUpgrade {
gradle {
create("ivyWallet") {
repo.set("Ivy-Apps/ivy-wallet")
baseBranch.set("main")
}
}
}
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,5 @@ firebase = [
]

[plugins]
gradleWrapperUpgrade = "org.gradle.wrapper-upgrade:0.11.1"
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }

0 comments on commit 693eddc

Please sign in to comment.