From 5dbb615d655723749da3379b4adeec7c0a6a8e4b Mon Sep 17 00:00:00 2001 From: Ashley Hughes Date: Wed, 16 Aug 2017 19:37:08 +0100 Subject: [PATCH 1/6] use jcenter openpgp-api --- pom.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pom.xml b/pom.xml index 5249ec8fc..571d52474 100644 --- a/pom.xml +++ b/pom.xml @@ -45,6 +45,13 @@ 0.0.1.75bb293 + + org.sufficientlysecure + openpgp-api + aar + 8.0 + + com.github.jberkel.pay.me library @@ -229,6 +236,17 @@ + + bintray-openpgp + https://dl.bintray.com/sufficientlysecure/maven/ + + true + + + false + + + android-local file:///${env.ANDROID_HOME}/extras/android/m2repository From e5091c1e7b5b1d95a904e0c4ee6c9cbeffaa1f6f Mon Sep 17 00:00:00 2001 From: Ashley Hughes Date: Wed, 16 Aug 2017 20:56:52 +0100 Subject: [PATCH 2/6] Allow encrypting SMS messages --- res/values/strings.xml | 8 +++ res/xml/preferences.xml | 14 +++++ .../smssync/activity/MainActivity.java | 52 +++++++++++++++++++ .../smssync/mail/MessageConverter.java | 8 ++- .../smssync/mail/MessageGenerator.java | 43 +++++++++++++-- .../smssync/preferences/Preferences.java | 25 +++++++++ .../zegoggles/smssync/service/BackupTask.java | 24 +++++++-- .../smssync/service/SmsRestoreService.java | 3 +- .../smssync/mail/MessageConverterTest.java | 8 +-- .../smssync/mail/MessageGeneratorTest.java | 6 ++- .../smssync/service/BackupTaskTest.java | 4 +- 11 files changed, 179 insertions(+), 16 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 14e7f4642..5211ded1c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -330,6 +330,14 @@ Select a Google account + + Encryption + Encrypt backed up messages. + Select OpenPGP Provider + No provider selected. + PGP provider:\u0020 + Your chosen PGP provider does not appear to be installed. + Donate Using secure Google Play Store in-app payment. diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index c934ff3ef..0e40f7e6d 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -220,6 +220,20 @@ + + + + + = MIN_VERSION_BACKUP); + updateEncryption(null); + checkAndDisplayDroidWarning(); preferences.migrateMarkAsRead(); @@ -157,6 +167,35 @@ public void onCreate(Bundle bundle) { App.bus.register(this); } + private void updateEncryption(String new_prov) { + boolean enableOtherOptions; + pgp_prov = (OpenPgpAppPreference)findPreference(ENCRYPTION_PROVIDER.key); + pgp_keys = (OpenPgpKeyPreference)findPreference(ENCRYPTION_KEYS.key); + + if (new_prov == null) { //we aren't given a new value, load the old one + new_prov = pgp_prov.getValue(); + } + + if(!new_prov.isEmpty()) { + String prov_simplename = pgp_prov.getEntryByValue(new_prov); + if (prov_simplename == null) { + pgp_prov.setSummary(getString(R.string.ui_encryption_missingprov)); + enableOtherOptions = false; + } else { + pgp_prov.setSummary(getString(R.string.ui_encryption_prov) + prov_simplename); + pgp_keys.setOpenPgpProvider(new_prov); + enableOtherOptions = true; + } + } else { + pgp_prov.setSummary(getString(R.string.ui_encryption_noprov)); + enableOtherOptions = false; + } + + //find other options and set enabled to enableOtherOptions + pgp_keys.setEnabled(enableOtherOptions); + return; + } + @Override protected void onResume() { Log.d(TAG, "onResume()"); @@ -224,6 +263,11 @@ public boolean onOptionsItemSelected(MenuItem item) { Log.d(TAG, "onActivityResult(" + requestCode + "," + resultCode + "," + data + ")"); if (resultCode == RESULT_CANCELED) return; + if (pgp_keys.handleOnActivityResult(requestCode, resultCode, data)) { + // handled by OpenPgpKeyPreference + return; + } + switch (requestCode) { case REQUEST_CHANGE_DEFAULT_SMS_PACKAGE: { preferences.setSeenSmsDefaultPackageChangeDialog(); @@ -838,6 +882,14 @@ public boolean onPreferenceChange(Preference preference, Object newValue) { } }); + findPreference(ENCRYPTION_PROVIDER.key) + .setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { + public boolean onPreferenceChange(Preference preference, Object newValue) { + updateEncryption(newValue.toString()); + return true; + } + }); + updateConnected().setOnPreferenceChangeListener(new OnPreferenceChangeListener() { public boolean onPreferenceChange(Preference preference, Object change) { boolean newValue = (Boolean) change; diff --git a/src/main/java/com/zegoggles/smssync/mail/MessageConverter.java b/src/main/java/com/zegoggles/smssync/mail/MessageConverter.java index 97d644a54..3cd51c8c3 100644 --- a/src/main/java/com/zegoggles/smssync/mail/MessageConverter.java +++ b/src/main/java/com/zegoggles/smssync/mail/MessageConverter.java @@ -50,6 +50,8 @@ import static com.zegoggles.smssync.App.LOCAL_LOGV; import static com.zegoggles.smssync.App.TAG; +import org.openintents.openpgp.util.OpenPgpServiceConnection; + public class MessageConverter { //ContactsContract.CommonDataKinds.Email.CONTENT_URI public static final Uri ECLAIR_CONTENT_URI = @@ -66,7 +68,8 @@ public class MessageConverter { public MessageConverter(Context context, Preferences preferences, String userEmail, PersonLookup personLookup, - ContactAccessor contactAccessor) { + ContactAccessor contactAccessor, + OpenPgpServiceConnection serviceConnection) { mContext = context; mMarkAsReadType = preferences.getMarkAsReadType(); mPersonLookup = personLookup; @@ -89,7 +92,8 @@ public MessageConverter(Context context, Preferences preferences, mPersonLookup, preferences.getMailSubjectPrefix(), allowedIds, - new MmsSupport(mContext.getContentResolver(), mPersonLookup)); + new MmsSupport(mContext.getContentResolver(), mPersonLookup), + serviceConnection); } private boolean markAsSeen(DataType dataType, Map msgMap) { diff --git a/src/main/java/com/zegoggles/smssync/mail/MessageGenerator.java b/src/main/java/com/zegoggles/smssync/mail/MessageGenerator.java index 6ae70e8db..a167a7cab 100644 --- a/src/main/java/com/zegoggles/smssync/mail/MessageGenerator.java +++ b/src/main/java/com/zegoggles/smssync/mail/MessageGenerator.java @@ -1,6 +1,7 @@ package com.zegoggles.smssync.mail; import android.content.Context; +import android.content.Intent; import android.net.Uri; import android.provider.CallLog; import android.provider.Telephony; @@ -21,6 +22,10 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; import java.util.Date; import java.util.Locale; import java.util.Map; @@ -30,6 +35,9 @@ import static com.zegoggles.smssync.App.TAG; import static com.zegoggles.smssync.Consts.MMS_PART; +import org.openintents.openpgp.util.OpenPgpApi; +import org.openintents.openpgp.util.OpenPgpServiceConnection; + class MessageGenerator { private static final String ERROR_PARSING_DATE = "error parsing date"; private final Context mContext; @@ -42,6 +50,8 @@ class MessageGenerator { private final AddressStyle mAddressStyle; private final MmsSupport mMmsSupport; private final CallLogTypes mCallLogTypes; + private final OpenPgpServiceConnection mServiceConnection; + private final Preferences preferences; public MessageGenerator(Context context, Address userAddress, @@ -50,7 +60,8 @@ public MessageGenerator(Context context, PersonLookup personLookup, boolean mailSubjectPrefix, @Nullable ContactGroupIds contactsToBackup, - MmsSupport mmsSupport) { + MmsSupport mmsSupport, + OpenPgpServiceConnection serviceConnection) { mHeaderGenerator = headerGenerator; mUserAddress = userAddress; mAddressStyle = addressStyle; @@ -60,7 +71,9 @@ public MessageGenerator(Context context, mContactsToBackup = contactsToBackup; mCallFormatter = new CallFormatter(mContext.getResources()); mMmsSupport = mmsSupport; - mCallLogTypes = CallLogTypes.getCallLogType(new Preferences(context)); + preferences = new Preferences(context); + mCallLogTypes = CallLogTypes.getCallLogType(preferences); + mServiceConnection = serviceConnection; } public @Nullable Message messageForDataType(Map msgMap, DataType dataType) throws MessagingException { @@ -81,7 +94,31 @@ public MessageGenerator(Context context, final Message msg = new MimeMessage(); msg.setSubject(getSubject(DataType.SMS, record)); - setBody(msg, new TextBody(msgMap.get(Telephony.TextBasedSmsColumns.BODY))); + + String msgTxt = msgMap.get(Telephony.TextBasedSmsColumns.BODY); + + if (mServiceConnection != null) { + Intent data = new Intent(); + ByteArrayOutputStream os; + InputStream is; + data.setAction(OpenPgpApi.ACTION_ENCRYPT); + data.putExtra(OpenPgpApi.EXTRA_KEY_IDS, preferences.getEncryptionKeyID()); + data.putExtra(OpenPgpApi.EXTRA_REQUEST_ASCII_ARMOR, true); + try { + is = new ByteArrayInputStream(msgTxt.getBytes("UTF-8")); + os = new ByteArrayOutputStream(); + OpenPgpApi api = new OpenPgpApi(mContext, mServiceConnection.getService()); + Intent result = api.executeApi(data, is, os); + switch (result.getIntExtra(OpenPgpApi.RESULT_CODE, OpenPgpApi.RESULT_CODE_ERROR)) { + case OpenPgpApi.RESULT_CODE_SUCCESS: { + msgTxt = os.toString("UTF-8"); + break; + } + } + } catch (UnsupportedEncodingException e) {} + } + + setBody(msg, new TextBody(msgTxt)); final int messageType = toInt(msgMap.get(Telephony.TextBasedSmsColumns.TYPE)); if (Telephony.TextBasedSmsColumns.MESSAGE_TYPE_INBOX == messageType) { diff --git a/src/main/java/com/zegoggles/smssync/preferences/Preferences.java b/src/main/java/com/zegoggles/smssync/preferences/Preferences.java index 323487cff..fbcfd2bca 100644 --- a/src/main/java/com/zegoggles/smssync/preferences/Preferences.java +++ b/src/main/java/com/zegoggles/smssync/preferences/Preferences.java @@ -23,6 +23,7 @@ import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.preference.PreferenceManager; +import android.text.TextUtils; import android.util.Log; import com.zegoggles.smssync.contacts.ContactGroup; import com.zegoggles.smssync.mail.DataType; @@ -37,6 +38,8 @@ import static com.zegoggles.smssync.preferences.Preferences.Keys.CALLLOG_SYNC_CALENDAR_ENABLED; import static com.zegoggles.smssync.preferences.Preferences.Keys.CONFIRM_ACTION; import static com.zegoggles.smssync.preferences.Preferences.Keys.ENABLE_AUTO_BACKUP; +import static com.zegoggles.smssync.preferences.Preferences.Keys.ENCRYPTION_PROVIDER; +import static com.zegoggles.smssync.preferences.Preferences.Keys.ENCRYPTION_KEYS; import static com.zegoggles.smssync.preferences.Preferences.Keys.FIRST_USE; import static com.zegoggles.smssync.preferences.Preferences.Keys.INCOMING_TIMEOUT_SECONDS; import static com.zegoggles.smssync.preferences.Preferences.Keys.LAST_VERSION_CODE; @@ -78,6 +81,8 @@ public enum Keys { WIFI_ONLY("wifi_only"), REFERENCE_UID("reference_uid"), MAIL_SUBJECT_PREFIX("mail_subject_prefix"), + ENCRYPTION_PROVIDER("openpgp_provider_list"), + ENCRYPTION_KEYS("pgp_keys"), RESTORE_STARRED_ONLY("restore_starred_only"), @Deprecated MARK_AS_READ("mark_as_read"), @@ -214,6 +219,26 @@ public boolean isFirstBackup() { return true; } + public String getEncryptionProvider() { + return preferences.getString(ENCRYPTION_PROVIDER.key, ""); + } + + public long[] getEncryptionKeyID() { + long[] retval = new long[1]; + retval[0] = preferences.getLong(ENCRYPTION_KEYS.key, 0); + return retval; + } + + public boolean isEncryptionAvailable() { + if (TextUtils.isEmpty(getEncryptionProvider())) + return false; + + if (getEncryptionKeyID()[0] == 0) + return false; + + return true; + } + public boolean isFirstUse() { if (isFirstBackup() && !preferences.contains(FIRST_USE.key)) { preferences.edit().putBoolean(FIRST_USE.key, false).commit(); diff --git a/src/main/java/com/zegoggles/smssync/service/BackupTask.java b/src/main/java/com/zegoggles/smssync/service/BackupTask.java index 00096340e..9bf27b07a 100644 --- a/src/main/java/com/zegoggles/smssync/service/BackupTask.java +++ b/src/main/java/com/zegoggles/smssync/service/BackupTask.java @@ -44,6 +44,8 @@ import static com.zegoggles.smssync.service.state.SmsSyncState.FINISHED_BACKUP; import static com.zegoggles.smssync.service.state.SmsSyncState.LOGIN; +import org.openintents.openpgp.util.OpenPgpServiceConnection; + class BackupTask extends AsyncTask { private final SmsBackupService service; private final BackupItemsFetcher fetcher; @@ -53,7 +55,7 @@ class BackupTask extends AsyncTask { private final Preferences preferences; private final ContactAccessor contactAccessor; private final TokenRefresher tokenRefresher; - + private final OpenPgpServiceConnection mServiceConnection; BackupTask(@NotNull SmsBackupService service) { final Context context = service.getApplicationContext(); @@ -67,7 +69,15 @@ class BackupTask extends AsyncTask { PersonLookup personLookup = new PersonLookup(service.getContentResolver()); - this.converter = new MessageConverter(context, preferences, authPreferences.getUserEmail(), personLookup, ContactAccessor.Get.instance()); + // bind to pgp service + if (preferences.isEncryptionAvailable()) { + this.mServiceConnection = new OpenPgpServiceConnection(context, preferences.getEncryptionProvider()); + this.mServiceConnection.bindToService(); + } else { + this.mServiceConnection = null; + } + + this.converter = new MessageConverter(context, preferences, authPreferences.getUserEmail(), personLookup, ContactAccessor.Get.instance(), this.mServiceConnection); this.contactAccessor = ContactAccessor.Get.instance(); if (preferences.isCallLogCalendarSyncEnabled()) { @@ -91,7 +101,8 @@ class BackupTask extends AsyncTask { AuthPreferences authPreferences, Preferences preferences, ContactAccessor accessor, - TokenRefresher refresher) { + TokenRefresher refresher, + OpenPgpServiceConnection serviceConnection) { this.service = service; this.fetcher = fetcher; this.converter = messageConverter; @@ -100,6 +111,7 @@ class BackupTask extends AsyncTask { this.preferences = preferences; this.contactAccessor = accessor; this.tokenRefresher = refresher; + this.mServiceConnection = serviceConnection; } @Override @@ -224,6 +236,9 @@ protected void onProgressUpdate(BackupState... progress) { @Override protected void onPostExecute(BackupState result) { + if (this.mServiceConnection != null) { + this.mServiceConnection.unbindFromService(); + } if (result != null) { post(result); } @@ -232,6 +247,9 @@ protected void onPostExecute(BackupState result) { @Override protected void onCancelled() { + if (this.mServiceConnection != null) { + this.mServiceConnection.unbindFromService(); + } post(transition(CANCELED_BACKUP, null)); App.bus.unregister(this); } diff --git a/src/main/java/com/zegoggles/smssync/service/SmsRestoreService.java b/src/main/java/com/zegoggles/smssync/service/SmsRestoreService.java index 66cbbbd7a..bccfdb77b 100644 --- a/src/main/java/com/zegoggles/smssync/service/SmsRestoreService.java +++ b/src/main/java/com/zegoggles/smssync/service/SmsRestoreService.java @@ -85,7 +85,8 @@ protected void handleIntent(final Intent intent) { getPreferences(), getAuthPreferences().getUserEmail(), new PersonLookup(getContentResolver()), - ContactAccessor.Get.instance() + ContactAccessor.Get.instance(), + null ); RestoreConfig config = new RestoreConfig( diff --git a/src/test/java/com/zegoggles/smssync/mail/MessageConverterTest.java b/src/test/java/com/zegoggles/smssync/mail/MessageConverterTest.java index 33a116e29..9361710a0 100644 --- a/src/test/java/com/zegoggles/smssync/mail/MessageConverterTest.java +++ b/src/test/java/com/zegoggles/smssync/mail/MessageConverterTest.java @@ -41,7 +41,7 @@ public void setUp() throws Exception { initMocks(this); BinaryTempFileBody.setTempDirectory(Robolectric.application.getCacheDir()); messageConverter = new MessageConverter(Robolectric.application, - preferences, "foo@example.com", personLookup, contactAccessor); + preferences, "foo@example.com", personLookup, contactAccessor, null); } @Test(expected = MessagingException.class) @@ -116,7 +116,7 @@ public void testMessageToContentValuesWithUnknownMessageTypeGetParsedAsSMS() thr when(preferences.getMarkAsReadType()).thenReturn(MarkAsReadTypes.MESSAGE_STATUS); messageConverter = new MessageConverter(Robolectric.application, - preferences, "foo@example.com", personLookup, contactAccessor); + preferences, "foo@example.com", personLookup, contactAccessor, null); ConversionResult res = messageConverter.convertMessages(cursor, DataType.SMS); assertThat(res.getMessages().get(0).isSet(Flag.SEEN)).isFalse(); @@ -138,7 +138,7 @@ public void testMessageToContentValuesWithUnknownMessageTypeGetParsedAsSMS() thr when(preferences.getMarkAsReadType()).thenReturn(MarkAsReadTypes.UNREAD); messageConverter = new MessageConverter(Robolectric.application, - preferences, "foo@example.com", personLookup, contactAccessor); + preferences, "foo@example.com", personLookup, contactAccessor, null); ConversionResult res = messageConverter.convertMessages(cursor, DataType.SMS); assertThat(res.getMessages().get(0).isSet(Flag.SEEN)).isFalse(); @@ -160,7 +160,7 @@ public void testMessageToContentValuesWithUnknownMessageTypeGetParsedAsSMS() thr when(preferences.getMarkAsReadType()).thenReturn(MarkAsReadTypes.READ); messageConverter = new MessageConverter(Robolectric.application, - preferences, "foo@example.com", personLookup, contactAccessor); + preferences, "foo@example.com", personLookup, contactAccessor, null); ConversionResult res = messageConverter.convertMessages(cursor, DataType.SMS); assertThat(res.getMessages().get(0).isSet(Flag.SEEN)).isTrue(); diff --git a/src/test/java/com/zegoggles/smssync/mail/MessageGeneratorTest.java b/src/test/java/com/zegoggles/smssync/mail/MessageGeneratorTest.java index 1fd516133..a4dd2e8bf 100644 --- a/src/test/java/com/zegoggles/smssync/mail/MessageGeneratorTest.java +++ b/src/test/java/com/zegoggles/smssync/mail/MessageGeneratorTest.java @@ -48,7 +48,8 @@ public class MessageGeneratorTest { personLookup, false, null, - mmsSupport + mmsSupport, + null ); } @@ -216,7 +217,8 @@ public class MessageGeneratorTest { personLookup, false, groupIds, - mmsSupport + mmsSupport, + null ); PersonRecord record = new PersonRecord(1, "Test Testor", "test@test.com", "1234"); Map map = mockMessage("1234", record); diff --git a/src/test/java/com/zegoggles/smssync/service/BackupTaskTest.java b/src/test/java/com/zegoggles/smssync/service/BackupTaskTest.java index d150e29a5..1382870e6 100644 --- a/src/test/java/com/zegoggles/smssync/service/BackupTaskTest.java +++ b/src/test/java/com/zegoggles/smssync/service/BackupTaskTest.java @@ -28,6 +28,7 @@ import org.mockito.stubbing.Answer; import org.robolectric.Robolectric; import org.robolectric.RobolectricTestRunner; +import org.openintents.openpgp.util.OpenPgpServiceConnection; import java.util.EnumSet; import java.util.HashMap; @@ -67,6 +68,7 @@ public class BackupTaskTest { @Mock Preferences preferences; @Mock ContactAccessor accessor; @Mock TokenRefresher tokenRefresher; + @Mock OpenPgpServiceConnection serviceConnection; @Before public void before() { initMocks(this); @@ -74,7 +76,7 @@ public class BackupTaskTest { when(service.getApplicationContext()).thenReturn(Robolectric.application); when(service.getState()).thenReturn(state); - task = new BackupTask(service, fetcher, converter, syncer, authPreferences, preferences, accessor, tokenRefresher); + task = new BackupTask(service, fetcher, converter, syncer, authPreferences, preferences, accessor, tokenRefresher, serviceConnection); context = Robolectric.application; } From 57d913c1e9bc3cbb4c37c6637a9406725d9aff76 Mon Sep 17 00:00:00 2001 From: Ashley Hughes Date: Mon, 11 Sep 2017 22:48:03 +0100 Subject: [PATCH 3/6] Upgrade pgp api in pom, add it to gradle. --- app/build.gradle | 1 + pom.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index c7ff183c2..7d7358b90 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -69,6 +69,7 @@ dependencies { compile 'com.intellij:annotations:12.0' compile 'com.fsck.k9.mail:lib:0.0.1.75bb293' compile 'com.android.billingclient:billing:dp-1' + compile 'org.sufficientlysecure:openpgp-api:12.0' testCompile 'junit:junit:4.12' testCompile 'org.robolectric:robolectric:3.4.2' diff --git a/pom.xml b/pom.xml index 41f68a568..2cad06862 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ org.sufficientlysecure openpgp-api aar - 8.0 + 12.0 From 795a5ec3dea5e193ac4611d1871e1961b16a175d Mon Sep 17 00:00:00 2001 From: Ashley Hughes Date: Mon, 11 Sep 2017 23:55:49 +0100 Subject: [PATCH 4/6] Move string to strigs xml --- app/src/main/res/values/strings.xml | 1 + app/src/main/res/xml/preferences.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8b8626d29..db3441a48 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -337,6 +337,7 @@ No provider selected. PGP provider:\u0020 Your chosen PGP provider does not appear to be installed. + Select Keys Donate diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 0e40f7e6d..5bd9cda34 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -231,7 +231,7 @@ android:defaultValue=""/> + android:title="@string/ui_encryption_selkeys"/> Date: Tue, 12 Sep 2017 21:30:14 +0100 Subject: [PATCH 5/6] Tell roboelectric where to find openpgp library in maven build. --- app/src/test/resources/robolectric.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/test/resources/robolectric.properties b/app/src/test/resources/robolectric.properties index 9daf69250..17a6482e2 100644 --- a/app/src/test/resources/robolectric.properties +++ b/app/src/test/resources/robolectric.properties @@ -1 +1,2 @@ manifest=src/main/AndroidManifest.xml +libraries=../../../target/unpacked-libs/os_openpgp-api_12.0 From 5e467e111c53d6ce5e62a8bbf1bd635aa9c62d39 Mon Sep 17 00:00:00 2001 From: Ashley Hughes Date: Sat, 16 Sep 2017 23:02:40 +0100 Subject: [PATCH 6/6] Clean between builds, so roboelectric doesn't pick up on library unpacked by maven when run from gradle. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 86f494c94..7a0f96cd7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,5 @@ jdk: oraclejdk8 script: - mvn -q android:lint - mvn -q test + - mvn -q clean - ./gradlew build