Close the classpath gap in invariant 13, harden three Konsist rules - #161
Merged
Conversation
…ed graph FeatureDataLayerBoundaryTest only reads a feature module's own build script, so a data-layer module arriving through an intermediate dependency's api(...) declaration - genuinely visible to the feature's compiler - was invisible to it. checkDataLayerClasspathBoundary resolves the module's actual debugCompileClasspath instead and closes that; wired into check locally and into CI via make check-data-layer-boundary, since CI never invokes the check lifecycle task on any module. Also hardens three Konsist rules with hardcoded module-path / plugin-id lists (FeatureDataLayerBoundaryTest, DevAppDependencyBoundaryTest, InstrumentedTestOptInBoundaryTest): each list now has a positive-control test verifying its strings still resolve to something real, so a typo or a rename fails loudly instead of silently turning the rule into a no-op. gradle.properties turns off codegen for the one AGP build feature (shaders) that still has a live global default flag on this AGP version.
simtop
enabled auto-merge (squash)
August 9, 2026 17:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
checkDataLayerClasspathBoundary: a new Gradle task, wired intocheckon both feature convention plugins, that resolves each feature module's actualdebugCompileClasspathand fails if a data-layer module (:beer_data/:beer_database/:beer_network) shows up in it.FeatureDataLayerBoundaryTestonly reads a feature's own build-script text, so a data-layer module arriving through an intermediate dependency'sapi(...)declaration was invisible to it - verified empirically (a temporaryapi(...)probe on:presentation_utilsreproduced and was caught; animplementation(...)probe correctly did not, since Gradle's own configuration elision already keeps that off the compile classpath). CI never invokes thechecklifecycle task on any module, so this is also wired intomake check-data-layer-boundaryand called directly in the same CI job asmake konsist.FeatureDataLayerBoundaryTest,DevAppDependencyBoundaryTest,InstrumentedTestOptInBoundaryTest) now carry a positive-control test: each list's strings are checked against the filesystem / convention-plugin files they're supposed to name, so a typo or a rename fails loudly instead of silently turning the rule into a no-op that still reports green.gradle.properties: turns off codegen forshaders, the one AGP build feature that still has a live global default flag on this AGP version (checked against AGP's ownBooleanOptionclass -buildconfig/aidl/renderscriptare already unconditionally off on AGP 9).Test plan
./gradlew :konsist:test- all rules pass, including the three new positive-control tests./gradlew checkDataLayerClasspathBoundary- passes on all four feature modulesapi(project(":beer_data"))to:presentation_utils, confirmedcheckDataLayerClasspathBoundaryfailed with the expected message, reverted:appedge (implementation(project(":app")))./gradlew spotlessCheck detekt- clean./gradlew compileDebugKotlin- full project compilesclassify_pathindetect-change-scope.shruns the unit-tests lane (where this new CI step lives) on anybuild.gradle.kts-only change