diff --git a/.github/workflows/upgrade-gradle-wrapper.yml b/.github/workflows/upgrade-gradle-wrapper.yml new file mode 100644 index 0000000000..3787ac32cf --- /dev/null +++ b/.github/workflows/upgrade-gradle-wrapper.yml @@ -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 diff --git a/build.gradle.kts b/build.gradle.kts index bd61c36dff..8c2b9e6858 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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 { @@ -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") + } + } +} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 492e4b655f..6e4efefb9d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -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" }