67 Commits

Author SHA1 Message Date
0bd37c6312 build.gradle: Allow debug builds for armv8
Otherwise we get a nasty libflutter.so missing error when running a
debug build on an actual armv8 device.
2019-05-27 10:40:24 +02:00
7a7ca048e3 build.gradle: Remove dead code
It's from a time of jgit
2019-05-20 18:44:14 +02:00
efa4db5109 Android: Migrate to AndroidX
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.
2019-05-20 15:11:39 +02:00
9051d1e7dc Add a 'Report Bug' button
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
2019-05-20 14:35:27 +02:00
3ed86fd69b Revert "Android: Allow the release build to be debuggable"
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.
2019-05-19 14:29:16 +02:00
c1bd7a5225 Android build.gradle: Remove deprecated option
It's enabled by default
2019-05-19 14:28:32 +02:00
87aa6f7e50 Android: Allow the release build to be debuggable 2019-05-19 11:56:09 +02:00
976ce6aeba Android: Try to fix missing "libflutter.so" crash
The apparent fix seems to be to only ship an arm 32bit app, and not arm
arm64.
2019-05-18 12:36:18 +02:00
62c99db1be Remove libssh
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.
2019-05-16 17:29:56 +02:00
17e1880c37 cLib: Move keygeneration code over there
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.
2019-05-16 15:46:40 +02:00
2fa6f9338b Android: Remove the jgit dependency
Finally! We now only rely on libgit2. Unfortunately, we still rely on a
java library for the public key generation.
2019-05-16 12:27:15 +02:00
64c8ddd7b0 Android: Use the c library for git pull
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.
2019-05-16 12:23:27 +02:00
f5b98ab9c6 Make the android app use our c-lib for all git operations
* Apart from gitPull which is currently broken
* And the ssh key generation which fails on Android
2019-05-15 19:12:55 +02:00
7bd9e4fa98 Android JNI GitAdd: Use the c-lib's gitAdd instead
It finally works!
2019-05-15 18:28:02 +02:00
1dbe829372 GitAdd: Use libgit2 instead of jgit
This doesn't seem to work properly, though. Not sure what I'm doing
wrong.
2019-05-14 16:38:18 +02:00
1e8f098e10 CMakeLists: Cleanup unused macro 2019-05-14 14:29:53 +02:00
5dddeed54d Add a generateKeys JNI function
It goes via Dart -> Java -> JNI -> OurLib -> LibSSH. Also, it still
doesn't seem to work, and I'm not sure why. I kinda giveup for now.
2019-05-14 14:28:43 +02:00
668eae3562 Android: Move native code to its own class 2019-05-14 13:13:44 +02:00
cd68df9303 First integration of libgit2 in the Android App
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.
2019-05-14 13:09:25 +02:00
06adf4c3b9 Disable Advertising ID collection
I don't care about collecting this data, all I care about is anonymized
data collection about the number of users + screens used.
2019-02-16 09:50:30 +01:00
1f7871fe12 Add a GitResetLast command
This way we can revert the last committed change.
2019-02-15 19:27:40 +01:00
8593f79445 Revert "Add proguard to shrink apk size"
This reverts commit 72b30688b482058ba628fdb163e4957f553e77ce.

The release app is crashing because of this. It's not worth the
space saved by a few megabytes.
2019-02-15 13:59:02 +01:00
72b30688b4 Add proguard to shrink apk size
Went down from 8.5 to 6.7 mb.
2019-02-15 09:39:33 +01:00
2017fb36ea Android: Add a splash screen
It just has the GitJournal icon, but it's way better than a plain white
screen.
2019-02-14 23:30:58 +01:00
dc3f31eb92 Temporarily disable PoC JNI bindings
They are causing the release build to crash.
2019-02-13 15:35:42 +01:00
b124212958 Bump TargetSDK Version 2019-02-12 18:52:47 +01:00
1845faded9 Add POC Android JNI integration
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.
2019-02-09 01:36:42 +01:00
38896ef9c8 Android: Keep screen on in debug mode
It makes working with the application far far easier. There doesn't seem
to be a simple way to do this without modifying the code.
2019-02-06 15:48:52 +01:00
66cdda213a Fix gitClone from github
The test still fails, but via the app cloning seems to work. Progress!!
2019-02-06 15:34:57 +01:00
4de157e6b1 Add an automated test for testing git clone in github
It currently fails :(
2019-02-06 15:06:08 +01:00
7f31b17012 Downgradge jgit version
This way we can target older android devices. I got the exact version
from - https://github.com/zeapo/Android-Password-Store
2019-02-02 12:38:26 +01:00
c7174ab2da Update minSDKVersion to 26
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.
2019-01-25 01:21:39 +01:00
c2e49bb630 Add a POC OAuth client implementation
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
2019-01-23 20:20:22 +01:00
03db7d62e7 android: Minor refactor
Reduces the level of indentation, and makes the code easier to read.
2019-01-23 20:16:48 +01:00
8b40cd2285 GitCommit: Let us specify the date time
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.
2019-01-23 11:03:06 +01:00
519de8fcff Remove onboarding screen
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.
2019-01-21 13:43:33 +01:00
c915e58273 GitCommit: Do not allow empty commits 2019-01-21 13:39:30 +01:00
3d48ef7419 GitPush: Push all branches
In new repos master doesn't exist.
2019-01-17 14:54:37 +01:00
e9da9a6ae8 Android: Improve error checking 2019-01-16 23:55:16 +01:00
f74229dbc7 Fix sshkey custom comment
Custom comments had been implemented but were not working.
2019-01-16 23:37:19 +01:00
4292555286 Pull to sync: Show a snackbar with an error message
The error message is quite basic right now -
"No Connection" or the full error returned to us by the java libraries.
But it's a start!
2019-01-16 23:20:07 +01:00
6db080b5f4 GitMerge: For now just take THEIRS as the Merge Strategy
In the future, our strategy can be that we take whichever file has been
modified the latest. That's actually far more reasonable.
2019-01-15 15:39:17 +01:00
c73bfa84e9 Android: Add release apk signing info 2019-01-14 16:20:59 +01:00
a1cf29e4a5 Add version number
New versions of flutter allow us to specify the version number in the
pubspec.yaml file.
2019-01-14 16:20:14 +01:00
361ee40868 Add crashanalytics 2019-01-14 14:35:05 +01:00
f63439f6cc Update android icon
It has a horrible white circle around it, and I cannot seem to figure
out how to fix it.
2019-01-11 17:49:16 +01:00
38f7840113 Add some basic onboarding screens
They don't really work out since I don't quite understand how PageView
and the PageController are supposed to work.
2019-01-10 11:54:39 +01:00
706f5bfacc Disable ssh logging
It's super verbose and no longer required
2019-01-09 12:52:57 +01:00
03645c298a GenerateSSHKey: Allow the comment to be customized 2019-01-09 11:54:10 +01:00
5a8217105e Android: Fix app label 2019-01-08 22:36:33 +01:00