Improvements for developer builds#4
Open
jeanparpaillon wants to merge 7 commits into
Open
Conversation
app/build.gradle staged everything through absolute paths into one
developer's home directory (/home/dsr/Projects/...), so the APK could only
be assembled on that machine. Drive the staging from properties instead:
OCPN_SRC, OCPN_BUILD_ARMHF, OCPN_BUILD_ARM64, QT_ARMHF, QT_ARM64,
NDK_SYSROOT
passed with -P, defaulting to a side-by-side checkout layout so a bare
./gradlew still works. OpenCPN-builder supplies them for its container.
Two of these are not just renamed paths:
* source and build tree are now separate properties. OCPN_Base served as
both, which only works when the build directory sits inside the source
tree, as it did there but does not in general.
* ${Qt_Base}/${Qt_Build}/qtbase collapses to one property per ABI. The
qtbase level is an artifact of building Qt from source in-tree; it does
not exist in an installed Qt.
Alongside that, the parts of the staging that no longer resolve:
* src/bitmaps moved to resources/bitmaps in OpenCPN.
* The wxstd.mo lines are dropped: nothing stages wx's own translations,
and a Copy of a missing file is silent, so they only looked like they
worked. wx's stock strings stay untranslated until they are staged.
* Every task reaching into /home/dsr for a third-party plugin (draw,
oesenc, o-charts, celestial, watchdog, vdr, pypilot, weather_routing,
statusbar) is removed -- they are separate projects and several are not
redistributable. copySERVERFiles32/64 mattered: they were *enabled* and
silently copying nothing, so the oexserverd they promise was never in
the APK anyway.
* The x86 tasks go with them; abiFilters covers armeabi-v7a and
arm64-v8a only.
libc++_shared.so now comes from NDK_SYSROOT rather than the copy committed
here. libgorp.so has it as DT_NEEDED and libs.xml loads it first, so it has
to match the NDK that built the lib; the committed one predates it.
Also: drop jcenter(), which is shut down; drop ':afilechooser' from
settings.gradle, which has no directory and no dependents; and stop
ignoring google-services.json -- OpenCPN-builder drops a placeholder there
for dev builds, and committing either that or the real credentials would
make a production build silently use whatever was checked in.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The debug build installs alongside a stock OpenCPN via a ".debug"
applicationIdSuffix, but that only works if nothing declares a device-global
resource under a fixed name. materialfilemanager registers four providers with
hardcoded authorities (bms.ocpnfilemanager.{bookmarks,search,search.suggest,
filemanager}); provider authorities must be unique across the whole device, so
installing next to stock fails with INSTALL_FAILED_CONFLICTING_PROVIDER.
Make them ${applicationId}-relative so the merger substitutes each variant's
final applicationId, keeping debug and stock distinct. This is inert beyond the
uniqueness: nothing resolves against these authorities — the Java CONTENT_URIs
point at the unrelated bms.myfilemanager.*/com.veniosg.dir.* strings, so the
providers were already dead registrations.
Companion to ccecb0b, which fixed the app's own FileProvider authority the same
way; this covers the library providers that surfaced on the next install.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
When developing, we don't need firebase, so add AndroidManifest override fur debug env, with firebaseInitProvider disabled
Drive ndk.abiFilters and the per-arch copy tasks (core lib, Qt libs, libc++_shared, plugin .so) from a single OCPN_ABIS property, defaulting to both ABIs so a bare ./gradlew still builds a fat APK. This lets OpenCPN-builder build a single arch for faster dev cycles without the build reaching for a tree it never built. Also source the arch-independent translation .mo files from a dedicated OCPN_BUILD_ALL tree instead of the armhf build, so the APK's languages no longer depend on which arch was built. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Hi Dave.
Thank you for your work on OpenCPN. I also live on my boat is this is of great value :)
This is the beginning of contributions I'd like you to review.
The first goal is to ease the build of OpenCPN Android app fotr developpers.
I'm looking forward to contribute to the core code onbce this is fixed.
Don't hesitate to share your thoughts on that and discuss strategies for improving the contribution process.