Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
reorganized gradle build files and project structure. bumped api to 2…
Browse files Browse the repository at this point in the history
…1. bumped support v4 to 21.0.3. pulled needed guava classes into util/guava package and dropped guava dependency. replaced javax.servlet dependency with constants. added sanity checks when working with google play services. created a nonplay flavor and integrated SupplyChain to provide updates and crash reporting. pointed nonplay flavor to modified privacy policy.
  • Loading branch information
rhodey committed Feb 17, 2015
1 parent 32c06ba commit b25ab2e
Show file tree
Hide file tree
Showing 107 changed files with 1,373 additions and 264 deletions.
19 changes: 18 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
classpath files('libs/gradle-witness.jar')
}
}

allprojects {
repositories {
mavenCentral()

maven { url 'https://raw.github.com/whispersystems/maven/master/stripe-btc/releases' }
maven { url 'https://raw.github.com/whispersystems/maven/master/gson/releases/' }
}
}
53 changes: 24 additions & 29 deletions flock/build.gradle
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
classpath files('libs/gradle-witness.jar')
}
}

apply plugin: 'com.android.application'
apply plugin: 'witness'

repositories {
mavenCentral()

maven { url 'https://raw.github.com/whispersystems/maven/master/stripe-btc/releases' }
maven { url 'https://raw.github.com/whispersystems/maven/master/gson/releases/' }
}

android {

compileSdkVersion 21
buildToolsVersion '21.1.2'

defaultConfig {
applicationId "org.anhonesteffort.flock"
versionCode 25
versionName "0.9.3"
minSdkVersion 16
targetSdkVersion 19
targetSdkVersion 21
}

productFlavors {
play { }
nonplay { }
}

packagingOptions {
Expand All @@ -42,13 +34,14 @@ android {
}
}

repositories {
mavenLocal()
}

dependencies {
compile group: 'com.google.guava', name: 'guava', version: '16.0'
compile group: 'com.android.support', name: 'support-v4', version: '19.0.1'
compile group: 'com.android.support', name: 'support-v4', version: '21.0.3'
compile group: 'org.apache.jackrabbit', name: 'jackrabbit-webdav', version: '2.3.7'
compile group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1'
compile group: 'javax.servlet', name: 'servlet-api', version: '2.5'
compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.5'
compile group: 'com.googlecode.ez-vcard', name: 'ez-vcard', version: '0.9.0'
compile group: 'org.mnode.ical4j', name: 'ical4j', version: '1.0.5.2'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.3.0'
Expand All @@ -62,22 +55,26 @@ dependencies {
androidTestCompile group: 'com.squareup', name: 'fest-android', version: '1.0.8'
androidTestCompile group: 'com.google.dexmaker', name: 'dexmaker', version: '1.1'
androidTestCompile group: 'com.google.dexmaker', name: 'dexmaker-mockito', version: '1.1'

nonplayCompile (group: 'org.whispersystems.supplychain', name:'libsupplychain', version:'1.0') {
exclude group: 'com.android.support', module: 'support-v4'
}
}

dependencyVerification {
verify = [
'com.google.guava:guava:fa917f4f3f6a76375134ba89a40d3a1ce807945a91bbdbe39c31f76e03030868',
'com.android.support:support-v4:a4268abd6370c3fd3f94d2a7f9e6e755f5ddd62450cf8bbc62ba789e1274d585',
'com.android.support:support-v4:703572d3015a088cc5604b7e38885af3d307c829d0c5ceaf8654ff41c71cd160',
'org.apache.jackrabbit:jackrabbit-webdav:9a11e030921bc21de7d6dcf168571a3d2671f72c351498a0daefaf79e0edc888',
'commons-httpclient:commons-httpclient:dbd4953d013e10e7c1cc3701a3e6ccd8c950c892f08d804fabfac21705930443',
'javax.servlet:servlet-api:c658ea360a70faeeadb66fb3c90a702e4142a0ab7768f9ae9828678e0d9ad4dc',
'org.slf4j:slf4j-simple:6d06eedca4768119b2c6ac5adf97e7b5ad57a03d6578d69e734fa083c957dc06',
'com.googlecode.ez-vcard:ez-vcard:2e09cc227f8f269be5fbdc17b999b9514e239281754a0b4d4c221e29ba2d0876',
'org.mnode.ical4j:ical4j:dedb09e8975f0703b3ae5ad60205fedda7512f91d837070be99732001a08b138',
'com.fasterxml.jackson.core:jackson-databind:9b789c2de23ff5a1ae1fc8193ea79e34f16d74c64c51491fbe76ca277349e694',
'com.google.code.gson:gson:c0328cd07ca9e363a5acd00c1cf4afe8cf554bd6d373834981ba05cebec687fb',
'com.stripe:stripe-java-btc:daaabd181eb6bc4868d739e023226d344a56bf6020a7ad057dc0c26fc7d223da',
'com.google.zxing:core:f00b32f7a1b0edc914a8f74301e8dc34f189afc4698e9c8cc54e5d46772734a5',
'org.whispersystems:libpastelog:3ccf00fe1597eb8ca1e5de99b17fc225387a1b80b5bbc00ec1bc4d4f3ea9cdde',
'com.android.support:support-annotations:fdee2354787ef66b268e75958de3f7f6c4f8f325510a6dac9f49c929f83a63de',
'org.slf4j:slf4j-api:367b909030f714ee1176ab096b681e06348f03385e98d1bce0ed801b5452357e',
'org.slf4j:jcl-over-slf4j:261e66d2b5d95ce1bc9923ab5e614f58b2568787b2b55f74dbb861b60ff798e0',
'org.jsoup:jsoup:37e3b44fb9476a677a956fb684090b9b4a1e4d38bcfc30b499dbc83f109422c0',
'org.freemarker:freemarker:c26923394f3f1cf0427f515ee3bb6be66d1a7f4261e6d6f0504fdec63ab85da8',
Expand All @@ -86,9 +83,7 @@ dependencyVerification {
'commons-lang:commons-lang:50f11b09f877c294d56f24463f47d28f929cf5044f648661c0f0cfbae9a2f49c',
'backport-util-concurrent:backport-util-concurrent:f5759b7fcdfc83a525a036deedcbd32e5b536b625ebc282426f16ca137eb5902',
'com.fasterxml.jackson.core:jackson-annotations:0c8c3811322cc84c09a93f34436fe784a1259dd5376a90aec5a73493456f757d',
'org.slf4j:slf4j-api:fe30825245d2336c859dc38d60c0fc5f3668dbf29cd586828d2b5667ec355b91',
'com.fasterxml.jackson.core:jackson-core:61f84f93e3f901134d7498b50119ee01074f10d59560e45ccd3e1d48cfec493b',
'org.whispersystems:libpastelog:3ccf00fe1597eb8ca1e5de99b17fc225387a1b80b5bbc00ec1bc4d4f3ea9cdde'
'com.fasterxml.jackson.core:jackson-core:61f84f93e3f901134d7498b50119ee01074f10d59560e45ccd3e1d48cfec493b'
]
}

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import android.test.AndroidTestCase;

import com.google.common.base.Optional;
import org.anhonesteffort.flock.util.guava.Optional;

import org.anhonesteffort.flock.auth.DavAccount;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import android.content.Context;
import android.test.AndroidTestCase;

import com.google.common.base.Optional;
import org.anhonesteffort.flock.util.guava.Optional;

import org.anhonesteffort.flock.crypto.KeyHelper;
import org.anhonesteffort.flock.crypto.KeyStore;
Expand Down
8 changes: 1 addition & 7 deletions flock/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.anhonesteffort.flock"
android:versionCode="25"
android:versionName="0.9.3" >

<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="19" />
package="org.anhonesteffort.flock" >

<uses-permission android:name="android.permission.USE_CREDENTIALS"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import android.widget.CompoundButton;
import android.widget.TextView;

import com.google.common.base.Optional;
import org.anhonesteffort.flock.util.guava.Optional;
import org.anhonesteffort.flock.crypto.InvalidMacException;
import org.anhonesteffort.flock.sync.HidingDavCollection;
import org.anhonesteffort.flock.sync.LocalComponentStore;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import android.widget.ListView;
import android.widget.TextView;

import com.google.common.base.Optional;
import org.anhonesteffort.flock.util.guava.Optional;

import java.util.LinkedList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import android.util.Log;
import android.widget.Toast;

import com.google.common.base.Optional;
import org.anhonesteffort.flock.util.guava.Optional;
import org.anhonesteffort.flock.auth.DavAccount;
import org.anhonesteffort.flock.crypto.KeyHelper;
import org.anhonesteffort.flock.crypto.MasterCipher;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import android.widget.CompoundButton;
import android.widget.TextView;

import com.google.common.base.Optional;
import org.anhonesteffort.flock.util.guava.Optional;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import android.widget.TextView;
import android.widget.Toast;

import com.google.common.base.Optional;
import org.anhonesteffort.flock.util.guava.Optional;
import org.anhonesteffort.flock.crypto.KeyStore;
import org.anhonesteffort.flock.sync.key.KeySyncScheduler;
import org.anhonesteffort.flock.util.PasswordUtil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
import android.support.v4.app.NotificationCompat;
import android.util.Log;

import com.google.common.base.Optional;

import org.anhonesteffort.flock.util.guava.Optional;
import org.anhonesteffort.flock.auth.DavAccount;
import org.anhonesteffort.flock.crypto.KeyHelper;
import org.anhonesteffort.flock.crypto.KeyStore;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import android.widget.TextView;
import android.widget.Toast;

import com.google.common.base.Optional;
import org.anhonesteffort.flock.util.guava.Optional;
import org.anhonesteffort.flock.auth.DavAccount;
import org.anhonesteffort.flock.sync.addressbook.AddressbookSyncScheduler;
import org.anhonesteffort.flock.sync.calendar.CalendarsSyncScheduler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
import android.support.v4.app.NotificationCompat;
import android.util.Log;

import com.google.common.base.Optional;

import org.anhonesteffort.flock.util.guava.Optional;
import org.anhonesteffort.flock.auth.DavAccount;
import org.anhonesteffort.flock.crypto.KeyHelper;
import org.anhonesteffort.flock.crypto.KeyStore;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import android.content.Context;
import android.content.SharedPreferences;

import com.google.common.base.Optional;
import org.anhonesteffort.flock.util.guava.Optional;
import org.anhonesteffort.flock.auth.DavAccount;
import org.anhonesteffort.flock.crypto.MasterCipher;
import org.anhonesteffort.flock.sync.AndroidDavClient;
Expand All @@ -33,10 +33,10 @@
import org.anhonesteffort.flock.sync.calendar.HidingCalDavStore;
import org.anhonesteffort.flock.sync.key.DavKeyStore;
import org.anhonesteffort.flock.webdav.PropertyParseException;
import org.anhonesteffort.flock.webdav.WebDavConstants;
import org.anhonesteffort.flock.webdav.caldav.CalDavStore;
import org.anhonesteffort.flock.webdav.carddav.CardDavStore;
import org.apache.jackrabbit.webdav.DavException;
import org.apache.jackrabbit.webdav.DavServletResponse;

import java.io.IOException;
import java.net.MalformedURLException;
Expand Down Expand Up @@ -244,7 +244,7 @@ public static boolean isAuthenticated(Context context, DavAccount account)

if (e.getErrorCode() == OwsWebDav.STATUS_PAYMENT_REQUIRED)
return true;
else if (e.getErrorCode() == DavServletResponse.SC_UNAUTHORIZED)
else if (e.getErrorCode() == WebDavConstants.SC_UNAUTHORIZED)
return false;
else
throw e;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@
import android.widget.TextView;
import android.widget.Toast;

import com.google.common.base.Optional;

import org.anhonesteffort.flock.util.guava.Optional;
import org.anhonesteffort.flock.crypto.KeyStore;
import org.anhonesteffort.flock.sync.addressbook.AddressbookSyncScheduler;
import org.anhonesteffort.flock.sync.addressbook.LocalAddressbookStore;
import org.anhonesteffort.flock.sync.addressbook.LocalContactCollection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
import org.anhonesteffort.flock.sync.OwsWebDav;
import org.anhonesteffort.flock.webdav.InvalidComponentException;
import org.anhonesteffort.flock.webdav.PropertyParseException;
import org.anhonesteffort.flock.webdav.WebDavConstants;
import org.apache.jackrabbit.webdav.DavException;
import org.apache.jackrabbit.webdav.DavServletResponse;

import java.io.IOException;
import java.net.SocketException;
Expand Down Expand Up @@ -110,7 +110,7 @@ else if (e instanceof RegistrationApiException)
else if (e instanceof DavException) {
DavException ex = (DavException) e;

if (ex.getErrorCode() == DavServletResponse.SC_UNAUTHORIZED)
if (ex.getErrorCode() == WebDavConstants.SC_UNAUTHORIZED)
bundle.putInt(KEY_STATUS_CODE, CODE_UNAUTHORIZED);
else if (ex.getErrorCode() == OwsWebDav.STATUS_PAYMENT_REQUIRED)
bundle.putInt(KEY_STATUS_CODE, CODE_SUBSCRIPTION_EXPIRED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
import android.os.Bundle;
import android.util.Log;

import com.google.common.base.Optional;

import org.anhonesteffort.flock.util.guava.Optional;
import org.anhonesteffort.flock.auth.AccountAuthenticator;
import org.anhonesteffort.flock.auth.DavAccount;
import org.anhonesteffort.flock.crypto.InvalidMacException;
import org.anhonesteffort.flock.crypto.KeyHelper;
import org.anhonesteffort.flock.crypto.KeyStore;
import org.anhonesteffort.flock.sync.OwsWebDav;
import org.anhonesteffort.flock.sync.key.DavKeyCollection;
import org.anhonesteffort.flock.sync.key.DavKeyStore;
import org.anhonesteffort.flock.sync.key.KeySyncScheduler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
import android.widget.Toast;

import com.chiralcode.colorpicker.ColorPicker;
import com.google.common.base.Optional;

import org.anhonesteffort.flock.util.guava.Optional;
import org.anhonesteffort.flock.sync.calendar.LocalCalendarStore;
import org.anhonesteffort.flock.sync.calendar.LocalEventCollection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import android.widget.ProgressBar;
import android.widget.TextView;

import com.google.common.base.Optional;
import org.anhonesteffort.flock.util.guava.Optional;
import org.anhonesteffort.flock.auth.DavAccount;
import org.anhonesteffort.flock.util.PasswordUtil;
import org.apache.commons.lang.StringUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import android.widget.TextView;
import android.widget.Toast;

import com.google.common.base.Optional;
import org.anhonesteffort.flock.util.guava.Optional;
import org.anhonesteffort.flock.auth.DavAccount;
import org.apache.commons.lang.StringUtils;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
import android.support.v4.app.NotificationCompat;
import android.util.Log;

import com.google.common.base.Optional;

import org.anhonesteffort.flock.util.guava.Optional;
import org.anhonesteffort.flock.auth.DavAccount;
import org.anhonesteffort.flock.crypto.InvalidMacException;
import org.anhonesteffort.flock.crypto.KeyHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@
import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

/**
* Programmer: rhodey
Expand All @@ -49,7 +52,9 @@ public View onCreateView(LayoutInflater inflater,
Bundle savedInstanceState)
{
View view = inflater.inflate(R.layout.fragment_intro, container, false);

initButtons();
initDescription(view);

return view;
}
Expand All @@ -64,4 +69,11 @@ public void onClick(View v) {

});
}

private void initDescription(View fragmentView) {
final TextView appDescription = (TextView) fragmentView.findViewById(R.id.flock_description);

appDescription.setText(Html.fromHtml(getString(R.string.flock_syncs_your_contacts_and_calendars_between_multiple_devices)));
appDescription.setMovementMethod(LinkMovementMethod.getInstance());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import android.widget.CompoundButton;
import android.widget.TextView;

import com.google.common.base.Optional;
import org.anhonesteffort.flock.util.guava.Optional;
import org.anhonesteffort.flock.sync.calendar.LocalEventCollection;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
import android.view.Window;

import com.android.vending.billing.IInAppBillingService;
import com.google.common.base.Optional;

import org.anhonesteffort.flock.util.guava.Optional;
import org.anhonesteffort.flock.auth.DavAccount;
import org.anhonesteffort.flock.registration.model.SubscriptionPlan;
import org.anhonesteffort.flock.sync.account.AccountStore;
Expand Down
Loading

0 comments on commit b25ab2e

Please sign in to comment.