Build optimization
This commit is contained in:
@@ -22,19 +22,27 @@ android {
|
|||||||
versionCode 57
|
versionCode 57
|
||||||
versionName "4.21-hotfix1"
|
versionName "4.21-hotfix1"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
multiDexEnabled true
|
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
|
minifyEnabled true
|
||||||
|
shrinkResources true
|
||||||
|
|
||||||
debuggable true
|
debuggable true
|
||||||
applicationIdSuffix ".debug"
|
applicationIdSuffix ".debug"
|
||||||
versionNameSuffix "-DEBUG"
|
versionNameSuffix "-DEBUG"
|
||||||
|
|
||||||
buildConfigField('Boolean', 'CENSOR', 'false')
|
buildConfigField('Boolean', 'CENSOR', 'false')
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
|
||||||
|
ext.enableCrashlytics = false
|
||||||
|
ext.alwaysUpdateBuildId = false
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
|
minifyEnabled true
|
||||||
|
shrinkResources true
|
||||||
|
|
||||||
buildConfigField('Boolean', 'CENSOR', 'false')
|
buildConfigField('Boolean', 'CENSOR', 'false')
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
@@ -57,7 +65,7 @@ dependencies {
|
|||||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7"
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7"
|
||||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7"
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7"
|
||||||
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0"
|
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0"
|
||||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||||
implementation 'androidx.preference:preference:1.1.1'
|
implementation 'androidx.preference:preference:1.1.1'
|
||||||
implementation 'androidx.gridlayout:gridlayout:1.0.0'
|
implementation 'androidx.gridlayout:gridlayout:1.0.0'
|
||||||
|
|||||||
@@ -79,16 +79,13 @@ class SettingsFragment :
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun getDirSize(dir: File) : String {
|
private fun getDirSize(dir: File) : String {
|
||||||
return if (activity != null)
|
return context?.getString(R.string.settings_storage_usage,
|
||||||
getString(R.string.settings_storage_usage,
|
Runtime.getRuntime().exec("du -hs " + dir.absolutePath).let {
|
||||||
Runtime.getRuntime().exec("du -hs " + dir.absolutePath).let {
|
BufferedReader(InputStreamReader(it.inputStream)).use { reader ->
|
||||||
BufferedReader(InputStreamReader(it.inputStream)).use { reader ->
|
reader.readLine()?.split('\t')?.firstOrNull() ?: "0"
|
||||||
reader.readLine()?.split('\t')?.firstOrNull() ?: "0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
else
|
) ?: ""
|
||||||
""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPreferenceClick(preference: Preference?): Boolean {
|
override fun onPreferenceClick(preference: Preference?): Boolean {
|
||||||
|
|||||||
@@ -11,7 +11,10 @@
|
|||||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
# org.gradle.parallel=true
|
# org.gradle.parallel=true
|
||||||
#Thu Jan 30 12:29:48 KST 2020
|
#Thu Jan 30 12:29:48 KST 2020
|
||||||
|
org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M"
|
||||||
|
org.gradle.parallel=true
|
||||||
|
org.gradle.daemon=true
|
||||||
|
org.gradle.configureondemand=true
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
org.gradle.jvmargs=-Xmx1024M -Dkotlin.daemon.jvm.options\="-Xmx1024M"
|
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
Reference in New Issue
Block a user