From 00cf534e00dbac7e325f5e91845a007a15513906 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Mon, 10 Nov 2025 16:27:29 +0100 Subject: build: Avoid unreproducible rules in regular builds (#1125) The genEmojis rule makes a network request and must not be done during a regular build. The compileComposeSequences updates a file that is checked in the repository and doesn't need to be updated in a regular build. Both are now handled like 'genLayoutsList'.--- build.gradle.kts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index b0d82f1..a16fdef 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -120,7 +120,6 @@ val genLayoutsList by tasks.registering(Exec::class) { workingDir = projectDir commandLine("python", "gen_layouts.py") } -tasks.get("preBuild").mustRunAfter(genLayoutsList) val checkKeyboardLayouts by tasks.registering(Exec::class) { inputs.dir(projectDir.resolve("srcs/layouts")) @@ -146,7 +145,7 @@ val compileComposeSequences by tasks.registering(Exec::class) { } tasks.withType(Test::class).configureEach { - dependsOn(genEmojis, genLayoutsList, checkKeyboardLayouts, compileComposeSequences) + dependsOn(genLayoutsList, checkKeyboardLayouts, compileComposeSequences) } val initDebugKeystore by tasks.registering(Exec::class) { @@ -169,5 +168,10 @@ val copyLayoutDefinitions by tasks.registering(Copy::class) { } tasks.named("preBuild") { - dependsOn(initDebugKeystore, copyRawQwertyUS, copyLayoutDefinitions, compileComposeSequences) + dependsOn(initDebugKeystore, copyRawQwertyUS, copyLayoutDefinitions) + // 'mustRunAfter' defines ordering between tasks (which is required by + // Gradle) but doesn't create a dependency. These rules update files that are + // checked in the repository that don't need to be updated during regular + // builds. + mustRunAfter(genEmojis, genLayoutsList, compileComposeSequences) } -- cgit v1.2.3