diff --git a/AGENTS.md b/AGENTS.md index 8b6b23d..a024410 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -40,6 +40,7 @@ This section is updated whenever a phase's milestone closes. | config/detekt/detekt.yml | detekt's settings: the changes to its default rules, and the list of Compose rules | | .editorconfig | Editor settings, with a Kotlin section that comes close to the formatter | | .github/workflows/ | GitHub Actions workflows. pull-request.yml runs the checks on every pull request to main and every push to main | +| renovate.json | Renovate's settings for the weekly dependency update pull requests. docs/testing.md explains them | | .claude/ | Claude Code setup: the reviewer subagent in agents/, plus the OpenSpec commands and skills | Some of these are still outlines or empty folders. Later phases fill them in. @@ -61,7 +62,7 @@ These come from docs/vision.md. Do not break them, and ask before doing anything - Work on a branch and open a pull request. Never push to main. Name branches by type, such as feat/inbox-screen or docs/phase-0. - Keep each pull request small, with one concern. - Use conventional commit messages: feat, fix, docs, test, refactor, build, ci or chore. Example: "feat: add storage limit setting". -- Ask before adding a dependency. Anything that ships in the app must be compatible with GPLv3. Apache 2.0, MIT, BSD and LGPL are fine. Bundled fonts may use the SIL Open Font License 1.1 and must ship with their copyright notice and license text. Build tools that never ship, such as Gradle plugins and the tools they download, may use any open source license or be in the public domain. Ask about anything else. +- Ask before adding a dependency. Anything that ships in the app must be compatible with GPLv3. Apache 2.0, MIT, BSD and LGPL are fine. Bundled fonts may use the SIL Open Font License 1.1 and must ship with their copyright notice and license text. Build tools that never ship, such as Gradle plugins and the tools they download, may use any open source license or be in the public domain. Ask about anything else. Wait 14 days after a release before adopting it, unless the release fixes a security issue. This applies to new dependencies and to updates. Renovate opens the update pull requests, as docs/testing.md describes. - GitHub Actions are build tools too, so the same license rule applies. Pin each action to a full commit SHA with its version in a comment, such as `# v7.0.1`. Give workflows read-only permissions unless a job needs more. - Never commit secrets, keystores, signing passwords or local.properties. - Do not invent facts, URLs, email addresses or names. If something is missing, ask, or leave a clearly marked TODO. @@ -119,6 +120,7 @@ Run these from the repository root. The build needs JDK 17 installed, because ev - Run detekt: `./gradlew detekt`. It checks the Kotlin code in src/main and src/test of every module, and the code in build-logic, without type resolution. Any finding fails the build. Reports go to build/reports/detekt/ in each project. - Run Android Lint: `./gradlew lint`. It checks every module and writes a report to build/reports/ in each of them. Any warning fails the build. In the plain Kotlin/JVM modules it also runs Animal Sniffer, which checks the code against the Android API at minSdk 29, because lint's own API check skips those modules. - Run every check that the pull request workflow runs: `./gradlew spotlessCheck detekt lint test assembleDebug`. The workflow is .github/workflows/pull-request.yml. It adds `--continue`, so one run reports every failing check, and `-Pandroid.builder.sdkDownload=false`, so a missing SDK package fails the build instead of being downloaded. After the build, the workflow fails if the build changed or added files in core/database/schemas/, so commit the schema files it writes. +- Check renovate.json after you change it: `npx --yes --package renovate@44.140.0 -- renovate-config-validator --strict`. It needs Node.js 24. To use a newer renovate release, pick one that is at least 14 days old. ## Writing style diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bc61d08..09029d6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -63,6 +63,8 @@ See [docs/testing.md](docs/testing.md) for the test layers and CI workflows. Ask in an issue before adding a dependency. Anything that ships in the app must be compatible with GPLv3. Apache 2.0, MIT, BSD and LGPL are fine. Bundled fonts may use the SIL Open Font License 1.1 and must ship with their copyright notice and license text. Build tools that never ship, such as Gradle plugins and the tools they download, may use any open source license or be in the public domain. No dependency may send data anywhere the user did not choose. +Wait 14 days after a release before adopting it, unless the release fixes a security issue. Renovate opens a pull request for each dependency update once the wait is over, so don't open pull requests that only change a version. If a Renovate pull request needs a fix before its checks pass, push the fix to its branch. Renovate then stops updating that branch, so keep it up to date with main yourself. Renovate's pull requests don't use the pull request template or the branch names above. [docs/testing.md](docs/testing.md#dependency-updates) explains how the updates work. + ## Things never to commit Secrets, keystores, signing passwords and `local.properties`. diff --git a/build-logic/convention/src/main/kotlin/io/github/dewfallapp/buildlogic/AndroidLint.kt b/build-logic/convention/src/main/kotlin/io/github/dewfallapp/buildlogic/AndroidLint.kt index 736a10b..498fa37 100644 --- a/build-logic/convention/src/main/kotlin/io/github/dewfallapp/buildlogic/AndroidLint.kt +++ b/build-logic/convention/src/main/kotlin/io/github/dewfallapp/buildlogic/AndroidLint.kt @@ -4,7 +4,8 @@ import com.android.build.api.dsl.Lint /** * Lint checks that look up versions or library data on the network. They are off so that lint gives - * the same result on every run. Dependency updates are a separate task, #31. + * the same result on every run. Renovate's pull requests bring new versions instead. See + * docs/testing.md#dependency-updates. */ private val networkLintChecks = setOf( diff --git a/docs/architecture.md b/docs/architecture.md index 590b397..4bc82a1 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -132,9 +132,9 @@ Four tools check the code. AGENTS.md lists the commands that run them. **detekt.** detekt runs its default rules, with the changes in config/detekt/detekt.yml, on every module and on build-logic. Any finding fails the build. Each module runs the plain `detekt` task, which doesn't need compiled code. So the rules that need type resolution don't run, such as InjectDispatcher, which would back the "inject dispatchers" rule in AGENTS.md. The task reads only src/main and src/test, so Android test and variant folders aren't checked. Composable functions are named in PascalCase, as the Compose API guidelines say, so FunctionNaming ignores functions annotated with @Composable ([detekt and Compose](https://github.com/detekt/detekt/blob/v2.0.0-alpha.6/website/docs/introduction/compose.mdx)). UnusedPrivateFunction and LongParameterList need type resolution, so they don't run yet. When type resolution is turned on, they need the same page's settings for private previews and for composables with many parameters. The build uses detekt 2.0.0-alpha.6, which is an alpha. The newest stable release, 1.23.8 from February 2025, was built for Kotlin 2.0.21, Gradle 8.12.1 and AGP 8.8.1 ([compatibility table](https://detekt.dev/docs/introduction/compatibility/)). It uses a Gradle method that Gradle 10 removes, and its maintainers plan no more 1.23 releases ([detekt#8452](https://github.com/detekt/detekt/issues/8452)). Support for AGP 9's built-in Kotlin came only in the 2.0 alphas ([detekt#8320](https://github.com/detekt/detekt/issues/8320)). 2.0.0-alpha.6 is built against Kotlin 2.4.10, Gradle 9.6.1 and AGP 9.3.1, close to this build's versions ([release notes](https://github.com/detekt/detekt/releases/tag/v2.0.0-alpha.6)). Rule names and settings may still change before 2.0.0, so read the release notes before each detekt update. -**detekt's Compose rules.** detekt also runs [compose-rules](https://github.com/mrmans0n/compose-rules) 0.6.7, a detekt plugin with rules for Compose code, such as "a public composable that emits UI takes a modifier parameter". dewfall.detekt adds it, so it checks every module and build-logic. The Compose section of config/detekt/detekt.yml lists every rule, as compose-rules' docs recommend ([detekt setup](https://github.com/mrmans0n/compose-rules/blob/v0.6.7/docs/detekt.md#enabling-rules)). The docs leave the four opt-in rules off. Three of them stay off: ComposableNestingDepth, PreviewNaming and UnstableCollections. Material2 is on, because it enforces the Material 3 rule in AGENTS.md. It flags any use of Material 2, the androidx.compose.material package, but not the icons in androidx.compose.material.icons, which the rule always allows. Every other rule is on. [rules.md](https://github.com/mrmans0n/compose-rules/blob/v0.6.7/docs/rules.md) explains each rule. Eight rules need type resolution, so they don't run yet: ConditionHoist, InvalidReadOnlyComposable, MissingNonRestartableComposable, MissingReadOnlyComposable, StaleRememberUpdatedStateInRemember, UnnecessaryComposable, UnnecessaryLaunchedEffect and VarsWithoutStateBacking. compose-rules' ComposableNaming checks the names of composable functions, which detekt's FunctionNaming skips. Each compose-rules release is built for one detekt version, and 0.6.7 is built for detekt 2.0.0-alpha.6 ([supported versions](https://github.com/mrmans0n/compose-rules/blob/v0.6.7/docs/detekt.md#supported-versions-matrix)). So each detekt update has to wait for a compose-rules release built for the new detekt version, and both versions change in the same pull request. +**detekt's Compose rules.** detekt also runs [compose-rules](https://github.com/mrmans0n/compose-rules) 0.6.7, a detekt plugin with rules for Compose code, such as "a public composable that emits UI takes a modifier parameter". dewfall.detekt adds it, so it checks every module and build-logic. The Compose section of config/detekt/detekt.yml lists every rule, as compose-rules' docs recommend ([detekt setup](https://github.com/mrmans0n/compose-rules/blob/v0.6.7/docs/detekt.md#enabling-rules)). The docs leave the four opt-in rules off. Three of them stay off: ComposableNestingDepth, PreviewNaming and UnstableCollections. Material2 is on, because it enforces the Material 3 rule in AGENTS.md. It flags any use of Material 2, the androidx.compose.material package, but not the icons in androidx.compose.material.icons, which the rule always allows. Every other rule is on. [rules.md](https://github.com/mrmans0n/compose-rules/blob/v0.6.7/docs/rules.md) explains each rule. Eight rules need type resolution, so they don't run yet: ConditionHoist, InvalidReadOnlyComposable, MissingNonRestartableComposable, MissingReadOnlyComposable, StaleRememberUpdatedStateInRemember, UnnecessaryComposable, UnnecessaryLaunchedEffect and VarsWithoutStateBacking. compose-rules' ComposableNaming checks the names of composable functions, which detekt's FunctionNaming skips. Each compose-rules release is built for one detekt version, and 0.6.7 is built for detekt 2.0.0-alpha.6 ([supported versions](https://github.com/mrmans0n/compose-rules/blob/v0.6.7/docs/detekt.md#supported-versions-matrix)). So each detekt update has to wait for a compose-rules release built for the new detekt version, and both versions change in the same pull request. Renovate puts both in one pull request, which waits for the maintainer's approval ([testing.md](testing.md#dependency-updates)). -**Android Lint.** Lint checks every module, the plain Kotlin/JVM ones through the com.android.lint plugin. Any warning fails the build. Each module checks only its own code. The checks that look up versions or library data on the network are off, so lint gives the same result on every run. AndroidLint.kt in build-logic lists them. The app's manifest suppresses two checks until the tasks that fix them are done: DataExtractionRules (#68) and MissingApplicationIcon (#120). +**Android Lint.** Lint checks every module, the plain Kotlin/JVM ones through the com.android.lint plugin. Any warning fails the build. Each module checks only its own code. The checks that look up versions or library data on the network are off, so lint gives the same result on every run. AndroidLint.kt in build-logic lists them. Renovate's pull requests bring new versions instead ([testing.md](testing.md#dependency-updates)). The app's manifest suppresses two checks until the tasks that fix them are done: DataExtractionRules (#68) and MissingApplicationIcon (#120). **The Android API check.** The plain Kotlin/JVM modules compile and run their tests against the full JDK, so a call to a Java API that Android 10 lacks passes there and fails on a phone ([ADR 0006](adr/0006-platform-and-android-versions.md)). Lint can't catch this in these modules. AGP runs lint one module at a time, and lint's API check skips any module that isn't Android ([ApiDetector](https://android.googlesource.com/platform/tools/base/+/refs/heads/mirror-goog-studio-main/lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/ApiDetector.kt)). So [Animal Sniffer](https://github.com/xvik/gradle-animalsniffer-plugin) checks each of these modules' compiled classes against a [Gummy Bears](https://github.com/open-toast/gummy-bears) signature of the Android API. The signature's API level comes from the minSdk in build-logic, so the check follows it. `./gradlew lint` runs it too. diff --git a/docs/roadmap.md b/docs/roadmap.md index d72b52a..ede9b37 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -146,7 +146,7 @@ Claude Design exports as .zip, PDF, PPTX, Google Slides or standalone HTML. It c - Add the pull request workflow in GitHub Actions: formatting, lint, unit tests, and a debug build. - Turn on branch protection for main so failing checks block merging. - Add a pull request template with the line "OpenSpec change archived, or not needed". -- Add Renovate or Dependabot for weekly dependency update pull requests. +- Add Renovate for weekly dependency update pull requests. - Write the modules section of docs/architecture.md with a Mermaid diagram. - Optional: import the repository into Claude Design as a design system, so new designs use your real theme. @@ -337,13 +337,13 @@ Add these one at a time, in the order your first users ask for them. Their feedb Fast tests run on every change. They cover reducers, use cases, repositories with fake data sources, the YouTube layer against saved responses, Room queries, background jobs, and screenshot tests of each screen. Slow tests are emulator tests of the main flows, such as search then play, and download then play offline. Benchmarks for startup and scrolling run on a real phone before each release. -The project uses five GitHub Actions workflows: +The project uses four GitHub Actions workflows, plus Renovate's weekly update pull requests, which workflow 1 tests: 1. Every pull request: formatting, lint, unit tests, screenshot tests, a database migration check, and a debug build. Branch protection blocks merging when any of them fail. 2. Every merge to main: everything above, plus the emulator tests, and a nightly APK. 3. Daily schedule: the YouTube layer runs against real YouTube and opens an issue when something breaks. It never blocks pull requests. 4. Version tag: a signed release build, changelog, checksums, and a GitHub release. -5. Weekly: dependency update pull requests from Renovate or Dependabot, tested by workflow 1. +5. Weekly: Renovate opens dependency update pull requests, and workflow 1 tests them. ## Reference: documentation map diff --git a/docs/testing.md b/docs/testing.md index 7f4c4a4..bc71c11 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -29,13 +29,13 @@ Benchmarks for startup and scrolling run on a real phone before each release. ## CI workflows -The project uses five GitHub Actions workflows. +The project uses four GitHub Actions workflows, plus Renovate's weekly update pull requests, which workflow 1 tests. 1. **Every pull request.** Formatting, lint, unit tests, screenshot tests, a database migration check, and a debug build. Branch protection blocks merging when any of them fail. 2. **Every merge to main.** Everything above, plus the emulator tests, and a nightly APK. 3. **Daily schedule.** The YouTube layer runs against real YouTube and opens an issue when something breaks. It never blocks pull requests. 4. **Version tag.** A signed release build, changelog, checksums, and a GitHub release. -5. **Weekly.** Dependency update pull requests from Renovate or Dependabot, tested by workflow 1. +5. **Weekly.** Renovate opens dependency update pull requests, and workflow 1 tests them. See [Dependency updates](#dependency-updates). ### The pull request workflow @@ -50,6 +50,26 @@ Workflow 1 is .github/workflows/pull-request.yml. Today it runs one job, Checks, - A repository ruleset named main protects the branch. It requires a pull request, allows only merge commits, and requires the check named Checks to pass on a branch that's up to date with main. It blocks force pushes and deletion, and nobody can bypass it, maintainers included. The ruleset requires the check by its name, so renaming the job blocks merging until the ruleset is updated. - The repository allows only GitHub's own actions and gradle/actions/setup-gradle, and requires every action to be pinned to a full commit SHA. A new action needs the allow list changed in the repository settings first. +### Dependency updates + +[Renovate](https://docs.renovatebot.com/) opens a pull request for each dependency update, and workflow 1 tests it like any other pull request. Renovate runs as the Mend Renovate app on Mend's servers, which clone the repository for each run. It reads its settings from renovate.json. Renovate is licensed under AGPL-3.0 and never ships in the app. + +- **What it updates.** The plugins and libraries in gradle/libs.versions.toml, the Gradle wrapper, and the actions and the runner image in .github/workflows/. ktfmt and Gummy Bears have no library entry in the catalog, so two custom managers in renovate.json find their versions. The Gummy Bears manager names the artifact for API 29, so change it when minSdk changes. Renovate would also update the JDK version in the workflow's setup-java step, but the build needs JDK 17, so renovate.json turns that off. Nothing updates the Android SDK packages in the workflow or the Android versions in build-logic. Change these by hand. +- **When.** Renovate creates new branches only on Fridays, in the Asia/Dhaka time zone. It still rebases open pull requests on other days. +- **How many.** At most five of Renovate's pull requests are open at once, with no hourly limit. Updates beyond that wait for the next Friday after a pull request closes. The Dependency Dashboard lists them. +- **The 14-day wait.** AGENTS.md says to wait 14 days after a release before adopting it, unless the release fixes a security issue. Renovate creates no branch for a release that is less than 14 days old, or that has no release date. The Dependency Dashboard, an issue that Renovate keeps open, lists these updates under "Pending Status Checks". +- **Security fixes.** A pull request that fixes a known vulnerability skips the wait and the schedule. Renovate finds these fixes in the repository's Dependabot alerts and in the [OSV](https://osv.dev/) vulnerability database, which it downloads and searches offline. When a release fixes a security issue that neither source lists, such as a Gradle release, tick its box under "Pending Status Checks" to create the pull request now. +- **Groups.** Entries that share a version in the catalog change together, such as Hilt's three entries. Kotlin and KSP share one pull request. So do Spotless and ktfmt, because ktfmt 0.65 and later are published as org.jetbrains.kotlinx:ktfmt, which only Spotless 8.10.4 or later can load. Renovate leaves out a group member that is still inside its 14 days, so a ktfmt release can arrive before the Spotless release that loads it. That pull request fails spotlessCheck until a later run adds Spotless. detekt and compose-rules share one too, because each compose-rules release is built for one detekt version. That pull request waits until the maintainer ticks its box on the Dependency Dashboard, after checking compose-rules' supported versions table. +- **Pre-releases.** Renovate offers a pre-release only when the current version is a pre-release with the same major, minor and patch numbers. So detekt moves from one 2.0.0 alpha to the next or to 2.0.0, and every other dependency gets stable releases only ([ignoreUnstable](https://docs.renovatebot.com/configuration-options/#ignoreunstable)). +- **Titles.** Gradle updates start with "build:" and Actions updates with "ci:", as the commit message rule in AGENTS.md asks. +- **Up to date with main.** The ruleset requires a branch that's up to date with main, and Renovate rebases its open pull requests when main moves. To rebase one now, tick the rebase box in its description. Don't press "Update branch". Renovate would then treat the pull request as edited by someone else and stop updating it. +- **Fixing a pull request.** Some updates need a change before Checks passes. A ktfmt update can change the formatting, a Kotlin or library update can deprecate an API the code uses, and an AGP update can need new build tools. Push the fix to Renovate's branch. Renovate then leaves the branch alone, so keep it up to date with main yourself. For ktfmt and AGP updates, the pull request's description names the usual fix. +- **The Gradle wrapper.** Renovate writes the new distributionSha256Sum, then runs the wrapper task to update gradle-wrapper.jar, gradlew and gradlew.bat. If that task fails on Mend's servers, only gradle-wrapper.properties changes. Then run `./gradlew wrapper` on the branch and push any changes it makes. +- **Review.** Nothing merges on its own. Before merging, check that Checks passed and read the release notes, especially detekt's. For a library that ships in the app, check that the update adds no artifact whose license breaks the rule in AGENTS.md. +- **Exceptions.** Renovate's pull requests don't use the pull request template, and their branches start with renovate/. + +AGENTS.md has the command that checks renovate.json. + ## Running tests locally Run these from the repository root. AGENTS.md lists the command that runs every check the pull request workflow runs. diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9a26133..fd2453b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,16 +3,20 @@ agp = "9.4.1" kotlin = "2.4.20" desugarJdkLibsNio = "2.1.5" spotless = "8.10.3" -# The formatter that Spotless runs. Spotless downloads it, so it has no library entry. +# The formatter that Spotless runs. Spotless downloads it, so it has no library entry. From 0.65 +# on, ktfmt is published as org.jetbrains.kotlinx:ktfmt, which only Spotless 8.10.4 or later can +# load. A custom manager in renovate.json updates it with Spotless, so keep this line's format. ktfmt = "0.64" detekt = "2.0.0-alpha.6" # compose-rules adds Compose rules to detekt. Each release is built for one detekt version, so a # detekt update waits for a compose-rules release built for the new version. Matching versions: # https://github.com/mrmans0n/compose-rules/blob/v0.6.7/docs/detekt.md#supported-versions-matrix +# renovate.json updates both in one pull request, after the maintainer approves it. composeRules = "0.6.7" animalsniffer = "2.0.1" # Android API signatures for Animal Sniffer. build-logic adds the artifact, whose name holds -# the API level, so it has no library entry. +# the API level, so it has no library entry. A custom manager in renovate.json updates it, so keep +# this line's format, and change the API level there when minSdk changes. gummyBears = "0.15.0" composeBom = "2026.09.00" activityCompose = "1.13.0" diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..2425c39 --- /dev/null +++ b/renovate.json @@ -0,0 +1,87 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "description": "Weekly dependency update pull requests. docs/testing.md#dependency-updates explains these settings.", + "extends": ["config:recommended", ":semanticCommits", ":semanticCommitScopeDisabled"], + "enabledManagers": ["gradle", "gradle-wrapper", "github-actions", "custom.regex"], + "timezone": "Asia/Dhaka", + "schedule": ["* * * * 5"], + "minimumReleaseAge": "14 days", + "minimumReleaseAgeBehaviour": "timestamp-required", + "internalChecksFilter": "strict", + "vulnerabilityAlerts": { + "description": "Security fixes skip the 14-day wait, as AGENTS.md allows.", + "minimumReleaseAge": null + }, + "osvVulnerabilityAlerts": true, + "rebaseWhen": "behind-base-branch", + "prConcurrentLimit": 5, + "prHourlyLimit": 0, + "automerge": false, + "packageRules": [ + { + "description": "Gradle updates, the version catalog and the wrapper included, use the build type.", + "matchManagers": ["gradle", "gradle-wrapper", "custom.regex"], + "semanticCommitType": "build" + }, + { + "description": "GitHub Actions and runner updates use the ci type.", + "matchManagers": ["github-actions"], + "semanticCommitType": "ci" + }, + { + "description": "Kotlin's plugins and kotlin-test share one catalog version, and the Compose compiler ships with Kotlin. KSP runs on Kotlin's compiler, so it is tested with them.", + "matchPackageNames": ["/^org\\.jetbrains\\.kotlin[.:]/", "/^com\\.google\\.devtools\\.ksp:/"], + "groupName": "Kotlin and KSP", + "prBodyNotes": ["A new Kotlin minor version may also need a newer Hilt. See docs/architecture.md#build-settings."] + }, + { + "description": "Each compose-rules release is built for one detekt version, so both change in one pull request, and only after the maintainer approves it on the Dependency Dashboard.", + "matchPackageNames": ["/^dev\\.detekt:/", "io.nlopez.compose.rules:detekt"], + "groupName": "detekt and compose-rules", + "dependencyDashboardApproval": true, + "prBodyNotes": ["Check compose-rules' supported versions table for this detekt version, and read detekt's release notes. See docs/architecture.md#formatting-and-lint."] + }, + { + "description": "The build needs JDK 17, as AGENTS.md says, so the JDK version in the workflow's setup-java step changes only by hand.", + "matchManagers": ["github-actions"], + "matchDatasources": ["java-version"], + "enabled": false + }, + { + "description": "AGP sets the default build tools version, which the pull request workflow installs.", + "matchPackageNames": ["/^com\\.android\\.(application|library):/", "com.android.tools.build:gradle"], + "prBodyNotes": ["If the build fails on a missing build-tools package, update the SDK step in .github/workflows/pull-request.yml and the Commands section of AGENTS.md on this branch."] + }, + { + "description": "Spotless downloads ktfmt, and ktfmt 0.65 and later need Spotless 8.10.4 or later to load their org.jetbrains.kotlinx coordinates, so both change in one pull request. A ktfmt update can change the formatting.", + "matchPackageNames": ["/^com\\.diffplug\\.spotless:/", "org.jetbrains.kotlinx:ktfmt"], + "groupName": "Spotless and ktfmt", + "prBodyNotes": ["If spotlessCheck fails, run ./gradlew spotlessApply on this branch and push the result."] + }, + { + "description": "Renovate writes the new checksum before it runs the wrapper task, so the checksum changes even when the task fails.", + "matchManagers": ["gradle-wrapper"], + "prBodyNotes": ["If gradle-wrapper.jar, gradlew and gradlew.bat didn't change, run ./gradlew wrapper on this branch and push any changes it makes."] + } + ], + "customManagers": [ + { + "customType": "regex", + "description": "ktfmt has no library entry in the catalog, because Spotless downloads it. From 0.65 on, ktfmt is published as org.jetbrains.kotlinx:ktfmt instead of com.facebook:ktfmt.", + "managerFilePatterns": ["/^gradle/libs\\.versions\\.toml$/"], + "matchStrings": ["\\nktfmt = \"(?[^\"]+)\""], + "datasourceTemplate": "maven", + "depNameTemplate": "org.jetbrains.kotlinx:ktfmt", + "versioningTemplate": "maven" + }, + { + "customType": "regex", + "description": "Gummy Bears has no library entry, because build-logic builds the artifact name from minSdk. Change api-29 here when minSdk changes.", + "managerFilePatterns": ["/^gradle/libs\\.versions\\.toml$/"], + "matchStrings": ["\\ngummyBears = \"(?[^\"]+)\""], + "datasourceTemplate": "maven", + "depNameTemplate": "com.toasttab.android:gummy-bears-api-29", + "versioningTemplate": "maven" + } + ] +}