The Android Support Library is not androidx
https://developer.android.com/jetpack/androidx
This also required me to update each of the dependencies, as the
androidx migrated has resulted in major version changes in most of the
libraries.
This also attaches the entire 'adb logcat' in Android. This way, we can
hopefully get useful info about why something is not working.
This currently breaks the build as we need to migrate to Android X
This reverts commit 87aa6f7e5088ecad2c8926855057836891786a85.
Apparently one cannot publish debuggable APKs in the PlayStore. I wanted
this to be able to ask users to send me the logs via 'logcat', but it
seems I will have to figure out some other way.
libssh is LGPL licensed, which means I would need to re-license the
entire app since we are linking against it statically. I could
dynamically link against it, but since I was only trying to use it for
key-generation and that doesn' seem to be working, I may as well discard
it.
For now, I'm going to stick with jsch for the key generation. On ios
side, I'm not sure what I will do. One option could be to compile
openssh and call the ssh-keygen binary.
This way we can easily test it outside of Android. Strangely enough this
doesn't work on Android or osx for me. It only seems to work in an
ubuntu linux container.
It's not perfect as our implementation of git pull results in an extra
merge commit and doesn't handle conflicts properly, but it is a basic
implementation, so at least we have something.
This will allow us to remove the jgit dependency. JGit is annoying
because we have to use an old version in order to support older API
versions. Additionally, there are some subtle differences in their
implementation.
Finally, for iOS and desktop we will be using libgit2, so we may as well
use the same stack on Android.
This reverts commit 72b30688b482058ba628fdb163e4957f553e77ce.
The release app is crashing because of this. It's not worth the
space saved by a few megabytes.
I want to stop using jgit and instead of libgit2 instead. I feel far
more confident with the latter, and I need to use it for ios anyway.
Currently I cannot use the latest version of jgit as that requires a
higher minSDKVersion, and I want to target older android devices as
well.
Jgit relies on java.nio.file which was only added in API Level 26.
https://developer.android.com/reference/java/nio/file/package-summary
This sucks because we're greately limiting the number of Android Devices
we can target. I don't get what is so special about nio, that it cannot
be treated like any other API.
I've registered GitJournal as an app on Github and tried to get the
access_token within the app. This seems to work. Though, I need to
provide the client secret as well. It's quite sad that GitHub does not
even support the Implicit Grant auth type.
Credit: https://stackoverflow.com/questions/46196240/oauth2-flow-in-flutter-app
The Timezone handling is java seems to be quite strange, so I'm going to
skip it for now and fix it later. We do seem to have proper timezone
classes in future versions of Java, but that requires me to increase the
minSDKVersion, and therefore not support very old android devices.
For now just create a local git repo and commit all the changes over
there, we're going to allow the user to first see the app and use it
however they want, and later connect it to a remote git repo.
This commit breaks the app, as the on-boarding screen is no longer
connected so you cannot push to a remote app.