arch: split :common:android from :common#20731
Merged
mikehardy merged 6 commits intoankidroid:mainfrom Apr 19, 2026
Merged
Conversation
3514183 to
f276d87
Compare
4 tasks
`:common` will be moved to a `java-library`. SLF4J is bridged to Timber via slf4j-timber in the app, so logs will continue to work. Due to this, fewer classes will need to move to `:common:android` Using 1.7.30 as this is the current transitive dependency Assisted-by: Claude Opus 4.6
It's better to remove the opt-in flag, rather than add the library
We want to move Android dependencies to ':common:android', these files can remain in a `jvm-library` if we fixup a few annotations Related to https://redirect.github.com/ankidroid/Anki-Android-Backend/issues/674
f276d87 to
cebfdd7
Compare
In preparation for moving libanki to be pure JVM, we need :common to be a java-library. JSON is supported by both android and JVM (with slightly differing apis so it can remain in `:common` Assisted-by: Claude Opus 4.6 Related to https://redirect.github.com/ankidroid/Anki-Android-Backend/issues/674
`com.ichi2.anki.utils.android` should be `com.ichi2.anki.common.utils.android`
cebfdd7 to
be9017d
Compare
Otherwise it's easy to forget to add it to androidModulesToUnitTest Assisted-by: Claude Opus 4.6 - tests
be9017d to
da99bfb
Compare
criticalAY
approved these changes
Apr 18, 2026
5 tasks
5 tasks
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.
Note
Assisted-by Claude Opus 4.6 (Max Effort)
the initial move was performed and the dependencies were added
But, most were incorrect, so there was a lot of manual fixups
Purpose / Description
I want
libankito become ajava-library. Since it depends on:common,:commonalso needs to be a Java libraryApproach
common:android:How Has This Been Tested?
app still runs as expected.
Learning (optional, can help others)
I've seen a lot about
SLF4J, but never used it. Very easy!Checklist