diff --git a/.gitignore b/.gitignore
index eb1a0a5..ccb302c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,7 @@ captures/
# IntelliJ project files
*.iml
.idea/
+.cxx/
# Misc
.DS_Store
diff --git a/app/build.gradle b/app/build.gradle
index a812235..e86deb3 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -10,6 +10,8 @@ android {
targetSdkVersion targetSdkVer
versionCode 7
versionName "0.7"
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
//check if the keystore details are defined in gradle.properties (this is so the key is not in github)
@@ -43,8 +45,11 @@ android {
dependencies {
implementation project(':rootbeerlib')
- implementation "com.android.support:appcompat-v7:$supportLibVer"
- implementation "com.android.support:design:$supportLibVer"
+ implementation 'androidx.appcompat:appcompat:1.1.0'
+ implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
+ implementation 'com.google.android.material:material:1.2.0-alpha01'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'uk.co.barbuzz:beerprogressview:0.0.4'
+ androidTestImplementation 'androidx.test:runner:1.2.0'
+ androidTestImplementation 'androidx.test.ext:junit:1.1.1'
}
diff --git a/app/src/androidTest/java/com/scottyab/rootbeer/ApplicationTest.java b/app/src/androidTest/java/com/scottyab/rootbeer/ApplicationTest.java
index f24bf06..62a5297 100644
--- a/app/src/androidTest/java/com/scottyab/rootbeer/ApplicationTest.java
+++ b/app/src/androidTest/java/com/scottyab/rootbeer/ApplicationTest.java
@@ -1,13 +1,17 @@
package com.scottyab.rootbeer;
-import android.app.Application;
-import android.test.ApplicationTestCase;
-
-/**
- * Testing Fundamentals
- */
-public class ApplicationTest extends ApplicationTestCase {
- public ApplicationTest() {
- super(Application.class);
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+
+@RunWith(AndroidJUnit4.class)
+public class ApplicationTest {
+
+ @Test
+ public void someTest() {
+ Assert.assertTrue(true);
}
+
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 116631a..b1add09 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -1,11 +1,13 @@
+ android:theme="@style/AppTheme.NoActionBar"
+ tools:ignore="AllowBackup,GoogleAppIndexingWarning">
();
checkRootImageViewList.add(rootCheck1ImageView);
checkRootImageViewList.add(rootCheck2ImageView);
@@ -74,7 +75,7 @@ private void initView() {
checkRootImageViewList.add(rootCheck10ImageView);
checkRootImageViewList.add(rootCheck11ImageView);
- floatingActionButton = (FloatingActionButton) findViewById(R.id.fab);
+ floatingActionButton = findViewById(R.id.fab);
floatingActionButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@@ -117,9 +118,8 @@ public boolean onOptionsItemSelected(MenuItem item) {
}
private void showInfoDialog() {
- if (infoDialog != null && infoDialog.isShowing()) {
- //do nothing if already showing
- } else {
+ //do nothing if already showing
+ if (infoDialog == null || !infoDialog.isShowing()) {
infoDialog = new AlertDialog.Builder(this)
.setTitle(R.string.app_name)
.setMessage(R.string.info_details)
diff --git a/app/src/main/java/com/scottyab/rootbeer/sample/TextViewFont.java b/app/src/main/java/com/scottyab/rootbeer/sample/TextViewFont.java
index 4712f1c..658485f 100755
--- a/app/src/main/java/com/scottyab/rootbeer/sample/TextViewFont.java
+++ b/app/src/main/java/com/scottyab/rootbeer/sample/TextViewFont.java
@@ -3,10 +3,11 @@
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Typeface;
-import android.support.v7.widget.AppCompatTextView;
import android.util.AttributeSet;
import android.util.Log;
+import androidx.appcompat.widget.AppCompatTextView;
+
/**
* Created by 1andbarb on 22/04/2016.
*/
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index d95c1ff..74c4ad7 100755
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -1,35 +1,36 @@
-
+ android:fitsSystemWindows="true"
+ tools:context=".MainActivity">
-
+ android:theme="@style/AppTheme.NoActionBar.AppBarOverlay">
-
+ app:popupTheme="@style/AppTheme.NoActionBar.PopupOverlay"/>
-
+
-
+ app:srcCompat="@drawable/ic_lock_open_white_24dp"/>
-
+
\ No newline at end of file
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 577a2ec..491dc96 100755
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -18,4 +18,15 @@
+
+
+
+
+
+
diff --git a/build.gradle b/build.gradle
index 8c65bd7..61842a0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,13 +3,10 @@
buildscript {
repositories {
jcenter()
- maven {
- url 'https://maven.google.com/'
- name 'Google'
- }
+ google()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.1.3'
+ classpath 'com.android.tools.build:gradle:3.5.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -26,17 +23,17 @@ allprojects {
repositories {
jcenter()
- maven {
- url 'https://maven.google.com/'
- name 'Google'
- }
+ google()
}
}
subprojects {
- ext.compileSdkVer = 27
- ext.buildToolsVer = "27.0.3"
+ ext.compileSdkVer = 29
+ ext.buildToolsVer = "29.0.2"
ext.minSdkVer = 15
- ext.targetSdkVer = 27
- ext.supportLibVer = "27.1.1"
+ ext.targetSdkVer = 29
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
}
diff --git a/gradle.properties b/gradle.properties
index bdc3e73..dab3d7a 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -16,6 +16,14 @@ org.gradle.jvmargs=-Xmx1536m
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
+# AndroidX package structure to make it clearer which packages are bundled with the
+# Android operating system, and which are packaged with your app's APK
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
+android.useAndroidX=true
+
+# Automatically convert third-party libraries to use AndroidX
+android.enableJetifier=true
+
VERSION_NAME=0.0.7
VERSION_CODE=7
GROUP=com.scottyab
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 575d784..f6b961f 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 35df355..5087762 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Fri May 11 11:54:48 BST 2018
+#Fri Nov 15 10:32:08 CST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
diff --git a/rootbeerlib/build.gradle b/rootbeerlib/build.gradle
index 1e15bd8..fc11069 100644
--- a/rootbeerlib/build.gradle
+++ b/rootbeerlib/build.gradle
@@ -9,6 +9,8 @@ android {
targetSdkVersion targetSdkVer
versionCode 1
versionName "1.0"
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
@@ -49,7 +51,9 @@ android {
dependencies {
testImplementation 'junit:junit:4.12'
- testImplementation 'org.mockito:mockito-core:2.10.0'
+ testImplementation 'org.mockito:mockito-core:3.1.0'
+ androidTestImplementation 'androidx.test:runner:1.2.0'
+ androidTestImplementation 'androidx.test.ext:junit:1.1.1'
}
apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
diff --git a/rootbeerlib/src/androidTest/java/com/scottyab/rootbeer/ApplicationTest.java b/rootbeerlib/src/androidTest/java/com/scottyab/rootbeer/ApplicationTest.java
index f24bf06..62a5297 100644
--- a/rootbeerlib/src/androidTest/java/com/scottyab/rootbeer/ApplicationTest.java
+++ b/rootbeerlib/src/androidTest/java/com/scottyab/rootbeer/ApplicationTest.java
@@ -1,13 +1,17 @@
package com.scottyab.rootbeer;
-import android.app.Application;
-import android.test.ApplicationTestCase;
-
-/**
- * Testing Fundamentals
- */
-public class ApplicationTest extends ApplicationTestCase {
- public ApplicationTest() {
- super(Application.class);
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+
+@RunWith(AndroidJUnit4.class)
+public class ApplicationTest {
+
+ @Test
+ public void someTest() {
+ Assert.assertTrue(true);
}
+
}
diff --git a/rootbeerlib/src/test/java/com/scottyab/rootbeer/RootBeerTest.java b/rootbeerlib/src/test/java/com/scottyab/rootbeer/RootBeerTest.java
index 64c1b2d..5dd5367 100644
--- a/rootbeerlib/src/test/java/com/scottyab/rootbeer/RootBeerTest.java
+++ b/rootbeerlib/src/test/java/com/scottyab/rootbeer/RootBeerTest.java
@@ -8,7 +8,7 @@
import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;
-import static junit.framework.Assert.assertFalse;
+import static junit.framework.TestCase.assertFalse;
import static junit.framework.TestCase.assertTrue;
import static org.mockito.AdditionalMatchers.not;
import static org.mockito.ArgumentMatchers.eq;
@@ -40,7 +40,7 @@ public void testIsRooted() {
when(rootBeer.checkForRootNative()).thenReturn(false);
// Test we return false when all methods return false
- assertTrue(!rootBeer.isRooted());
+ assertFalse(rootBeer.isRooted());
when(rootBeer.checkForRootNative()).thenReturn(true);
@@ -70,7 +70,7 @@ public void testIsRootedWithoutBusyBoxCheck() {
assertTrue(rootBeer.isRooted());
// Test it doesn't matter what checkForBinary("busybox") returns
- assertTrue(!rootBeer.isRootedWithoutBusyBoxCheck());
+ assertFalse(rootBeer.isRootedWithoutBusyBoxCheck());
}