diff options
| author | Jules Aguillon | 2025-11-10 16:27:29 +0100 |
|---|---|---|
| committer | GitHub | 2025-11-10 16:27:29 +0100 |
| commit | 00cf534e00dbac7e325f5e91845a007a15513906 (patch) | |
| tree | 538921a9c56a71cbe2a94f4377ea2cef24652626 /build.gradle.kts | |
| parent | c717461ef58297db18ec2b3d400a24826895983d (diff) | |
| download | unexpected-keyboard-00cf534e00dbac7e325f5e91845a007a15513906.tar.gz unexpected-keyboard-00cf534e00dbac7e325f5e91845a007a15513906.zip | |
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'.
Diffstat (limited to 'build.gradle.kts')
| -rw-r--r-- | build.gradle.kts | 10 |
1 files 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) } |
