This has some advantages:
- Less stuff to download for building Gadgetbridge (CI Speedups)
- Shorter build time (no need to build shared library for all supported architectures)
- Easier debugging
- etc :P
What I did:
- remove all curves except B163 to make porting easier
- port to java with brain switched off
- fix the "java has no unsigned" bugs
- add some helpers to convert int[] to byte[] and back because java has no casts
The result is ugly, no one would write such crappy code from scratch, but I tried to
keep it as close to the C code as possible to prevent bugs. Since I did not know what
These changes where necessary to build on ARM64, hope it does not break anything
protobuf-lite 3.0 said the architecture aarch64 is unsupported for the protobuf compiler,
build tools 30 could not be installed via sdkmanager for an unknown reason.
This PR adds build flavors to `build.gradle`. The default is called `main`, but we also add `banglejs` which allows the building of an app called `Bangle.js Gadgetbridge`.
This will have internet connectivity, allowing Bangle.js watches to request data directly from the internet - and it's named so as hopefully not to be confused with the normal offline Gadgetbridge, while still giving credit.
Eventually the plan is to put this on the Google Play store, and to have additions in it which are good for Bangle.js users but would otherwise negatively impact normal Gadgetbridge users (a build flavor is used so we can keep the same codebase and not fork).
About naming - I'd mentioned `Gadgetbridge for Bangle` to @ashimokawa but thinking about how it would appear in the app store and Android apps list, it probably makes sense to call it `Bangle.js Gadgetbridge` so it's listed under `B...`. Happy to change or use something else if you have strong opinions though.
**Note:** adding build flavors seems to add the flavor name to existing builds. As a result, *all other builds will now have `main` in the name*. Unfortunately I didn't see another way around this, but hopefully it won't break anything.
Co-authored-by: Gordon Williams <gw@pur3.co.uk>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2621
Co-authored-by: gfwilliams <gfwilliams@noreply.codeberg.org>
Co-committed-by: gfwilliams <gfwilliams@noreply.codeberg.org>
Yes I hate Java, and I hate gradle.
Both are a huge waste of resources.
I wonder how many nuclear plants could be switched off if people would stop using this bloated crappy VM bullshit language and "ecosystem".
And no it does not "make you super productive" and it it does not justify "investing in more hardware cpu/ram/cloud capacity" because it is "cheaper than manpower".