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.
It's so awesome that I don't need to store the client secret with
GitLab. The GitHub APIs are so much easier to use + documentation, but
at least GitLab supports more OAuth methods.
In this mode the user doesn't need to do anything but give the
GitJournal app permissions, and then it will go and create the repo, add
the ssh key and everything.
This currently does not work for Gitlab.
This just models the basic API that we need for GitJournal. The API
isn't great and could use improvement.
Also, yes, I know I'm committing the secret key, but I don't see any
other way of managing this. GitHub doesn't allow the implicit oauth flow
or dynamic clients registration or anything. So there isn't really any
other way.
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
This way it properly aligns up with the hamburger menu.
I also discovered this 'debugShowMaterialGrid' option which makes
working with padding issues much much easier.
It's annoying, and does not allow us to easily take screenshots.
Specially since the apps built in release mode cannot be run in an x86
android emulator.
This way initially all the changes are performed on the local git repo,
and then later they are applied on the remote git repo. Currently we
just copy the files, but we should be cherry-picking each commit and
applying it properly.
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.
It all just makes far more since when each Note has a fileName.
Though we don't save the fileName in the YAML header. It seems quite
redundant to do that.
Another advantage of this is that if we can read any file ending with a
'.md' in a git repo. It doesn't need to be named exactly how we want it,
and we will still save the details correctly.