guardianproject / haven

Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors
https://guardianproject.github.io/haven/
GNU General Public License v3.0
6.63k stars 728 forks source link

Update build for Android 10 / Android Studio 4.0 Canary 5 + Day/Night themes #405

Closed fat-tire closed 4 years ago

fat-tire commented 5 years ago

It has been some time since Haven was updated, and with the release of Android 10 I figured why not bring it up to date. I had some free time, and while I probably should have been reading Snowden's new book instead, this PR is the result.

There is now both a day and night theme that needs testing. Hopefully theme changes won't affect functionality (especially if the change occurs while Haven is armed) but if this is an issue, I'm sure it wouldn't be hard to fix. The dark theming colors were sort of picked by me just so it didn't look horrific. Would appreciate subsequent refinement by UI experts since I don't know what I'm doing there.

Short list of changes:

If you build from the command line with ./gradlew assembleRelease it should build fine out of the box. Using the Android Studio UI might require commenting out distributionSha256Sum in gradle-wrapper.properties due to a "not fully supported to define distributionSha256Sum" error in newer Android Studio. No big deal.

This PR is meant as a starting point for kickstarting some fresh development as no doubt libraries and plugins will continue to be updated, but just thought a refresh might be neato.

That's it! Please test & enjoy.

ft

fat-tire commented 5 years ago

CI error is out of my hands :)

FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'haven'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
     build-tools;29.0.2 Android SDK Build-Tools 29.0.2
     platforms;android-29 Android SDK Platform 29
  To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
n8fr8 commented 4 years ago

Amazing... as for the CI, yes, annoying. Working to update this to a Gitlab based CI soon.

Otherwise, reviewing, will test and merge soon.

fat-tire commented 4 years ago

Updated for 4.0 Canary 5, released today. Also returned a @Nullability that no longer blocks the build (must have been fixed in gradle (?)) Anyway, see recent commits.

Update: Oh just realized you already commented to yesterday's changes. Well, as you can see, today's is VERY minor :)

n8fr8 commented 4 years ago

Just rolled back gradle tools version so I can still build this in my stable Android Studio 3.5.x. Otherwise, thanks for the swift kickstart in the rear :)

My kids are demanding I update Haven so we can catch Santa in the act this year, so definitely time for a new release.