Skip to content

fix(wear): exclude OSGI META-INF to unblock bcprov packaging - #161

Merged
CallMeTechie merged 2 commits into
masterfrom
fix/wear-osgi-packaging
Apr 21, 2026
Merged

CallMeTechie merged 2 commits into
masterfrom
fix/wear-osgi-packaging

Conversation

@CallMeTechie

Copy link
Copy Markdown
Owner

Release build for v0.33.12 (PR #158 merged) failed at :wear:mergeReleaseJavaResource:

> 2 files found with path 'META-INF/versions/9/OSGI-INF/MANIFEST.MF':
  - org.bouncycastle:bcprov-jdk18on:1.80
  - org.jspecify:jspecify:1.0.0

App module already excluded that path; wear didn't, because it never pulled bcprov before — it does now via the shared core-security dep (BouncyCastleSetup lives there).

Mirror the app's packaging exclusion.

Release build of v0.33.12 (PR #158) failed at :wear:mergeRelease
JavaResource because bcprov-jdk18on 1.80 and jspecify 1.0.0 both
ship META-INF/versions/9/OSGI-INF/MANIFEST.MF. The :app module
already excluded this path; :wear did not, because wear never
pulled in bcprov before — it does now via the shared
:core:core-security dependency (BouncyCastleSetup lives there).

Add a packaging resources block to wear/build.gradle.kts
mirroring the app exclusion list. OSGI metadata is not used by
Android runtime, so dropping it is safe.
@CallMeTechie
CallMeTechie enabled auto-merge (squash) April 21, 2026 15:19
Wear was the first module to hit the bcprov x jspecify OSGI
manifest duplicate (PR #158 pulled bcprov into :core:core-security,
every Android module inheriting :core:core-security now ships the
conflicting resource). :app had already guarded against it; :wear
was fixed in the previous commit on this branch.

But feature-settings' test APK failed with the same error on PR
#160's CI, and tracking down which module transitively gets bcprov
on the next dependency change is operational churn we don't need.

Move the exclude into root build.gradle.kts via a subprojects
plugin-withId block — applies to every com.android.library and
com.android.application subproject without per-module bookkeeping.
Revert the now-redundant wear-only exclude added two commits ago.

Local verify: :app, :wear, :feature-settings:assembleDebugAndroidTest
all green. detekt clean.
@CallMeTechie
CallMeTechie merged commit c317899 into master Apr 21, 2026
12 checks passed
@CallMeTechie
CallMeTechie deleted the fix/wear-osgi-packaging branch April 21, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant