2595 Commits

Author SHA1 Message Date
bd9ca896bf Fix clone test
The keys were not formatted correctly.
2019-02-06 16:17:58 +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
cb020c00fe Add the first integration test using the flutter driver
We need to test the git operations on all the devices.
2019-02-05 14:35:36 +01:00
e948a23c55 Add CircleCI config 2019-02-02 18:09:47 +01:00
21ab144b18 Fix assert 2019-02-02 12:39:12 +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
1c368afdc8 pubspec: Flutter upgrade 2019-02-02 12:23:28 +01:00
c0a1c139fa Fastlane: Enable building the apk again
The newest flutter beta fixes --build-number flag, so I can use this
again.
2019-02-02 12:16:29 +01:00
4509c90bbf Bump version 2019-01-25 15:51:49 +01:00
ed092da3c7 GitHostSetup: Lots of fixing
The flow between all the wizards is now complex enough that having it
all in one class is becoming quite complex. I've eventually managed to
get all the workflows to work, but there is a decent amount of code
duplication.

This really needs to be simplified.
2019-01-25 15:50:26 +01:00
d6515bf507 GitHost AutoConfigure: Show the error
It looks super ugly, but it's better than not showing anything.
2019-01-25 15:11:24 +01:00
8e9e3a91b5 GitHosts: Throw RepoExists exception 2019-01-25 15:11:09 +01:00
86f01ab7d1 GitHosts: Improve error handling 2019-01-25 15:03:42 +01:00
fb202e0f1f GitHost AutoConfigure: Handle errors a bit better 2019-01-25 14:52:56 +01:00
15cedd75f1 Fastlane: Disable building the package until 1.1.3 is released
https://github.com/flutter/flutter/issues/23811

This bug has been fixed but 1.1.3 has still not been promoted to the
beta branch. I'm not sure when that will happen, and I'm not comfortable
using the 'dev' branch of Flutter. The month of Feb is almost here, so
maybe then there will be a new release.
2019-01-25 13:12:29 +01:00
06812d3fa1 Show a badge to indicate that the 'Git Host' has not been setup 2019-01-25 12:45:33 +01:00
ce343b316a GitHostSetup: Rename a string 2019-01-25 12:15:43 +01:00
6b6148b726 Bump version number 2019-01-25 12:05:36 +01:00
7d973561a9 Update journal_android
No idea why this is being updated by Android Studio :/
2019-01-25 12:05:36 +01:00
285a900e76 Rename OnBoarding to GitHostSetup
It was either GitHost or GitRemote.
2019-01-25 12:05:32 +01:00
c5135ff822 OnBoarding: Integrate GitLab api
Now we can also automatically create a GitLab repo + configure it.
2019-01-25 11:34:30 +01:00
bfcfa3b449 Add a GitHost factory
There are probably more idiomatic ways of doing this, but I'm not sure
how.
2019-01-25 11:28:38 +01:00
ac5c2be05d Add a GitHost interface
GitLab and GitHost are two implementations of that interface.
2019-01-25 11:21:58 +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
fafd2f9407 Remove .idea
Not really required to be in version control
2019-01-25 01:21:05 +01:00
a342eada0f OnBoarding Screen AutoConfigure: Let the user swipe back 2019-01-24 18:21:39 +01:00
f8a066d5d9 Add API for GitLab
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.
2019-01-24 18:19:50 +01:00
4c1009f42f OnBoarding: Add auto-configure mode for Github
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.
2019-01-24 16:45:40 +01:00
136713dc1e Github: Remove unnecessary braces 2019-01-24 15:30:55 +01:00
edc83c3048 Move scripts to their own folder 2019-01-24 15:29:07 +01:00
d87085ac29 GitHub API: Refactor it into a class 2019-01-24 15:28:04 +01:00
fbdb4d61ed Add an OAuth GitHub api
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.
2019-01-24 13:50:06 +01:00
2a029d261a Bump version number 2019-01-24 00:00:32 +01:00
a25deb2b0c Fix unused imports 2019-01-23 23:58:52 +01:00
d4d402490a Settings: Highlight debug version
Since we no longer have the debug banner, it's nice to have a way to
figure out what version we are running.
2019-01-23 20:20:51 +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
b9b42d950f ListView: Remove the padding
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.
2019-01-23 15:19:54 +01:00
e590c3c132 Do not show the 'debug' banner
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.
2019-01-23 15:11:01 +01:00
de6968606d Gitlab: link to the exact Deploy Keys part
Gitlab guys were quite promt!

https://gitlab.com/gitlab-org/gitlab-ce/issues/56589#note_134106654
2019-01-23 14:52:27 +01:00
a7d366e7c6 Settings: Try to add a header
It still looks ugly as fuck
2019-01-23 13:39:54 +01:00
75d86dfa99 Settings: Add 'GitAuthor' and 'Git Author Email'
These are just dummy values for now and cannot be actually changed.
2019-01-23 13:29:26 +01:00
4ca40ee08b Note Browsing: Allow swiping along the notes
I'd implemented an adhoc method of doing this which clearly sucked. It's
easier to just use the PageView class.
2019-01-23 13:00:49 +01:00
170983024c Fix Clone screen not disappearing
and other misc changes
2019-01-23 12:48:37 +01:00
2b1ac6cad7 Hookup onBoarding screen to app
* I should probably stop calling in an onboarding screen, since it's now
just a way to setup sync.

* It overall feels quite ugly, and unpolished.
2019-01-23 12:13:02 +01:00
dfd5d6f6d2 Note: Remove the asserts
We actually do quite often create notes without anything, and then later
fill them up. Lets just setup a bad default for the created.
2019-01-23 12:09:26 +01:00
a29a102667 Move git api to apis folder 2019-01-23 11:54:02 +01:00
8693545fe5 OnBoardingScreen: Do not quit when pressing back
We're no longer the first screen to be shown.
2019-01-23 11:51:39 +01:00