-
Notifications
You must be signed in to change notification settings - Fork 7
support multiple base packages in Android modules #372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
bug
Something isn't working
Comments
RBusarow
added a commit
that referenced
this issue
Feb 26, 2022
* main: support multiple android base packages fixes #372 fixes #402 # Conflicts: # modulecheck-core/src/main/kotlin/modulecheck/core/rule/DisableViewBindingRule.kt # modulecheck-core/src/main/kotlin/modulecheck/core/rule/InheritedDependencyRule.kt # modulecheck-parsing/gradle/src/main/kotlin/modulecheck/parsing/gradle/SourceSet.kt
RBusarow
added a commit
that referenced
this issue
Feb 26, 2022
* main: support multiple android base packages fixes #372 fixes #402 # Conflicts: # modulecheck-core/src/main/kotlin/modulecheck/core/rule/DisableViewBindingRule.kt # modulecheck-core/src/main/kotlin/modulecheck/core/rule/InheritedDependencyRule.kt # modulecheck-parsing/gradle/src/main/kotlin/modulecheck/parsing/gradle/SourceSet.kt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some Android projects choose to have different base packages for different source sets -- especially
androidTest
. For instance, they might follow a pattern like:com.example.app.test
com.example.app.debug
com.example.app
This is done by adding a small manifest file with just the custom package to the inheriting source set. It will override any upstream (inherited) package definition.
For the sake of simplicity, ModuleCheck currently only supports a single base package per module -- throwing an exception if it finds more. I never intended for that to be the final policy, but some other infrastructure was missing so a more rigorous solution would have been difficult.
Instead of just having a single
androidPackage
property per project, they should be keyed bySourceSet
. For lookups, if a base package is undefined for a specific source set, likedebug
, then look to its upstream source set(s) (likemain
).The text was updated successfully, but these errors were encountered: