Skip to content

build(codes): declare the kikcode lint tasks' dependency on generated fixtures - #1288

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/kikcode-lint-fixture-dependency
Aug 20, 2026
Merged

build(codes): declare the kikcode lint tasks' dependency on generated fixtures#1288
bmc08gt merged 1 commit into
code/cashfrom
fix/kikcode-lint-fixture-dependency

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

CI on code/cash is red since #1287: the Run Flipcash Tests job fails with two Gradle validation errors in :libs:codes:kikcode.

A problem was found with the configuration of task ':libs:codes:kikcode:lintAnalyzeAndroidHostTest'.
Property has implicit dependency
  Task ':libs:codes:kikcode:lintAnalyzeAndroidHostTest' uses this output of task
  ':libs:codes:kikcode:generateTestFixtures' without declaring an explicit or implicit dependency.

commonTest's kotlin.srcDir(generateTestFixtures) carries the task dependency to the Kotlin compile tasks only. AGP's lintAnalyzeAndroidHostTest and generateAndroidHostTestLintModel read the same source directories straight off disk, so Gradle rejects the build whenever generateTestFixtures and those lint tasks land in one task graph — exactly what CI's flipcashTestDebug :apps:flipcash:app:lintDebug invocation does.

This declares the dependency explicitly for the module's lint tasks. The name filter only matches lintAnalyze* / *LintModel tasks, so the lint-jar/compileLint tasks are untouched.

… fixtures

`commonTest`'s `kotlin.srcDir(generateTestFixtures)` carries the task dependency to
the Kotlin compile tasks only. AGP's `lintAnalyzeAndroidHostTest` and
`generateAndroidHostTestLintModel` read the same source directories straight off
disk, so Gradle failed the build on an undeclared dependency on
`build/generated/testFixtures` whenever both landed in one task graph -- which is
exactly what CI's `flipcashTestDebug :apps:flipcash:app:lintDebug` does.

Wire the dependency on those lint tasks explicitly.
@github-actions github-actions Bot added the type: build Build system, Gradle, dependencies label Aug 20, 2026
@bmc08gt
bmc08gt merged commit 4946d80 into code/cash Aug 20, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the fix/kikcode-lint-fixture-dependency branch August 20, 2026 21:16
bmc08gt added a commit that referenced this pull request Aug 21, 2026
… fixtures (#1292)

`commonTest`'s `kotlin.srcDir(generateTestFixtures)` carries the task dependency to
the Kotlin compile tasks only. AGP's `lintAnalyzeAndroidHostTest` and
`generateAndroidHostTestLintModel` read the same source directories straight off
disk, so Gradle failed the build on an undeclared dependency on
`build/generated/testFixtures` whenever both landed in one task graph -- which is
exactly what CI's `flipcashTestDebug :apps:flipcash:app:lintDebug` does.

This is the same wiring #1288 added to :libs:codes:kikcode; #1289 introduced an
identical fixture generator in :libs:encryption:base58 without it, leaving
code/cash red and failing every open PR on a build-config error unrelated to its
own changes.
bmc08gt added a commit that referenced this pull request Aug 21, 2026
…convention plugin (#1293)

`libs/encryption/base58` and `libs/codes/kikcode` each carried a byte-identical
copy of `GenerateTestFixtures`, differing only in the package the generated file
is declared in, plus an identical block wiring the AGP lint tasks to depend on
the generator.

That copy-paste broke `code/cash` once already: #1288 added the lint wiring to
kikcode, then #1289 introduced the same generator in base58 without it, and lint
failed over an undeclared dependency on generated sources. Adding the source
directory only carries the dependency to the Kotlin compile tasks -- lint reads
the same directories straight off disk -- so the wiring is easy to forget and
invisible until CI runs.

Move the task into `build-logic` behind a `flipcash.kmp.test.fixtures`
convention plugin. The plugin takes the package via a `testFixtures {}`
extension, registers the generated directory on `commonTest`, and wires the lint
dependency itself, so a module that applies it cannot omit it. Both modules drop
from ~75 lines of build script to four.
bmc08gt added a commit that referenced this pull request Aug 21, 2026
…esign

* origin/code/cash:
  fix(core): add \ to escape ' in What's (#1298)
  feat(shared-core): wrap the framework in a Swift target (#1297)
  chore: update display name entry title/hint (#1296)
  ci(shared-core): write a placeholder local.properties before publishing (#1295)
  build(shared-core): publish the XCFramework to flipcash-shared-core-spm (#1294)
  refactor(build-logic): extract the KMP test-fixture generator into a convention plugin (#1293)
  build(base58): declare the base58 lint tasks' dependency on generated fixtures (#1292)
  test(base58): run the vector gate on Kotlin/Native, not just the JVM (#1289)
  build(codes): declare the kikcode lint tasks' dependency on generated fixtures (#1288)

# Conflicts:
#	apps/flipcash/core/src/main/res/values/strings.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: build Build system, Gradle, dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant