From 694f37ac280de448e4e7760be018e92ed24bded3 Mon Sep 17 00:00:00 2001 From: zqHero <229457269@qq.com> Date: Fri, 20 Sep 2019 18:13:43 +0800 Subject: [PATCH 1/2] had change the method isSuccess to isSuccessful and upgrade to 3 --- .idea/.name | 1 - .idea/codeStyleSettings.xml | 229 ------------------ .idea/compiler.xml | 22 -- .idea/copyright/profiles_settings.xml | 3 - .idea/gradle.xml | 14 +- .idea/misc.xml | 100 +------- .idea/modules.xml | 2 +- .idea/runConfigurations.xml | 12 - .idea/vcs.xml | 43 +--- app/build.gradle | 51 ++-- .../kodelabs/mycosts/sync/SyncAdapter.java | 4 +- build.gradle | 6 +- gradle/wrapper/gradle-wrapper.properties | 6 +- 13 files changed, 46 insertions(+), 447 deletions(-) delete mode 100644 .idea/.name delete mode 100644 .idea/codeStyleSettings.xml delete mode 100644 .idea/compiler.xml delete mode 100644 .idea/copyright/profiles_settings.xml delete mode 100644 .idea/runConfigurations.xml diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index 1fd20b0..0000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -My Costs \ No newline at end of file diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml deleted file mode 100644 index 6ef5a36..0000000 --- a/.idea/codeStyleSettings.xml +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index 9a8b7e5..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/gradle.xml b/.idea/gradle.xml index 261ec28..542791a 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -3,16 +3,12 @@ diff --git a/.idea/misc.xml b/.idea/misc.xml index d3efc26..37a7509 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,107 +1,9 @@ - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - Android SDK - - - - - - - - Android API 21 Platform - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index b8b99b7..ed716cb 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ - + 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 index 81e19eb..35eb1dd 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,47 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index a612d6c..25d2190 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,17 +1,24 @@ apply plugin: 'com.android.application' -apply plugin: 'com.neenbedankt.android-apt' +//apply plugin: 'com.neenbedankt.android-apt' apply from: "${project.rootDir}/QA/quality.gradle" android { - compileSdkVersion 23 - buildToolsVersion "23.0.2" + compileSdkVersion 28 + buildToolsVersion "27.0.3" defaultConfig { applicationId "com.kodelabs.mycosts" minSdkVersion 15 - targetSdkVersion 23 + targetSdkVersion 28 versionCode 1 versionName "1.0" + + javaCompileOptions { + annotationProcessorOptions { + includeCompileClasspath true + } + } + } buildTypes { release { @@ -25,36 +32,36 @@ def dbflow_version = "3.0.0-beta3" dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) + implementation fileTree(dir: 'libs', include: ['*.jar']) // general - compile 'com.android.support:appcompat-v7:23.1.1' - compile 'com.android.support:design:23.1.1' - compile 'com.jakewharton:butterknife:7.0.1' - compile 'com.jakewharton.timber:timber:4.1.0' + implementation 'com.android.support:appcompat-v7:+' + implementation 'com.android.support:design:+' + implementation 'com.jakewharton:butterknife:7.0.1' + implementation 'com.jakewharton.timber:timber:4.1.0' // inspection - compile 'com.facebook.stetho:stetho:1.3.0' - compile 'com.facebook.stetho:stetho-okhttp3:1.3.0' + implementation 'com.facebook.stetho:stetho:1.3.0' + implementation 'com.facebook.stetho:stetho-okhttp3:1.3.0' // network - compile 'com.squareup.retrofit2:retrofit:2.0.0-beta4' - compile 'com.squareup.retrofit2:converter-gson:+' - compile 'com.squareup.okhttp3:logging-interceptor:3.0.1' + implementation 'com.squareup.retrofit2:retrofit:2.0.0-beta4' + implementation 'com.squareup.retrofit2:converter-gson:+' + implementation 'com.squareup.okhttp3:logging-interceptor:3.0.1' // database - apt "com.github.Raizlabs.DBFlow:dbflow-processor:${dbflow_version}" - compile "com.github.Raizlabs.DBFlow:dbflow-core:${dbflow_version}" - compile "com.github.Raizlabs.DBFlow:dbflow:${dbflow_version}" + annotationProcessor "com.github.Raizlabs.DBFlow:dbflow-processor:${dbflow_version}" + implementation "com.github.Raizlabs.DBFlow:dbflow-core:${dbflow_version}" + implementation "com.github.Raizlabs.DBFlow:dbflow:${dbflow_version}" // material design - compile 'com.android.support:cardview-v7:23.1.1' - compile 'com.android.support:recyclerview-v7:23.1.1' - compile('com.github.ozodrukh:CircularReveal:1.1.1@aar') { + implementation 'com.android.support:cardview-v7:+' + implementation 'com.android.support:recyclerview-v7:+' + implementation('com.github.ozodrukh:CircularReveal:1.1.1@aar') { transitive = true; } // tests - testCompile 'junit:junit:4.12' - testCompile "org.mockito:mockito-core:1.+" + testImplementation 'junit:junit:4.12' + testImplementation "org.mockito:mockito-core:1.+" } diff --git a/app/src/main/java/com/kodelabs/mycosts/sync/SyncAdapter.java b/app/src/main/java/com/kodelabs/mycosts/sync/SyncAdapter.java index 1eee50c..82c3b1e 100644 --- a/app/src/main/java/com/kodelabs/mycosts/sync/SyncAdapter.java +++ b/app/src/main/java/com/kodelabs/mycosts/sync/SyncAdapter.java @@ -75,7 +75,7 @@ public static void triggerSync(Context context) { public void onResponse(Call call, Response response) { Timber.i("UPLOAD SUCCESS: %d", response.code()); - if (response.isSuccess()) { + if (response.isSuccessful()) { mCostRepository.markSynced(mUnsyncedCosts); } } @@ -117,7 +117,7 @@ public void onPerformSync(Account account, Bundle extras, String authority, Cont Timber.i("UPLOAD SUCCESS: %d", response.code()); // everything went well, mark local cost items as synced - if (response.isSuccess()) { + if (response.isSuccessful()) { mCostRepository.markSynced(mUnsyncedCosts); } diff --git a/build.gradle b/build.gradle index 2974c8e..9ba8545 100644 --- a/build.gradle +++ b/build.gradle @@ -3,11 +3,12 @@ buildscript { repositories { jcenter() + google() } dependencies { - classpath 'com.android.tools.build:gradle:1.5.0' - classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' + classpath 'com.android.tools.build:gradle:3.1.0' +// classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -17,6 +18,7 @@ buildscript { allprojects { repositories { jcenter() + google() maven { url "https://jitpack.io" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f23df6e..b05fa17 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Oct 21 11:34:03 PDT 2015 +#Fri Sep 20 17:08:33 CST 2019 +distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip +zipStoreBase=GRADLE_USER_HOME From fca95e818b6764f78e3e95a30ca6b7e04d3248f7 Mon Sep 17 00:00:00 2001 From: zqHero <229457269@qq.com> Date: Fri, 20 Sep 2019 18:25:35 +0800 Subject: [PATCH 2/2] delete the .idea that shoulded ignored --- .idea/gradle.xml | 15 --------------- .idea/misc.xml | 9 --------- .idea/modules.xml | 9 --------- .idea/vcs.xml | 6 ------ 4 files changed, 39 deletions(-) delete mode 100644 .idea/gradle.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml diff --git a/.idea/gradle.xml b/.idea/gradle.xml deleted file mode 100644 index 542791a..0000000 --- a/.idea/gradle.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 37a7509..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index ed716cb..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,9 +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