diff --git a/app/build.gradle b/app/build.gradle
index 37280b47..0400ea89 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -2,11 +2,10 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
- buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
applicationId "com.instacart.library.truetime"
- minSdkVersion rootProject.ext.minSdkVersion
+ minSdkVersion 14
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
@@ -28,16 +27,17 @@ repositories {
}
}
+ext {
+ butterknifeVersion = '8.8.1'
+}
dependencies {
- compile project(path: ':library')
- compile project(path: ':library-extension-rx')
+ implementation project(path: ':library')
+ implementation project(path: ':library-extension-rx')
// compile 'com.github.instacart.truetime-android:library-extension-rx:master-SNAPSHOT'
- compile 'com.android.support:appcompat-v7:25.3.0'
- compile 'com.android.support.constraint:constraint-layout:1.0.2'
- compile 'com.jakewharton:butterknife:7.0.1'
- compile "io.reactivex.rxjava2:rxandroid:2.0.1"
-
- testCompile 'junit:junit:4.12'
-
+ implementation 'com.android.support:appcompat-v7:27.1.1'
+ implementation 'com.android.support.constraint:constraint-layout:1.1.3'
+ implementation "com.jakewharton:butterknife:$butterknifeVersion"
+ annotationProcessor "com.jakewharton:butterknife-compiler:$butterknifeVersion"
+ implementation "io.reactivex.rxjava2:rxandroid:2.0.2"
}
diff --git a/app/src/main/java/com/instacart/library/sample/Sample2Activity.java b/app/src/main/java/com/instacart/library/sample/Sample2Activity.java
index b0d6758f..f37abd93 100644
--- a/app/src/main/java/com/instacart/library/sample/Sample2Activity.java
+++ b/app/src/main/java/com/instacart/library/sample/Sample2Activity.java
@@ -15,17 +15,17 @@
import java.util.Locale;
import java.util.TimeZone;
-import butterknife.Bind;
+import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class Sample2Activity
extends AppCompatActivity {
- @Bind(R.id.tt_btn_refresh) Button refreshBtn;
- @Bind(R.id.tt_time_gmt) TextView timeGMT;
- @Bind(R.id.tt_time_pst) TextView timePST;
- @Bind(R.id.tt_time_device) TextView timeDeviceTime;
+ @BindView(R.id.tt_btn_refresh) Button refreshBtn;
+ @BindView(R.id.tt_time_gmt) TextView timeGMT;
+ @BindView(R.id.tt_time_pst) TextView timePST;
+ @BindView(R.id.tt_time_device) TextView timeDeviceTime;
@Override
protected void onCreate(Bundle savedInstanceState) {
diff --git a/app/src/main/java/com/instacart/library/sample/SampleActivity.java b/app/src/main/java/com/instacart/library/sample/SampleActivity.java
index e8912e47..81d59c39 100644
--- a/app/src/main/java/com/instacart/library/sample/SampleActivity.java
+++ b/app/src/main/java/com/instacart/library/sample/SampleActivity.java
@@ -14,17 +14,17 @@
import java.util.Locale;
import java.util.TimeZone;
-import butterknife.Bind;
+import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class SampleActivity
extends AppCompatActivity {
- @Bind(R.id.tt_btn_refresh) Button refreshBtn;
- @Bind(R.id.tt_time_gmt) TextView timeGMT;
- @Bind(R.id.tt_time_pst) TextView timePST;
- @Bind(R.id.tt_time_device) TextView timeDeviceTime;
+ @BindView(R.id.tt_btn_refresh) Button refreshBtn;
+ @BindView(R.id.tt_time_gmt) TextView timeGMT;
+ @BindView(R.id.tt_time_pst) TextView timePST;
+ @BindView(R.id.tt_time_device) TextView timeDeviceTime;
@Override
protected void onCreate(Bundle savedInstanceState) {
diff --git a/app/src/test/java/com/instacart/library/sample/ExampleUnitTest.java b/app/src/test/java/com/instacart/library/sample/ExampleUnitTest.java
deleted file mode 100644
index 3239d133..00000000
--- a/app/src/test/java/com/instacart/library/sample/ExampleUnitTest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.instacart.library.sample;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * @see Testing documentation
- */
-public class ExampleUnitTest {
- @Test
- public void addition_isCorrect() throws Exception {
- assertEquals(4, 2 + 2);
- }
-}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 8cfefa1c..df39367a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,22 +1,18 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
buildscript {
repositories {
+ google()
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.3.3'
- classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
+ classpath 'com.android.tools.build:gradle:3.1.3'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}
ext {
minSdkVersion = 9
- targetSdkVersion = 26
- compileSdkVersion = 26
- buildToolsVersion = '26.0.0'
+ targetSdkVersion = 27
+ compileSdkVersion = 27
versionCode = 10
versionName = '3.3'
@@ -24,6 +20,7 @@ ext {
allprojects {
repositories {
+ google()
jcenter()
}
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 72c29cd6..40593cb4 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Thu Apr 06 13:38:40 PDT 2017
+#Fri Jul 20 01:49:32 CDT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
diff --git a/library-extension-rx/build.gradle b/library-extension-rx/build.gradle
index 333b69ef..d86514c4 100644
--- a/library-extension-rx/build.gradle
+++ b/library-extension-rx/build.gradle
@@ -3,7 +3,6 @@ apply plugin: 'com.github.dcendents.android-maven'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
- buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
@@ -28,13 +27,8 @@ android {
}
dependencies {
- compile project(path: ':library')
- compile 'io.reactivex.rxjava2:rxjava:2.1.14'
-
- androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
- exclude group: 'com.android.support', module: 'support-annotations'
- })
- testCompile 'junit:junit:4.12'
+ api 'io.reactivex.rxjava2:rxjava:2.1.14'
+ api project(path: ':library')
}
group='com.github.instacart'
\ No newline at end of file
diff --git a/library-extension-rx/src/androidTest/java/com/instacart/library/truetime/extension/ExampleInstrumentedTest.java b/library-extension-rx/src/androidTest/java/com/instacart/library/truetime/extension/ExampleInstrumentedTest.java
deleted file mode 100644
index 1944c86c..00000000
--- a/library-extension-rx/src/androidTest/java/com/instacart/library/truetime/extension/ExampleInstrumentedTest.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.instacart.library.truetime.extension;
-
-import android.content.Context;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.junit.Assert.*;
-
-/**
- * Instrumentation test, which will execute on an Android device.
- *
- * @see Testing documentation
- */
-@RunWith(AndroidJUnit4.class)
-public class ExampleInstrumentedTest {
- @Test
- public void useAppContext() throws Exception {
- // Context of the app under test.
- Context appContext = InstrumentationRegistry.getTargetContext();
-
- assertEquals("com.instacart.library.truetime.extension.test", appContext.getPackageName());
- }
-}
diff --git a/library-extension-rx/src/test/java/com/instacart/library/truetime/extension/ExampleUnitTest.java b/library-extension-rx/src/test/java/com/instacart/library/truetime/extension/ExampleUnitTest.java
deleted file mode 100644
index 62d613aa..00000000
--- a/library-extension-rx/src/test/java/com/instacart/library/truetime/extension/ExampleUnitTest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.instacart.library.truetime.extension;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * @see Testing documentation
- */
-public class ExampleUnitTest {
- @Test
- public void addition_isCorrect() throws Exception {
- assertEquals(4, 2 + 2);
- }
-}
\ No newline at end of file
diff --git a/library/build.gradle b/library/build.gradle
index 66cc598e..044c9585 100644
--- a/library/build.gradle
+++ b/library/build.gradle
@@ -3,7 +3,6 @@ apply plugin: 'com.github.dcendents.android-maven'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
- buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
@@ -28,10 +27,7 @@ android {
}
dependencies {
- androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
- exclude group: 'com.android.support', module: 'support-annotations'
- })
- testCompile 'junit:junit:4.12'
+
}
group='com.github.instacart'
\ No newline at end of file
diff --git a/library/src/main/java/com/instacart/library/truetime/BootCompletedBroadcastReceiver.java b/library/src/main/java/com/instacart/library/truetime/BootCompletedBroadcastReceiver.java
index eeca00bc..dd645473 100644
--- a/library/src/main/java/com/instacart/library/truetime/BootCompletedBroadcastReceiver.java
+++ b/library/src/main/java/com/instacart/library/truetime/BootCompletedBroadcastReceiver.java
@@ -12,6 +12,8 @@ public class BootCompletedBroadcastReceiver
@Override
public void onReceive(Context context, Intent intent) {
TrueLog.i(TAG, "---- clearing TrueTime disk cache as we've detected a boot");
- TrueTime.clearCachedInfo();
+ if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
+ TrueTime.clearCachedInfo();
+ }
}
}