diff --git a/app/build.gradle b/app/build.gradle index e7b3a74..1b01ca2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -65,15 +65,6 @@ android { include 'spek2' } } - jacocoOptions { - // here goes all jacoco config, for example - html.enabled = true - xml.enabled = false - csv.enabled = false - unitTests.all { - testLogging.events = ["passed", "skipped", "failed"] - } - } } } lintOptions { @@ -94,7 +85,6 @@ repositories { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$versions.kotlin" - implementation "com.jakewharton:butterknife:$versions.butterKnife" implementation androidLibs implementation retrofitLibs diff --git a/app/gradle.properties b/app/gradle.properties index bbddd42..a4eed8f 100644 --- a/app/gradle.properties +++ b/app/gradle.properties @@ -1,3 +1,3 @@ -#Mon May 06 16:49:10 MSK 2019 -appVersionCode=11 -appVersionName=0.1.16 +#Wed May 15 11:26:23 MSK 2019 +appVersionCode=12 +appVersionName=0.1.17 diff --git a/app/src/main/java/com/flatstack/android/mainscreen/TestDialog.kt b/app/src/main/java/com/flatstack/android/mainscreen/TestDialog.kt index f912b25..d275488 100644 --- a/app/src/main/java/com/flatstack/android/mainscreen/TestDialog.kt +++ b/app/src/main/java/com/flatstack/android/mainscreen/TestDialog.kt @@ -3,23 +3,17 @@ package com.flatstack.android.mainscreen import android.os.Bundle import android.view.View import android.widget.TextView +import androidx.fragment.app.DialogFragment import androidx.fragment.app.FragmentManager -import butterknife.BindView -import com.flatstack.android.R -import com.flatstack.android.util.ui.BaseDialogFragment - -class TestDialog : BaseDialogFragment() { - @BindView(R.id.tv_title) internal lateinit var uiTitle: TextView - @BindView(R.id.tv_message) internal lateinit var uiMessage: TextView +class TestDialog : DialogFragment() { + private lateinit var uiTitle: TextView + internal lateinit var uiMessage: TextView private var title: String? = null private var message: String? = null - override val layoutRes: Int - get() = R.layout.dialog_test - - override fun parseArguments(args: Bundle) { + private fun parseArguments() { arguments?.let { title = it.getString(KEY_TITLE) message = it.getString(KEY_MESSAGE) @@ -31,6 +25,7 @@ class TestDialog : BaseDialogFragment() { savedInstanceState: Bundle? ) { super.onViewCreated(view, savedInstanceState) + parseArguments() uiTitle.text = title uiMessage.text = message } diff --git a/app/src/main/java/com/flatstack/android/util/ui/BaseDialogFragment.kt b/app/src/main/java/com/flatstack/android/util/ui/BaseDialogFragment.kt deleted file mode 100644 index 4461dbe..0000000 --- a/app/src/main/java/com/flatstack/android/util/ui/BaseDialogFragment.kt +++ /dev/null @@ -1,69 +0,0 @@ -package com.flatstack.android.util.ui - -import android.app.Dialog -import android.os.Bundle -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import android.view.Window -import androidx.fragment.app.DialogFragment -import androidx.fragment.app.FragmentActivity - -import butterknife.ButterKnife -import butterknife.Unbinder - -abstract class BaseDialogFragment : DialogFragment() { - - private var butterKnifeUnbinder: Unbinder? = null - - internal abstract val layoutRes: Int - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - arguments?.let { parseArguments(it) } - } - - protected open fun parseArguments(args: Bundle) { - throw IllegalStateException("should be overridden") - } - - override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { - val dialog = super.onCreateDialog(savedInstanceState) - dialog.window?.requestFeature(Window.FEATURE_NO_TITLE) - return dialog - } - - override fun onCreateView( - inflater: LayoutInflater, - container: ViewGroup?, - savedInstanceState: Bundle? - ): View? { - val v = inflater.inflate(layoutRes, container, false) - butterKnifeUnbinder = ButterKnife.bind(this, v) - return v - } - - override fun onDestroyView() { - butterKnifeUnbinder?.unbind() - super.onDestroyView() - } - - companion object { - protected fun show( - dialogFragment: T, - activity: FragmentActivity - ): T { - val ft = activity.supportFragmentManager.beginTransaction() - val prev = activity.supportFragmentManager - .findFragmentByTag(dialogFragment.javaClass.name) - prev?.let { - ft.remove(it) - val df = prev as DialogFragment - df.dismissAllowingStateLoss() - } - ft.addToBackStack(null) - dialogFragment.show(ft, dialogFragment.javaClass.name) - return dialogFragment - } - } -} diff --git a/deps.gradle b/deps.gradle index fa50bf4..b895964 100644 --- a/deps.gradle +++ b/deps.gradle @@ -15,7 +15,6 @@ ext { retrofit : '2.5.0', coroutines : '1.1.1', room : '2.1.0-beta01', - butterKnife : '10.1.0', espressoVersion : '3.1.1' ] androidx = [ @@ -57,7 +56,6 @@ ext { kapt = [ room_compiler : "androidx.room:room-compiler:$versions.room", lifecycle : "androidx.lifecycle:lifecycle-compiler:$versions.lifecycle", - butterKnife : "com.jakewharton:butterknife-compiler:$versions.butterKnife" ] androidLibs = androidx.values() diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c3fd1f1..ff8344f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Apr 17 17:11:54 MSK 2019 +#Wed May 15 11:21:42 MSK 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip