From c33ae8667b38070e1dd726bee3c05d7aef575e67 Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Tue, 21 Jul 2026 16:59:48 +0200 Subject: [PATCH] build(deps): Skip NDK sample during Renovate lockfile updates Renovate regenerates the Gradle lockfile using the root gradlew, which evaluates the root settings and includes the android-ndk sample. Configuring that sample makes AGP set up the NDK, which is absent in Renovate's environment, so dependency bumps failed while relocking and left a stale lockfile that then broke the PR build. Skip the sample on dependency-resolution runs, detected from Gradle's own start parameters: Renovate always passes --write-locks/--update-locks and --dependency-verification lenient, none of which normal dev and CI builds use. The sample is never needed to resolve dependencies, so this keeps every other build unchanged without relying on a custom env var (which would need Mend to allowlist it via allowedEnv). Co-Authored-By: Claude Opus 4.8 (1M context) --- settings.gradle.kts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index caae0da1c..104034da3 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -36,7 +36,19 @@ include(":examples:android-gradle") include(":examples:android-gradle-kts") -include(":examples:android-ndk") +// Configuring this sample makes AGP download and set up the NDK, which isn't available when +// Renovate regenerates the dependency lockfile/verification metadata and would fail the run. +// The sample is never needed to resolve dependencies, so skip it on those runs. Renovate +// always invokes Gradle with --write-locks/--update-locks and --dependency-verification +// lenient; normal dev and CI builds don't, so they still build the sample. +val isDependencyResolutionRun = + startParameter.isWriteDependencyLocks || + startParameter.lockedDependenciesToUpdate.isNotEmpty() || + startParameter.dependencyVerificationMode == + org.gradle.api.artifacts.verification.DependencyVerificationMode.LENIENT +if (!isDependencyResolutionRun) { + include(":examples:android-ndk") +} include(":examples:android-instrumentation-sample")