Found that enabling ProGuard's minify for the debug version breaks the debugger breakpoints functionality, minify was disabled until a solution is found.

This commit is contained in:
Severiano Jaramillo 2018-12-14 11:12:30 -06:00
parent f76f293811
commit ba113e1a7f
4 changed files with 19 additions and 4 deletions

View file

@ -21,8 +21,8 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled true
shrinkResources true
// TODO enabling minify breaks the debugger breakpoints, find a way to fix it and enable minify again
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
resValue("string", "PORT_NUMBER", "8082")
}

View file

@ -16,6 +16,7 @@ import cy.agorise.bitsybitshareswallet.viewmodels.BalanceDetailViewModel
import kotlinx.android.synthetic.main.fragment_balances.*
class BalancesFragment: Fragment() {
private val TAG = this.javaClass.simpleName
private lateinit var mBalanceDetailViewModel: BalanceDetailViewModel
@ -43,4 +44,12 @@ class BalancesFragment: Fragment() {
balancesAdapter.replaceAll(balancesDetails)
})
}
// override fun setUserVisibleHint(isVisibleToUser: Boolean) {
// super.setUserVisibleHint(isVisibleToUser)
// if (isVisibleToUser) {
// // TODO find a better way to recreate the fragment, that does it only when the theme has been changed
// fragmentManager!!.beginTransaction().detach(this).attach(this).commit()
// }
// }
}

View file

@ -16,7 +16,6 @@ import cy.agorise.bitsybitshareswallet.database.entities.UserAccount
import cy.agorise.bitsybitshareswallet.utils.Constants
import cy.agorise.bitsybitshareswallet.viewmodels.UserAccountViewModel
import kotlinx.android.synthetic.main.fragment_home.*
import kotlinx.android.synthetic.main.item_balance.view.*
class HomeFragment : Fragment() {
@ -76,7 +75,6 @@ class HomeFragment : Fragment() {
override fun getItem(position: Int): Fragment {
// getItem is called to instantiate the fragment for the given page.
// Return a PlaceholderFragment (defined as a static inner class below).
return if (position == 0)
BalancesFragment()
else

View file

@ -17,4 +17,12 @@ class NetWorthFragment: Fragment() {
return inflater.inflate(R.layout.fragment_net_worth, container, false)
}
// override fun setUserVisibleHint(isVisibleToUser: Boolean) {
// super.setUserVisibleHint(isVisibleToUser)
// if (isVisibleToUser) {
// // TODO find a better way to recreate the fragment, that does it only when the theme has been changed
// fragmentManager!!.beginTransaction().detach(this).attach(this).commit()
// }
// }
}