aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-21 19:20:56 -0700
committerAllan Wang <me@allanwang.ca>2017-06-21 19:20:56 -0700
commit752f5a2c457cf6dfb34a7f240d78dc1d92a70f02 (patch)
treedcdca7fd4ef14d1d1154bb5e82e28cdd93b84fb4 /app
parent01083ccb6c7d8ecce9f13ecd0d5ef5bb328bdf21 (diff)
downloadfrost-752f5a2c457cf6dfb34a7f240d78dc1d92a70f02.tar.gz
frost-752f5a2c457cf6dfb34a7f240d78dc1d92a70f02.tar.bz2
frost-752f5a2c457cf6dfb34a7f240d78dc1d92a70f02.zip
Clean up dependencies
Diffstat (limited to 'app')
-rw-r--r--app/build.gradle12
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/BaseActivity.kt6
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/LoginActivity.kt1
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt3
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt1
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt5
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt5
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/BaseUnitTest.kt36
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/DbFlowTestRule.kt38
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/ImmediateTransactionManager.kt38
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/TestDatabase.kt21
11 files changed, 10 insertions, 156 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 39bcab46..eaacf542 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -91,12 +91,10 @@ dependencies {
compile "com.github.Raizlabs.DBFlow:dbflow-core:${DBFLOW}"
annotationProcessor "com.github.Raizlabs.DBFlow:dbflow-processor:${DBFLOW}"
kapt "com.github.Raizlabs.DBFlow:dbflow-processor:${DBFLOW}"
- compile "com.github.Raizlabs.DBFlow:dbflow-kotlinextensions:${DBFLOW}"
+// compile "com.github.Raizlabs.DBFlow:dbflow-kotlinextensions:${DBFLOW}"
compile "com.github.Raizlabs.DBFlow:dbflow-rx2:${DBFLOW}"
compile "com.github.Raizlabs.DBFlow:dbflow-rx2-kotlinextensions:${DBFLOW}"
- testCompile "org.robolectric:robolectric:${ROBOELECTRIC}"
-
// compile "org.greenrobot:eventbus:${EVENTBUS}"
//Icons
@@ -106,10 +104,10 @@ dependencies {
compile "io.reactivex.rxjava2:rxjava:${RX_JAVA}"
compile "io.reactivex.rxjava2:rxandroid:${RX_ANDROID}"
- compile "com.jakewharton.rxbinding2:rxbinding:${RX_BINDING}"
- compile "com.jakewharton.rxbinding2:rxbinding-appcompat-v7:${RX_BINDING}"
+// compile "com.jakewharton.rxbinding2:rxbinding:${RX_BINDING}"
+// compile "com.jakewharton.rxbinding2:rxbinding-appcompat-v7:${RX_BINDING}"
- compile "com.lapism:searchview:${SEARCH_VIEW}"
+// compile "com.lapism:searchview:${SEARCH_VIEW}"
compile "org.jsoup:jsoup:${JSOUP}"
@@ -118,8 +116,6 @@ dependencies {
compile "com.github.bumptech.glide:glide:${GLIDE}"
annotationProcessor "com.github.bumptech.glide:compiler:${GLIDE}"
- compile "com.f2prateek.rx.preferences2:rx-preferences:${RX_PREFS}"
-
compile("com.mikepenz:materialdrawer:${MATERIAL_DRAWER}@aar") {
transitive = true
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/BaseActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/BaseActivity.kt
index a408e461..c2551125 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/BaseActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/BaseActivity.kt
@@ -1,13 +1,7 @@
package com.pitchedapps.frost
-import android.graphics.drawable.ColorDrawable
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
-import android.support.v7.widget.Toolbar
-import ca.allanwang.kau.utils.darken
-import ca.allanwang.kau.utils.navigationBarColor
-import ca.allanwang.kau.utils.statusBarColor
-import ca.allanwang.kau.utils.withAlpha
import com.pitchedapps.frost.utils.Prefs
import com.pitchedapps.frost.utils.materialDialogThemed
import com.pitchedapps.frost.utils.setFrostTheme
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/LoginActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/LoginActivity.kt
index 1399cb32..fdb918cc 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/LoginActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/LoginActivity.kt
@@ -10,7 +10,6 @@ import android.widget.ImageView
import ca.allanwang.kau.utils.bindView
import ca.allanwang.kau.utils.fadeIn
import ca.allanwang.kau.utils.fadeOut
-import ca.allanwang.kau.utils.setTextWithFade
import com.bumptech.glide.Glide
import com.bumptech.glide.load.DataSource
import com.bumptech.glide.load.engine.GlideException
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt
index 1d52ed34..08293f0e 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt
@@ -15,8 +15,6 @@ import android.support.v4.view.ViewPager
import android.support.v7.widget.Toolbar
import android.view.Menu
import android.view.MenuItem
-import android.widget.ImageButton
-import ca.allanwang.kau.email.sendEmail
import ca.allanwang.kau.utils.*
import co.zsmb.materialdrawerkt.builders.Builder
import co.zsmb.materialdrawerkt.builders.accountHeader
@@ -43,7 +41,6 @@ import com.pitchedapps.frost.views.BadgedIcon
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import io.reactivex.subjects.PublishSubject
-import org.jetbrains.anko.childrenSequence
import org.jsoup.Jsoup
import java.util.concurrent.TimeUnit
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt
index 0b2be3ee..9e15073c 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt
@@ -1,7 +1,6 @@
package com.pitchedapps.frost
import android.os.Bundle
-import android.os.Handler
import android.support.v7.app.AppCompatActivity
import com.pitchedapps.frost.dbflow.loadFbCookiesAsync
import com.pitchedapps.frost.facebook.FbCookie
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt
index 7cc3dfe8..002d92f7 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt
@@ -9,7 +9,10 @@ import ca.allanwang.kau.utils.*
import com.jude.swipbackhelper.SwipeBackHelper
import com.mikepenz.google_material_typeface_library.GoogleMaterial
import com.pitchedapps.frost.facebook.FbCookie
-import com.pitchedapps.frost.utils.*
+import com.pitchedapps.frost.utils.ARG_URL
+import com.pitchedapps.frost.utils.Prefs
+import com.pitchedapps.frost.utils.formattedFbUrl
+import com.pitchedapps.frost.utils.setFrostColors
import com.pitchedapps.frost.web.FrostWebView
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
index 8accffde..48963e0e 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
@@ -7,17 +7,15 @@ import android.content.ComponentName
import android.content.Context
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
-import android.support.annotation.ColorInt
import android.support.v4.app.NotificationCompat
+import android.support.v7.widget.SimpleItemAnimator
import android.support.v7.widget.Toolbar
-import android.view.Menu
import android.view.View
import android.widget.TextView
import ca.allanwang.kau.utils.*
import com.afollestad.materialdialogs.MaterialDialog
import com.crashlytics.android.answers.Answers
import com.crashlytics.android.answers.CustomEvent
-import com.mikepenz.iconics.typeface.IIcon
import com.pitchedapps.frost.*
import com.pitchedapps.frost.dbflow.CookieModel
import com.pitchedapps.frost.facebook.FB_URL_BASE
@@ -91,6 +89,7 @@ fun MaterialDialog.Builder.theme(): MaterialDialog.Builder {
positiveColor(Prefs.textColor)
negativeColor(Prefs.textColor)
neutralColor(Prefs.textColor)
+ SimpleItemAnimator
return this
}
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/BaseUnitTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/BaseUnitTest.kt
deleted file mode 100644
index 43d6bbf9..00000000
--- a/app/src/test/kotlin/com/pitchedapps/frost/BaseUnitTest.kt
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.pitchedapps.frost
-
-import android.content.Context
-import android.os.Build
-import org.junit.Rule
-import org.junit.runner.RunWith
-import org.robolectric.RobolectricTestRunner
-import org.robolectric.RuntimeEnvironment
-import org.robolectric.annotation.Config
-import timber.log.Timber
-
-/**
- * Created by Allan Wang on 2017-05-30.
- */
-@RunWith(RobolectricTestRunner::class)
-@Config(constants = BuildConfig::class, sdk = intArrayOf(Build.VERSION_CODES.LOLLIPOP),
- assetDir = "build/intermediates/classes/test/")
-abstract class BaseUnitTest {
-
- @JvmField
- @Rule
- var dblflowTestRule = DBFlowTestRule.create()
-
- val context: Context
- get() = RuntimeEnvironment.application
-
- init {
- Timber.plant(TestTree())
- }
-
- internal class TestTree : Timber.Tree() {
- override fun log(priority: Int, tag: String, message: String, t: Throwable?) {
- System.out.println("$tag-$priority: $message")
- }
- }
-}
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/DbFlowTestRule.kt b/app/src/test/kotlin/com/pitchedapps/frost/DbFlowTestRule.kt
deleted file mode 100644
index aaf38a0f..00000000
--- a/app/src/test/kotlin/com/pitchedapps/frost/DbFlowTestRule.kt
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.pitchedapps.frost
-
-import com.raizlabs.android.dbflow.config.DatabaseConfig
-import com.raizlabs.android.dbflow.config.FlowConfig
-import com.raizlabs.android.dbflow.config.FlowManager
-import org.junit.rules.TestRule
-import org.junit.runner.Description
-import org.junit.runners.model.Statement
-import org.robolectric.RuntimeEnvironment
-
-/**
- * Created by Allan Wang on 2017-05-30.
- */
-
-class DBFlowTestRule : TestRule {
-
- override fun apply(base: Statement, description: Description): Statement {
- return object : Statement() {
-
- @Throws(Throwable::class)
- override fun evaluate() {
- FlowManager.init(FlowConfig.Builder(RuntimeEnvironment.application)
- .addDatabaseConfig(DatabaseConfig.Builder(TestDatabase::class.java)
- .transactionManagerCreator(::ImmediateTransactionManager)
- .build()).build())
- try {
- base.evaluate()
- } finally {
- FlowManager.destroy()
- }
- }
- }
- }
-
- companion object {
- fun create() = DBFlowTestRule()
- }
-} \ No newline at end of file
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/ImmediateTransactionManager.kt b/app/src/test/kotlin/com/pitchedapps/frost/ImmediateTransactionManager.kt
deleted file mode 100644
index f3d17e76..00000000
--- a/app/src/test/kotlin/com/pitchedapps/frost/ImmediateTransactionManager.kt
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.pitchedapps.frost
-
-import com.raizlabs.android.dbflow.config.DatabaseDefinition
-import com.raizlabs.android.dbflow.runtime.BaseTransactionManager
-import com.raizlabs.android.dbflow.structure.database.transaction.ITransactionQueue
-import com.raizlabs.android.dbflow.structure.database.transaction.Transaction
-/**
- * Created by Allan Wang on 2017-05-30.
- */
-class ImmediateTransactionManager(databaseDefinition: DatabaseDefinition)
- : BaseTransactionManager(ImmediateTransactionQueue(), databaseDefinition)
-
-
-class ImmediateTransactionQueue : ITransactionQueue {
-
- override fun add(transaction: Transaction?) {
- if (transaction != null) {
- transaction.newBuilder()
- .runCallbacksOnSameThread(true)
- .build()
- .executeSync()
- }
- }
-
- override fun cancel(transaction: Transaction?) {
-
- }
-
- override fun startIfNotAlive() {
- }
-
- override fun cancel(name: String?) {
- }
-
- override fun quit() {
- }
-
-} \ No newline at end of file
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/TestDatabase.kt b/app/src/test/kotlin/com/pitchedapps/frost/TestDatabase.kt
deleted file mode 100644
index 328233ac..00000000
--- a/app/src/test/kotlin/com/pitchedapps/frost/TestDatabase.kt
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.pitchedapps.frost
-
-import com.raizlabs.android.dbflow.annotation.Database
-import com.raizlabs.android.dbflow.annotation.Migration
-import com.raizlabs.android.dbflow.sql.migration.UpdateTableMigration
-
-/**
- * Created by Allan Wang on 2017-05-30.
- */
-
-/**
- * Description:
- */
-@Database(version = TestDatabase.VERSION, name = TestDatabase.NAME)
-object TestDatabase {
-
- const val VERSION = 1
-
- const val NAME = "TestDatabase"
-
-} \ No newline at end of file