Skip to content

Manifest generation: fail on write errors, clean up logging#394

Open
rossbacher wants to merge 1 commit into
masterfrom
rossi-manifest-generation-cleanup
Open

Manifest generation: fail on write errors, clean up logging#394
rossbacher wants to merge 1 commit into
masterfrom
rossi-manifest-generation-cleanup

Conversation

@rossbacher
Copy link
Copy Markdown
Collaborator

Summary

  • ManifestGenerator now throws DeepLinkProcessorException on IOException when writing the generated AndroidManifest.xml, so write failures fail the build cleanly instead of being swallowed as a diagnostic warning that surfaces later in a confusing place. Catch is scoped to IOException so genuine processor bugs (NPE/ISE) are no longer hidden.
  • RelocateDeepLinkManifestTask: use orNull on the @optional kspManifestFile property (get() NPEs when unset), replace println with logger.warn so the message respects Gradle log level, collapse an empty else-if branch, and fix a couple of typos.
  • GenerateManifestIntentFiltersForDeeplinkDispatchTask: replace println with logger.warn, and replace error(...) (IllegalStateException) with throw GradleException(...) for idiomatic build-failure output.

Test plan

  • ./gradlew :deeplinkdispatch-processor:test :deeplinkdispatch-gradle-plugin:test
  • ./gradlew :sample:testDebugUnitTest :deeplinkdispatch:test :deeplinkdispatch-base:test

- ManifestGenerator: throw DeepLinkProcessorException on IOException
  instead of swallowing as a diagnostic warning (a missing manifest
  would otherwise fail silently in a confusing downstream place).
  Catch scoped to IOException so processor bugs aren't hidden.
- RelocateDeepLinkManifestTask: use orNull instead of get() on the
  @optional kspManifestFile property (get() NPEs when unset), replace
  println with logger.warn, collapse empty else-if branch, fix typos.
- GenerateManifestIntentFiltersForDeeplinkDispatchTask: replace
  println with logger.warn (respects --quiet) and switch error(...)
  calls to throw GradleException for idiomatic build-failure output.
@rossbacher rossbacher force-pushed the rossi-manifest-generation-cleanup branch from 441e49a to 39b066e Compare April 20, 2026 22:31
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