Rename flavor fdroidmain to lite

This commit is contained in:
Julian Raufelder 2022-05-27 17:07:20 +02:00
parent 66dff4ab4f
commit a11ad86cf3
No known key found for this signature in database
GPG Key ID: 17EE71F6634E381D
23 changed files with 55 additions and 45 deletions

View File

@ -54,7 +54,7 @@ android {
dimension "version"
}
fdroidmain {
lite {
dimension "version"
}
}
@ -72,8 +72,8 @@ android {
java.srcDirs = ['src/main/java/', 'src/apiKey/java/', 'src/fdroid/java/']
}
fdroidmain {
java.srcDirs = ['src/main/java/', 'src/fdroidmain/java/']
lite {
java.srcDirs = ['src/main/java/', 'src/lite/java/']
}
}
packagingOptions {

View File

@ -85,7 +85,7 @@ android {
dimension "version"
}
fdroidmain {
lite {
dimension "version"
applicationIdSuffix ".lite"
@ -103,11 +103,11 @@ android {
}
fdroid {
java.srcDirs = ['src/main/java/', 'src/apiKey/java/', 'src/fdroid/java/', 'src/fdroidAndfdroidmain/java/']
java.srcDirs = ['src/main/java/', 'src/apiKey/java/', 'src/fdroid/java/', 'src/fdroidAndLite/java/']
}
fdroidmain {
java.srcDirs = ['src/main/java/', 'src/fdroidmain/java/', 'src/fdroidAndfdroidmain/java/']
lite {
java.srcDirs = ['src/main/java/', 'src/lite/java/', 'src/fdroidAndLite/java/']
}
}
packagingOptions {

View File

@ -51,7 +51,7 @@ class CryptomatorApp : MultiDexApplication(), HasComponent<ApplicationComponent>
"fdroid" -> {
"F-Droid Edition"
}
"fdroidmain" -> {
"lite" -> {
"F-Droid Main Repo Edition"
}
else -> "Google Play Edition"

View File

@ -39,7 +39,7 @@ class ChooseCloudServicePresenter @Inject constructor( //
if (BuildConfig.FLAVOR == "fdroid") {
cloudTypeModels.remove(CloudTypeModel.GOOGLE_DRIVE)
} else if (BuildConfig.FLAVOR == "fdroidmain") {
} else if (BuildConfig.FLAVOR == "lite") {
cloudTypeModels.remove(CloudTypeModel.GOOGLE_DRIVE)
cloudTypeModels.remove(CloudTypeModel.DROPBOX)
cloudTypeModels.remove(CloudTypeModel.ONEDRIVE)
@ -94,8 +94,8 @@ class ChooseCloudServicePresenter @Inject constructor( //
finishWithResult(cloudModelMapper.toModel(cloud))
}
fun showCloudMissingSnackbarHintInFDroidMainVariant() {
if (BuildConfig.FLAVOR == "fdroidmain") {
fun showCloudMissingSnackbarHintInLiteVariant() {
if (BuildConfig.FLAVOR == "lite") {
view?.showSnackbar(R.string.snack_bar_cryptomator_variants_hint, object: SnackbarAction {
override fun onClick(v: View?) {
startIntent(Intents.cryptomatorVariantsIntent())

View File

@ -140,11 +140,11 @@ class CloudSettingsPresenter @Inject constructor( //
it.add(aS3Cloud())
it.add(aLocalCloud())
}
.filter { cloud -> !(BuildConfig.FLAVOR == "fdroidmain" && excludeApiCloudsInFdroidMain(cloud.cloudType())) } //
.filter { cloud -> !(BuildConfig.FLAVOR == "lite" && excludeApiCloudsInLite(cloud.cloudType())) } //
view?.render(cloudModel)
}
private fun excludeApiCloudsInFdroidMain(cloudType: CloudTypeModel): Boolean {
private fun excludeApiCloudsInLite(cloudType: CloudTypeModel): Boolean {
return when (cloudType) {
CloudTypeModel.GOOGLE_DRIVE -> {
true

View File

@ -84,7 +84,7 @@ class SettingsPresenter @Inject internal constructor(
"fdroid" -> {
"F-Droid"
}
"fdroidmain" -> {
"lite" -> {
"F-Droid Main Repo Edition"
}
else -> "Google Play"

View File

@ -123,7 +123,7 @@ class VaultListPresenter @Inject constructor( //
}
private fun checkLicense() {
if (BuildConfig.FLAVOR == "apkstore" || BuildConfig.FLAVOR == "fdroid" || BuildConfig.FLAVOR == "fdroidmain") {
if (BuildConfig.FLAVOR == "apkstore" || BuildConfig.FLAVOR == "fdroid" || BuildConfig.FLAVOR == "lite") {
licenseCheckUseCase //
.withLicense("") //
.run(object : NoOpResultHandler<LicenseCheck>() {

View File

@ -7,12 +7,12 @@ import org.cryptomator.presentation.ui.activity.view.CryptomatorVariantsView
import javax.inject.Inject
import kotlinx.android.synthetic.main.activity_cryptomator_variants.btnAddRepo
import kotlinx.android.synthetic.main.activity_cryptomator_variants.btnInstallFDroidVariant
import kotlinx.android.synthetic.main.activity_cryptomator_variants.btnInstallMainFDroidVariant
import kotlinx.android.synthetic.main.activity_cryptomator_variants.btnInstallLiteVariant
import kotlinx.android.synthetic.main.activity_cryptomator_variants.btnInstallWebsiteVariant
import kotlinx.android.synthetic.main.activity_cryptomator_variants.tvFdroidCustomSupported
import kotlinx.android.synthetic.main.activity_cryptomator_variants.tvFdroidCustomUnsupported
import kotlinx.android.synthetic.main.activity_cryptomator_variants.tvFdroidMainSupported
import kotlinx.android.synthetic.main.activity_cryptomator_variants.tvFdroidMainUnsupported
import kotlinx.android.synthetic.main.activity_cryptomator_variants.tvLiteSupported
import kotlinx.android.synthetic.main.activity_cryptomator_variants.tvLiteUnsupported
import kotlinx.android.synthetic.main.activity_cryptomator_variants.tvWebsiteSupported
import kotlinx.android.synthetic.main.toolbar_layout.toolbar
@ -26,15 +26,15 @@ class CryptomatorVariantsActivity : BaseActivity(), CryptomatorVariantsView {
toolbar.title = getString(R.string.screen_cryptomator_variants_title)
setSupportActionBar(toolbar)
tvFdroidMainSupported.text = "WebDAV, S3, Local Storage"
tvFdroidMainUnsupported.text = "Dropbox, Google Drive, OneDrive, pCloud"
tvLiteSupported.text = "WebDAV, S3, Local Storage"
tvLiteUnsupported.text = "Dropbox, Google Drive, OneDrive, pCloud"
tvFdroidCustomSupported.text = "Dropbox, OneDrive, pCloud, WebDAV, S3, Local Storage"
tvFdroidCustomUnsupported.text = "Google Drive"
tvWebsiteSupported.text = "Dropbox, Google Drive, OneDrive, pCloud, WebDAV, S3, Local Storage"
btnInstallMainFDroidVariant.setOnClickListener {
btnInstallLiteVariant.setOnClickListener {
presenter.onInstallMainFDroidVariantClicked()
}
btnAddRepo.setOnClickListener {

View File

@ -27,7 +27,7 @@ class ChooseCloudServiceFragment : BaseFragment() {
override fun setupView() {
setupRecyclerView()
chooseCloudServicePresenter.showCloudMissingSnackbarHintInFDroidMainVariant()
chooseCloudServicePresenter.showCloudMissingSnackbarHintInLiteVariant()
}
fun render(cloudModels: List<CloudTypeModel>?) {

View File

@ -184,7 +184,7 @@ class SettingsFragment : PreferenceFragmentCompat() {
(findPreference(SharedPreferencesHandler.MAIL) as Preference?)?.title = format(getString(R.string.screen_settings_license_mail), sharedPreferencesHandler.mail())
setupUpdateCheck()
}
"fdroid", "fdroidmain" -> {
"fdroid", "lite" -> {
(findPreference(SharedPreferencesHandler.MAIL) as Preference?)?.title = format(getString(R.string.screen_settings_license_mail), sharedPreferencesHandler.mail())
removeUpdateCheck()
}

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="84dp"
android:height="84dp"
android:viewportWidth="56"
android:viewportHeight="56">
<path
android:fillColor="#49b04a"
android:fillType="evenOdd"
android:pathData="m28,56a28,28 0,1 1,28 -28,28 28,0 0,1 -28,28zM28,4a24,24 0,1 0,24 24,24 24,0 0,0 -24,-24zM28,19.629 L19,25.251 10,19.629 19,14.006 28,19.628 37,14.006 46,19.629 37,25.251zM28,30.874 L37,25.252 46,30.874 37,36.5 28,30.878 19,36.5 10,30.878 19,25.256zM37,38.374 L28,44 19,38.378 28,32.755z" />
</vector>

View File

@ -92,7 +92,7 @@
android:layout_alignParentBottom="true"
android:background="@color/list_divider" />
<!-- <f-droid-main> -->
<!-- <lite> -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -100,18 +100,18 @@
android:paddingBottom="16dp">
<TextView
android:id="@+id/tvFdroidMainTitle"
android:id="@+id/tvLiteTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/screen_cryptomator_variants_fdroid_main_title"
android:text="@string/screen_cryptomator_variants_lite_title"
android:textColor="@color/colorPrimary"
android:textSize="16sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tvFdroidMainTitle"
android:layout_toLeftOf="@id/btnInstallMainFDroidVariant"
android:layout_below="@+id/tvLiteTitle"
android:layout_toLeftOf="@id/btnInstallLiteVariant"
android:orientation="vertical">
<RelativeLayout
@ -121,17 +121,17 @@
android:foreground="@drawable/item_browse_files_node_selector">
<ImageView
android:id="@+id/supportedMainRepoIcon"
android:id="@+id/supportedLiteRepoIcon"
android:layout_width="@dimen/thumbnail_size"
android:layout_height="@dimen/thumbnail_size"
android:src="@drawable/ic_done_gray" />
<TextView
android:id="@+id/tvFdroidMainSupported"
android:id="@+id/tvLiteSupported"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@id/supportedMainRepoIcon" />
android:layout_toRightOf="@id/supportedLiteRepoIcon" />
</RelativeLayout>
@ -142,39 +142,39 @@
android:foreground="@drawable/item_browse_files_node_selector">
<ImageView
android:id="@+id/unsupportedMainRepoIcon"
android:id="@+id/unsupportedLiteRepoIcon"
android:layout_width="@dimen/thumbnail_size"
android:layout_height="@dimen/thumbnail_size"
android:src="@drawable/ic_clear_gray" />
<TextView
android:id="@+id/tvFdroidMainUnsupported"
android:id="@+id/tvLiteUnsupported"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@id/unsupportedMainRepoIcon"/>
android:layout_toRightOf="@id/unsupportedLiteRepoIcon" />
</RelativeLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/screen_cryptomator_variants_fdroid_main_description" />
android:text="@string/screen_cryptomator_variants_lite_description" />
</LinearLayout>
<Button
android:id="@+id/btnInstallMainFDroidVariant"
android:id="@+id/btnInstallLiteVariant"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="@drawable/primary_button_selector"
android:text="@string/screen_cryptomator_variants_fdroid_main_install"
android:text="@string/screen_cryptomator_variants_lite_install"
android:textColor="@color/textColorWhite" />
</RelativeLayout>
<!-- </f-droid-main> -->
<!-- </lite> -->
<TextView
android:layout_width="match_parent"
@ -199,7 +199,7 @@
android:foreground="@drawable/item_browse_files_node_selector">
<ImageView
android:id="@+id/supportedMainCloudsIcon"
android:id="@+id/supportedFdroidCloudsIcon"
android:layout_width="@dimen/thumbnail_size"
android:layout_height="@dimen/thumbnail_size"
android:src="@drawable/ic_done_gray" />
@ -209,7 +209,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@id/supportedMainCloudsIcon" />
android:layout_toRightOf="@id/supportedFdroidCloudsIcon" />
</RelativeLayout>
<RelativeLayout

View File

@ -309,18 +309,18 @@
<!-- ## screen: cryptomator app variants -->
<string name="screen_cryptomator_variants_title">Variants of Cryptomator</string>
<string name="screen_cryptomator_variants_fdroid_main_title">Main F-Droid Repository</string>
<string name="screen_cryptomator_variants_fdroid_main_description">Excluded because they require API keys.</string>
<string name="screen_cryptomator_variants_fdroid_main_install">Install</string>
<string name="screen_cryptomator_variants_lite_title">Main F-Droid Repository</string>
<string name="screen_cryptomator_variants_lite_description">Excluded because they require API keys.</string>
<string name="screen_cryptomator_variants_lite_install">Install</string>
<string name="screen_cryptomator_variants_fdroid_title">Cryptomator F-Droid Repository</string>
<string name="screen_cryptomator_variants_fdroid_description">Excluded because it contains proprietary dependencies.</string>
<string name="screen_cryptomator_variants_fdroid_add_repo_hint">Add Cryptomator repository to the F-Droid app.</string>
<string name="screen_cryptomator_variants_fdroid_add_repo">Add</string>
<string name="screen_cryptomator_variants_fdroid_install_hint">Install Cryptomator using F-Droid.\nIf a not found error is displayed, wait until the F-Droid synchronisation is finished.</string>
<string name="screen_cryptomator_variants_fdroid_install" translatable="false">@string/screen_cryptomator_variants_fdroid_main_install</string>
<string name="screen_cryptomator_variants_fdroid_install" translatable="false">@string/screen_cryptomator_variants_lite_install</string>
<string name="screen_cryptomator_variants_website_title">Website</string>
<string name="screen_cryptomator_variants_website_description">Contains proprietary dependencies.</string>
<string name="screen_cryptomator_variants_website_install" translatable="false">@string/screen_cryptomator_variants_fdroid_main_install</string>
<string name="screen_cryptomator_variants_website_install" translatable="false">@string/screen_cryptomator_variants_lite_install</string>
<string name="screen_cryptomator_variants_installation_hint">Switching from or to the Main F-Droid repository variant requires a fresh setup of the app.</string>
<!-- # dialogs -->