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

Automate gradle wrapper upgrade #2535

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 * * *'
ILIYANGERMANOV marked this conversation as resolved.
Show resolved Hide resolved

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/"
ILIYANGERMANOV marked this conversation as resolved.
Show resolved Hide resolved
- 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" }