build: Introduce Gradle Convention Plugins#20778
Open
david-allison wants to merge 8 commits intoankidroid:mainfrom
Open
build: Introduce Gradle Convention Plugins#20778david-allison wants to merge 8 commits intoankidroid:mainfrom
david-allison wants to merge 8 commits intoankidroid:mainfrom
Conversation
ae866c6 to
b8eb608
Compare
david-allison
commented
Apr 19, 2026
Comment on lines
-23
to
-26
| -keep class dev.androidbroadcast.vbpd.ViewBindingProperty { *; } | ||
| -keep class dev.androidbroadcast.vbpd.ActivityViewBindings { *; } | ||
| -keep class dev.androidbroadcast.vbpd.FragmentViewBindings { *; } | ||
| -keep class dev.androidbroadcast.vbpd.internal.VbpdUtilsKt { *; } No newline at end of file |
Member
Author
There was a problem hiding this comment.
This was necessary because we were minifying the library. We now let the app take care of this.
This comment was marked as resolved.
This comment was marked as resolved.
b8eb608 to
f6a994f
Compare
mikehardy
reviewed
Apr 19, 2026
Member
mikehardy
left a comment
There was a problem hiding this comment.
draft I know, and marked for next version, but I dig it
Contributor
|
38779315: Old APK size |
Member
|
I was already expecting this to be merged 😆 was reviewing another PR and thought "what is all this boilerplate, ugh" |
5 tasks
5 tasks
f6a994f to
4f60763
Compare
lukstbit
reviewed
Apr 20, 2026
fc95c0e to
15c4ae6
Compare
For Android libraries This consolidates: * compileSdk * minSdk * compileOptions [sourceCompatibility] All properties were standardized, so this is a no-op. **Benefits** * One place for configuration changes * Simplifies the process of verifying correctness of new modules * Reduced code in `build.gradle.kts` files * Ensures all modules apply the same set of common transformations * Fewer footguns with configuration cache interactions Issue 20775 Assisted-by: Claude Opus 4.7 - discussion, selection of initial properties to move
Via the convention plugin. Lint is newly applied to `:vbpd` Issue 20775 Assisted-by: Claude Opus 4.7 - explanation and fix
None of these files are used - holdover from using the 'new module' template If needed, these can be added on a case-by-case basis Issue 20775 Assisted-by: Claude Opus 4.7 - research and fix
The value was the default - no need for it to exist Issue 20775
* One of the files had no content * vbpd was only necessary because we were minifying the library Minification is enabled at the app level, two rounds of minification were unnecessary, slow, and caused the need for the proguard file .createProguardRulesFiles` can be used if necessary to regenerate the files Issue 20775 Assisted-by: Claude Opus 4.7 - research and fix
* `:compat` had this flag missing * `:vbpd` has no tests, so effectively a no-op Issue 20775 Assisted-by: Claude Opus 4.7 - diagnostic and fix
`kotlin-jvm` is intended for our modules which target `java-library` Issue 20775 Assisted-by: Claude Opus 4.7
Likely only one consumer: `:api`, added to standardize .kts files The API has separate requirements, but these are noise in the main gradle.kts file. Issue 20775 Assisted-by: Claude Opus 4.7 - full refactor
15c4ae6 to
1ff616b
Compare
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.
Purpose / Description
See: https://docs.gradle.org/current/userguide/sharing_build_logic_between_subprojects.html
Benefits of convention plugins
build.gradle.ktsfilesFixes
Approach
apiandlint-rulesHow Has This Been Tested?
Learning (optional, can help others)
Opus does seem to be worse - not reading files fully
This was a much more difficult change than I expected, lots of false starts, but I feel it's worthwhile. It picked up a few issues (
compat+ JaCoCo), and is a solid architectural change for the future.Checklist