From e2a6443f30a8a587a609581a5d2d4e3d176c4469 Mon Sep 17 00:00:00 2001 From: Morgan Lee Date: Sat, 24 Feb 2018 20:51:00 +0800 Subject: [PATCH 1/5] Gradle updates --- .idea/caches/build_file_checksums.ser | Bin 0 -> 539 bytes .idea/codeStyles/Project.xml | 29 +++++++++++++++++ .idea/compiler.xml | 22 ------------- .idea/copyright/profiles_settings.xml | 3 -- .idea/misc.xml | 38 +++-------------------- .idea/modules.xml | 1 - .idea/{encodings.xml => vcs.xml} | 4 +-- app/build.gradle | 2 +- build.gradle | 3 +- gradle/wrapper/gradle-wrapper.properties | 4 +-- 10 files changed, 41 insertions(+), 65 deletions(-) create mode 100644 .idea/caches/build_file_checksums.ser create mode 100644 .idea/codeStyles/Project.xml delete mode 100644 .idea/compiler.xml delete mode 100644 .idea/copyright/profiles_settings.xml rename .idea/{encodings.xml => vcs.xml} (51%) diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser new file mode 100644 index 0000000000000000000000000000000000000000..aa81bc26a6663a3e72e19295821ef675a7ea900d GIT binary patch literal 539 zcmZ4UmVvdnh`~NNKUXg?FQq6yGexf?KR>5fFEb@IQ7^qHF(oHeub?PDD>b=9F91S2 zm1gFoxMk*~I%lLNXBU^|7Q2L-Ts|(GuF1r}l-a(W(##Th_( zR`y#54~r#SWM*J;W8likPfT%3OfJbU@?_vF$tX%K&dAS6sVJ~_U;qK0at2z_zyOYkOxc*3?Qo+1oE%X-4b0J!o@P{#{ZaIoq9kg z7N?e!Wagz8!!#B$)G@Gu)Xuw^u+Qc`d!BBBo>aKg;e{m(TFzE6p~b01#W9IFiMjcP z7BNswF^I4%NG&SKOf4>j8*@dr=Vm{{CYF~CoHO41aH=a|;6ZUHTw$By7UjIJa|6tC z*jYYgB;5r1DkncVF$WYw7^Z5t^=B$Bj9lwk+4uF~iESrJ7zFXSVV}UC110_$wccAZ LItv>Y1yuk5?&ZCO literal 0 HcmV?d00001 diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..30aa626 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index 96cc43e..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml deleted file mode 100644 index e7bedf3..0000000 --- a/.idea/copyright/profiles_settings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 7158618..99202cc 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,18 +1,16 @@ - - - @@ -27,36 +25,10 @@ - - - - - - - - - - - + - - - - - 1.8 - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index 72bf01a..ab5e932 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,6 @@ - diff --git a/.idea/encodings.xml b/.idea/vcs.xml similarity index 51% rename from .idea/encodings.xml rename to .idea/vcs.xml index 97626ba..35eb1dd 100644 --- a/.idea/encodings.xml +++ b/.idea/vcs.xml @@ -1,6 +1,6 @@ - - + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 13e3021..87f8db8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 25 - buildToolsVersion "26.0.0" + buildToolsVersion '27.0.3' defaultConfig { applicationId "org.frap129.spectrum" minSdkVersion 21 diff --git a/build.gradle b/build.gradle index c2eea8e..6cd0537 100644 --- a/build.gradle +++ b/build.gradle @@ -3,9 +3,10 @@ buildscript { repositories { jcenter() + google() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.3' + classpath 'com.android.tools.build:gradle:3.2.0-alpha04' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2f5298a..346de47 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Jul 17 19:55:42 IST 2017 +#Sat Feb 24 20:47:57 SGT 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-milestone-1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-all.zip From 890ace5a76153ca8d39b8164809639e220124c5d Mon Sep 17 00:00:00 2001 From: Morgan Lee Date: Sat, 24 Feb 2018 20:52:25 +0800 Subject: [PATCH 2/5] Get rid of tests You don't seem to use the tests Signed-off-by: Morgan Lee --- .idea/caches/build_file_checksums.ser | Bin 539 -> 539 bytes app/build.gradle | 7 +---- .../spectrum/ExampleInstrumentedTest.java | 26 ------------------ .../org/frap129/spectrum/ExampleUnitTest.java | 17 ------------ 4 files changed, 1 insertion(+), 49 deletions(-) delete mode 100644 app/src/androidTest/java/org/frap129/spectrum/ExampleInstrumentedTest.java delete mode 100644 app/src/test/java/org/frap129/spectrum/ExampleUnitTest.java diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index aa81bc26a6663a3e72e19295821ef675a7ea900d..e5c337d8e5e2c15fc6b246bbac7652311c4c4dee 100644 GIT binary patch delta 34 scmV+-0Nwwa1e*kqnFHQ?;gOto5Qxavc4Pso8B0?Y=|1L~jFTe)_z-Fjv;Y7A delta 34 scmV+-0Nwwa1e*kqnFHL}aFLvM5O3F=v|D{t3Iv+i|6IC>E|Vhx_!PDf0ssI2 diff --git a/app/build.gradle b/app/build.gradle index 87f8db8..e39edd7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,7 +9,6 @@ android { targetSdkVersion 25 versionCode 7 versionName "2.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { debug { @@ -24,12 +23,8 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { - exclude group: 'com.android.support', module: 'support-annotations' - }) + compile fileTree(dir: 'libs', include: ['*.jar']) "" compile 'com.android.support:appcompat-v7:25.3.1' - testCompile 'junit:junit:4.12' compile 'com.android.support:cardview-v7:25.3.1' compile 'eu.chainfire:libsuperuser:1.0.0.+' compile 'com.android.support:design:25.3.1' diff --git a/app/src/androidTest/java/org/frap129/spectrum/ExampleInstrumentedTest.java b/app/src/androidTest/java/org/frap129/spectrum/ExampleInstrumentedTest.java deleted file mode 100644 index 213a889..0000000 --- a/app/src/androidTest/java/org/frap129/spectrum/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.frap129.spectrum; - -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.assertEquals; - -/** - * 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("org.frap129.spectrum", appContext.getPackageName()); - } -} diff --git a/app/src/test/java/org/frap129/spectrum/ExampleUnitTest.java b/app/src/test/java/org/frap129/spectrum/ExampleUnitTest.java deleted file mode 100644 index 367531d..0000000 --- a/app/src/test/java/org/frap129/spectrum/ExampleUnitTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.frap129.spectrum; - -import org.junit.Test; - -import static org.junit.Assert.assertEquals; - -/** - * 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 From 6d62f50fc3c36fe4d1aa55c799a083c75b15458a Mon Sep 17 00:00:00 2001 From: Morgan Lee Date: Sat, 24 Feb 2018 21:03:21 +0800 Subject: [PATCH 3/5] Update dependencies - compile is gonna get deprecated, switch to implementation - updated target and compile versions - use specific version for libsuperuser - Add google() maven repo - use interpolation for supportlibversion Signed-off-by: Morgan Lee --- .idea/caches/build_file_checksums.ser | Bin 539 -> 539 bytes .idea/misc.xml | 2 +- app/build.gradle | 15 ++++++++------- build.gradle | 1 + 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index e5c337d8e5e2c15fc6b246bbac7652311c4c4dee..182fe467889f60688452cf1be502e05b3115b67b 100644 GIT binary patch delta 55 zcmV-70LcHF1e*kqnFH(DGLf8j5c%&+c_BKTNeMpQ6+KxDP?IA8j1V>I*ZpQTtb~dh N>ogqhTkw;=0bG$z7zh9W delta 55 zcmV-70LcHF1e*kqnFHQ?;gOto5Qxavc4Pso8B0?Y=|1L~jFTe)j1Yz)v?FfyolrMy N2L$kFV%d|w0bH$i7#08k diff --git a/.idea/misc.xml b/.idea/misc.xml index 99202cc..c0f68ed 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -25,7 +25,7 @@ - + diff --git a/app/build.gradle b/app/build.gradle index e39edd7..b53c1ed 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 25 + compileSdkVersion 27 buildToolsVersion '27.0.3' defaultConfig { applicationId "org.frap129.spectrum" minSdkVersion 21 - targetSdkVersion 25 + targetSdkVersion 27 versionCode 7 versionName "2.0" } @@ -23,9 +23,10 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) "" - compile 'com.android.support:appcompat-v7:25.3.1' - compile 'com.android.support:cardview-v7:25.3.1' - compile 'eu.chainfire:libsuperuser:1.0.0.+' - compile 'com.android.support:design:25.3.1' + def supportLibVersion = '27.0.2' + implementation fileTree(include: ['*.jar'], dir: 'libs') + implementation "com.android.support:appcompat-v7:${supportLibVersion}" + implementation "com.android.support:design:${supportLibVersion}" + implementation "com.android.support:cardview-v7:${supportLibVersion}" + implementation "eu.chainfire:libsuperuser:1.0.0.201704021214" } diff --git a/build.gradle b/build.gradle index 6cd0537..92a8017 100644 --- a/build.gradle +++ b/build.gradle @@ -16,6 +16,7 @@ buildscript { allprojects { repositories { jcenter() + google() } } From 557c3bd0209551f856005a530bfc67937e771624 Mon Sep 17 00:00:00 2001 From: Morgan Lee Date: Sat, 24 Feb 2018 21:07:55 +0800 Subject: [PATCH 4/5] gitignore: don't track idea --- .gitignore | 5 +--- .idea/caches/build_file_checksums.ser | Bin 539 -> 0 bytes .idea/codeStyles/Project.xml | 29 ---------------------- .idea/gradle.xml | 18 -------------- .idea/misc.xml | 34 -------------------------- .idea/modules.xml | 9 ------- .idea/runConfigurations.xml | 12 --------- .idea/vcs.xml | 6 ----- 8 files changed, 1 insertion(+), 112 deletions(-) delete mode 100644 .idea/caches/build_file_checksums.ser delete mode 100644 .idea/codeStyles/Project.xml delete mode 100644 .idea/gradle.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/runConfigurations.xml delete mode 100644 .idea/vcs.xml diff --git a/.gitignore b/.gitignore index f417061..7096ce5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,9 @@ *.iml .gradle /local.properties -/.idea/workspace.xml -/.idea/libraries -/.idea/markdown* +/.idea .DS_Store /build /captures .externalNativeBuild *.apk - diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser deleted file mode 100644 index 182fe467889f60688452cf1be502e05b3115b67b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 539 zcmZ4UmVvdnh`~NNKUXg?FQq6yGexf?KR>5fFEb@IQ7^qHF(oHeub?PDD>b=9F91S2 zm1gFoxMk*~I%lLNXBU^|7Q2L-Ts|(GuF1r}l-a(W(##Th_( zR`y#54~r#SWM*J;W8likPfT%3OfJbU@?_vF$tX%K&dAS6sVJ~_U;qK0at2z_zyOYkOxc*3?Qo+1b)8vsZ_L@>&a<%Pt-P&CjjWg z;?$Co%)Insn8reeItDh7+Icq<_SxKL&(lrNlL~h_ys(5p%h@U>v^ce>I3_VCF*o1P zA_l4{1`(D8sYNB3sl}ymW3I^d-0WxA#PYI%bHQv|{coDtnwBo9 z*CsOWqCWtAm6M;Gm;;I-3{y4S`ZE<5My~a&?ECug#I_S941##vuutI6ffE0WTJNnH KorR5yf+_%VL%k^g diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index 30aa626..0000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml deleted file mode 100644 index 7ac24c7..0000000 --- a/.idea/gradle.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index c0f68ed..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index ab5e932..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 7f68460..0000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From 7dc82016b88575c5d19216cec28be2919e5a2e05 Mon Sep 17 00:00:00 2001 From: Morgan Lee Date: Sat, 24 Feb 2018 21:08:47 +0800 Subject: [PATCH 5/5] Gradle: exclude unused resources on release Signed-off-by: Morgan Lee --- app/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/app/build.gradle b/app/build.gradle index b53c1ed..1292c78 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,6 +17,7 @@ android { } release { minifyEnabled true + shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }