Skip to content

fix(build): publish all library modules with component-backed Maven artifacts (#414)#415

Open
wax911 wants to merge 2 commits into
developfrom
fix/414-jitpack-multi-module-publishing
Open

fix(build): publish all library modules with component-backed Maven artifacts (#414)#415
wax911 wants to merge 2 commits into
developfrom
fix/414-jitpack-multi-module-publishing

Conversation

@wax911

@wax911 wax911 commented Jun 20, 2026

Copy link
Copy Markdown
Member

Closes #414

Changes

  • Replaced broken manual-AAR publishing (only :library facade) with AGP component-backed publications for all 8 consumable modules
  • Android modules: singleVariant("release") + components.release publication
  • JVM modules: maven-publish + components.java publication
  • Removed dead code: manual sourcesJar/classesJar tasks, artifacts block
  • Updated build-map.md

Verification

  • All 8 modules show publishMavenPublicationToMavenLocal tasks
  • Build + publish to Maven local succeeds
  • Artifacts verified in ~/.m2/repository/co/anitrend/

…rtifacts (#414)

Replace the broken manual-AAR publishing (which only worked for the
deprecated :library facade) with AGP component-backed publications for
every consumable module.

Android modules:
- Configure singleVariant("release") + withSourcesJar() in buildSrc
- Create MavenPublication from components.release in afterEvaluate
  (component doesn't exist until after AGP task graph resolution)
- artifactId = project.name (except :library, kept as retrofit-graphql
  for backward compatibility)
- Removed dead code: manual sourcesJar/classesJar tasks, artifacts block

JVM modules (:annotations, :codegen-core):
- Inline maven-publish + publication from components.java directly in
  each build file (composite build classpath prevents buildSrc helper)
- sourcesJar created manually (AGP's withSourcesJar is Android-only)

All 8 modules now publish to Maven local with correct artifactIds,
version v0.12.0, and POM metadata.
@github-actions github-actions Bot added the docs label Jun 20, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto approved automated PR

@codacy-production

codacy-production Bot commented Jun 20, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

- Restore logger.lifecycle calls in configurePublishing()
- Extract duplicated JVM publishing into configureJvmPublishing() helper
  in buildSrc JvmConfiguration.kt
- Add no-op stub for composite build's JvmConfiguration.kt to avoid
  resolution failures in the gradle-plugin composite build context
- Simplify annotations/build.gradle.kts (54→12 lines) and
  codegen-core/build.gradle.kts (61→19 lines)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix JitPack Multi-Module Artifact Publishing

1 participant