mirror of
https://github.com/bitfireAT/davx5-ose
synced 2024-07-23 19:50:18 +00:00
Use configuration cache to improve build speed (closes bitfireAT/davx5#248) (bitfireAT/davx5#255)
- disable per-app language preference for now (will be enabled again with bitfireAT/davx5#245) - disable Jetifier (doesn't seem to be explicitly required for in-app rating API anymore) - remove Locator dependency - update ical4android
This commit is contained in:
parent
7b2ffeb98e
commit
2ff4b35bdb
|
@ -7,7 +7,6 @@ apply plugin: 'com.mikepenz.aboutlibraries.plugin'
|
|||
apply plugin: 'dagger.hilt.android.plugin'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
apply plugin: 'com.arnyminerz.locator'
|
||||
|
||||
// Android configuration
|
||||
android {
|
||||
|
|
|
@ -53,8 +53,7 @@
|
|||
android:theme="@style/AppTheme"
|
||||
android:resizeableActivity="true"
|
||||
tools:ignore="UnusedAttribute"
|
||||
android:supportsRtl="true"
|
||||
android:localeConfig="@xml/locales_config">
|
||||
android:supportsRtl="true">
|
||||
|
||||
<!-- required for Hilt/WorkManager integration -->
|
||||
<provider
|
||||
|
@ -299,18 +298,6 @@
|
|||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/debug_paths" />
|
||||
</provider>
|
||||
|
||||
|
||||
<!-- Support language selection on Android 12 and lower -->
|
||||
<service
|
||||
android:name="androidx.appcompat.app.AppLocalesMetadataHolderService"
|
||||
android:enabled="false"
|
||||
android:exported="false">
|
||||
<meta-data
|
||||
android:name="autoStoreLocales"
|
||||
android:value="true" />
|
||||
</service>
|
||||
|
||||
</application>
|
||||
|
||||
<!-- package visiblity – which apps do we need to see? -->
|
||||
|
|
|
@ -20,7 +20,6 @@ import androidx.preference.*
|
|||
import at.bitfire.cert4android.CustomCertManager
|
||||
import at.bitfire.davdroid.BuildConfig
|
||||
import at.bitfire.davdroid.ForegroundService
|
||||
import at.bitfire.davdroid.Locator
|
||||
import at.bitfire.davdroid.R
|
||||
import at.bitfire.davdroid.resource.TaskUtils
|
||||
import at.bitfire.davdroid.settings.Settings
|
||||
|
@ -251,46 +250,6 @@ class AppSettingsActivity: AppCompatActivity() {
|
|||
false
|
||||
}
|
||||
}
|
||||
findPreference<ListPreference>(Settings.LANGUAGE)!!.apply {
|
||||
val languageOptions = mutableMapOf(
|
||||
// Start with the "System default" option on top
|
||||
Settings.LANGUAGE_SYSTEM to context.getString(R.string.app_settings_language_system_default)
|
||||
)
|
||||
// Create another map with the languages available from Locales
|
||||
val availableLanguages = Locator.Locales
|
||||
.map { locale -> locale.language to locale.displayName }
|
||||
// Sort alphabetically by the name displayed
|
||||
.sortedBy { it.second }
|
||||
// Add all the available languages to the original list
|
||||
languageOptions.putAll(availableLanguages)
|
||||
|
||||
this.entries = languageOptions.values.toTypedArray()
|
||||
this.entryValues = languageOptions.keys.toTypedArray()
|
||||
|
||||
val appCompatLocales = AppCompatDelegate.getApplicationLocales()
|
||||
var currentLocale: Locale? = null
|
||||
if(!appCompatLocales.isEmpty) {
|
||||
for (i in 0 until appCompatLocales.size()) {
|
||||
val locale = appCompatLocales[i] ?: continue
|
||||
if (languageOptions.containsKey(appCompatLocales[i]!!.language)) {
|
||||
currentLocale = locale
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
setValueIndex(entryValues.indexOf(currentLocale?.language ?: Settings.LANGUAGE_SYSTEM))
|
||||
summary = entry
|
||||
|
||||
onPreferenceChangeListener = Preference.OnPreferenceChangeListener { _, newValue ->
|
||||
if(newValue.toString() == Settings.LANGUAGE_SYSTEM)
|
||||
AppCompatDelegate.setApplicationLocales(LocaleListCompat.getEmptyLocaleList())
|
||||
else {
|
||||
val newLanguage = Locale.forLanguageTag(newValue.toString())
|
||||
AppCompatDelegate.setApplicationLocales(LocaleListCompat.create(newLanguage))
|
||||
}
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
// integration settings
|
||||
findPreference<Preference>(Settings.PREFERRED_TASKS_PROVIDER)!!.apply {
|
||||
|
|
|
@ -95,11 +95,11 @@
|
|||
android:entryValues="@array/app_settings_theme_values"
|
||||
android:persistent="false" />
|
||||
|
||||
<ListPreference
|
||||
<!-- <ListPreference
|
||||
android:key="language"
|
||||
android:icon="@drawable/ic_language"
|
||||
android:title="@string/app_settings_language_title"
|
||||
android:persistent="false" />
|
||||
android:persistent="false" /> -->
|
||||
|
||||
<Preference
|
||||
android:key="reset_hints"
|
||||
|
|
|
@ -31,7 +31,6 @@ buildscript {
|
|||
classpath "com.google.dagger:hilt-android-gradle-plugin:${versions.hilt}"
|
||||
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${versions.aboutLibraries}"
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
|
||||
classpath 'com.arnyminerz.locator:Locator:1.0.2'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
## For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
# [https://developer.android.com/build/optimize-your-build#optimize]
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xmx4g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=512m
|
||||
org.gradle.parallel=true
|
||||
|
||||
# configuration cache [https://developer.android.com/build/optimize-your-build#use-the-configuration-cache-experimental]
|
||||
org.gradle.unsafe.configuration-cache=true
|
||||
org.gradle.unsafe.configuration-cache-problems=warn
|
||||
|
||||
# Android
|
||||
android.databinding.incremental=true
|
||||
android.useAndroidX=true
|
||||
android.enableR8.fullMode=false
|
||||
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M"
|
||||
org.gradle.parallel=true
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 0133bea8ea1c985d7cde52a9df5026ab486f0f2a
|
||||
Subproject commit fa53d4cd9b5c8987e464ec1f4317733f35dc2f45
|
Loading…
Reference in a new issue