Skip to content

Remove Jetifier #610

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

Merged
merged 2 commits into from
Feb 27, 2025
Merged

Remove Jetifier #610

merged 2 commits into from
Feb 27, 2025

Conversation

mickael-menu
Copy link
Member

Changed

  • Jetifier is not required anymore, you can remove android.enableJetifier=true from your gradle.properties if you were using Readium as a local clone.


I addressed this by taking the jetified artifacts in my Gradle cache (running jetifier-standalone directly failed) and importing them directly in the project. A downside is that now we have all the native libraries as part of the repository, which adds ~40 MB.

@mickael-menu mickael-menu requested a review from qnga January 16, 2025 17:06
@mickael-menu
Copy link
Member Author

This is still a draft because I haven't tested it thoroughly yet.

@qnga
Copy link
Member

qnga commented Jan 16, 2025

Couldn't you put the JAR into pdfium-document libs? pdium-navigator depends on it.

@mickael-menu
Copy link
Member Author

Couldn't you put the JAR into pdfium-document libs? pdium-navigator depends on it.

Not without using api instead of implementation which would leak the public API of pdfium-android into Readium.

@qnga
Copy link
Member

qnga commented Jan 16, 2025

That's weird, I can see no reference to a PDFium symbol in pdfium-navigator.

@mickael-menu
Copy link
Member Author

It uses the symbols indirectly through AndroidPdfViewer APIs.

@qnga
Copy link
Member

qnga commented Jan 16, 2025

That's what I thought. So I expect that compiling pdf-navigator doesn't need PDFium: it only has to be available on the classpath at runtime.

@mickael-menu
Copy link
Member Author

It doesn't compile, you can try it out.

@qnga
Copy link
Member

qnga commented Jan 16, 2025

Okay! I didn't expect gradle to check dependencies of precompiled JAR.

@mickael-menu mickael-menu marked this pull request as ready for review February 27, 2025 12:55
@mickael-menu mickael-menu merged commit 665d6f8 into develop Feb 27, 2025
4 checks passed
@mickael-menu mickael-menu deleted the remove-jetifier branch February 27, 2025 13:18
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.

Remove Jetifier - migrate to AndroidX - Gradle build slowdown
2 participants