From d1dad3e61a07cc04628d01c65d60fbbb2183d4cb Mon Sep 17 00:00:00 2001 From: aminecmi Date: Sat, 6 Apr 2019 12:42:25 +0200 Subject: [PATCH] Cleaning and update. --- app/build.gradle | 34 ++----------------- .../bou/readerforselfoss/HomeActivity.kt | 4 --- .../apps/amine/bou/readerforselfoss/MyApp.kt | 12 ------- .../readerforselfoss/background/background.kt | 2 +- app/src/main/res/layout/activity_home.xml | 25 +------------- build.gradle | 9 ++--- 6 files changed, 10 insertions(+), 76 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 594df95..ab7cb40 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -72,9 +72,6 @@ android { 'proguard-rules.pro' } debug { - buildConfigField "String", "LOGIN_URL", appLoginUrl - buildConfigField "String", "LOGIN_USERNAME", appLoginUsername - buildConfigField "String", "LOGIN_PASSWORD", appLoginPassword } } flavorDimensions "build" @@ -83,11 +80,6 @@ android { versionNameSuffix '-github' dimension "build" } - storeConfig { - // As jenkins publishes to alpha first, this is the default suffix now. - versionNameSuffix '-store' - dimension "build" - } } } @@ -102,14 +94,14 @@ dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" // Android Support - implementation "androidx.appcompat:appcompat:$android_version" + implementation "androidx.appcompat:appcompat:$androidx_version" implementation "com.google.android.material:material:$android_version" implementation "androidx.recyclerview:recyclerview:$android_version" implementation "androidx.legacy:legacy-support-v4:$android_version" implementation "androidx.vectordrawable:vectordrawable:$android_version" implementation "androidx.browser:browser:$android_version" implementation "androidx.cardview:cardview:$android_version" - implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2' + implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha4' //multidex implementation 'androidx.multidex:multidex:2.0.1' @@ -134,9 +126,6 @@ dependencies { implementation 'com.github.bumptech.glide:glide:4.1.1' implementation 'com.github.bumptech.glide:okhttp3-integration:4.1.1' - // Asking politely users to rate the app - implementation 'com.github.stkent:amplify:2.2.0' - // Drawer implementation 'co.zsmb:materialdrawer-kt:2.0.1' @@ -161,21 +150,4 @@ dependencies { kapt "androidx.room:room-compiler:$room_version" implementation "android.arch.work:work-runtime-ktx:$work_version" -} - - -afterEvaluate { - initAppLoginPropertiesIfNeeded() -} - -def initAppLoginPropertiesIfNeeded() { - def propertiesFile = file(System.getProperty("user.home") + '/.gradle/gradle.properties') - if (!propertiesFile.exists()) { - def commentMessage = "This is autogenerated local property from system environment to prevent key to be committed to source control." - ant.propertyfile(file: System.getProperty("user.home") + "/.gradle/gradle.properties", comment: commentMessage) { - entry(key: "appLoginUrl", value: System.getProperty("appLoginUrl")) - entry(key: "appLoginUsername", value: System.getProperty("appLoginUsername")) - entry(key: "appLoginPassword", value: System.getProperty("appLoginPassword")) - } - } -} +} \ No newline at end of file diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/HomeActivity.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/HomeActivity.kt index e29e163..6afffb4 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/HomeActivity.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/HomeActivity.kt @@ -64,7 +64,6 @@ import com.ashokvarma.bottomnavigation.BottomNavigationBar import com.ashokvarma.bottomnavigation.BottomNavigationItem import com.ashokvarma.bottomnavigation.TextBadgeItem import com.ftinc.scoop.Scoop -import com.github.stkent.amplify.tracking.Amplify import com.mikepenz.aboutlibraries.Libs import com.mikepenz.aboutlibraries.LibsBuilder import com.mikepenz.materialdrawer.Drawer @@ -173,9 +172,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener { handleThemeBinding() setSupportActionBar(toolBar) - if (savedInstanceState == null) { - Amplify.getSharedInstance().promptIfReady(promptView) - } db = Room.databaseBuilder( applicationContext, diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/MyApp.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/MyApp.kt index 85b945f..afe5ecc 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/MyApp.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/MyApp.kt @@ -14,9 +14,6 @@ import apps.amine.bou.readerforselfoss.utils.glide.loadMaybeBasicAuth import com.bumptech.glide.Glide import com.bumptech.glide.request.RequestOptions import com.ftinc.scoop.Scoop -import com.github.stkent.amplify.feedback.DefaultEmailFeedbackCollector -import com.github.stkent.amplify.feedback.GooglePlayStoreFeedbackCollector -import com.github.stkent.amplify.tracking.Amplify import com.mikepenz.materialdrawer.util.AbstractDrawerImageLoader import com.mikepenz.materialdrawer.util.DrawerImageLoader import org.acra.ACRA @@ -25,7 +22,6 @@ import org.acra.annotation.AcraCore import org.acra.annotation.AcraDialog import org.acra.annotation.AcraHttpSender import org.acra.sender.HttpSender -import java.io.IOException import java.util.UUID.randomUUID @@ -48,7 +44,6 @@ class MyApp : MultiDexApplication() { override fun onCreate() { super.onCreate() config = Config(baseContext) - initAmplify() val prefs = getSharedPreferences(Config.settingsName, Context.MODE_PRIVATE) if (prefs.getString("unique_id", "").isEmpty()) { @@ -91,13 +86,6 @@ class MyApp : MultiDexApplication() { } - private fun initAmplify() { - Amplify.initSharedInstance(this) - .setPositiveFeedbackCollectors(GooglePlayStoreFeedbackCollector()) - .setCriticalFeedbackCollectors(DefaultEmailFeedbackCollector(Config.feedbackEmail)) - .applyAllDefaultRules() - } - private fun initDrawerImageLoader() { DrawerImageLoader.init(object : AbstractDrawerImageLoader() { override fun set( diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/background/background.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/background/background.kt index 7638a5d..1e8bb50 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/background/background.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/background/background.kt @@ -130,7 +130,7 @@ class LoadingWorker(val context: Context, params: WorkerParameters) : Worker(con } } } - return Result.SUCCESS + return Result.success() } private fun doAndReportOnFail(call: Call, action: ActionEntity) { diff --git a/app/src/main/res/layout/activity_home.xml b/app/src/main/res/layout/activity_home.xml index e8b600d..c4fdfe6 100644 --- a/app/src/main/res/layout/activity_home.xml +++ b/app/src/main/res/layout/activity_home.xml @@ -8,33 +8,10 @@ android:fitsSystemWindows="true" xmlns:app="http://schemas.android.com/apk/res-auto"> - - + android:layout_height="match_parent">