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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -27,7 +27,7 @@ class ChooseCloudServiceFragment : BaseFragment() {
override fun setupView() { override fun setupView() {
setupRecyclerView() setupRecyclerView()
chooseCloudServicePresenter.showCloudMissingSnackbarHintInFDroidMainVariant() chooseCloudServicePresenter.showCloudMissingSnackbarHintInLiteVariant()
} }
fun render(cloudModels: List<CloudTypeModel>?) { 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()) (findPreference(SharedPreferencesHandler.MAIL) as Preference?)?.title = format(getString(R.string.screen_settings_license_mail), sharedPreferencesHandler.mail())
setupUpdateCheck() setupUpdateCheck()
} }
"fdroid", "fdroidmain" -> { "fdroid", "lite" -> {
(findPreference(SharedPreferencesHandler.MAIL) as Preference?)?.title = format(getString(R.string.screen_settings_license_mail), sharedPreferencesHandler.mail()) (findPreference(SharedPreferencesHandler.MAIL) as Preference?)?.title = format(getString(R.string.screen_settings_license_mail), sharedPreferencesHandler.mail())
removeUpdateCheck() 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:layout_alignParentBottom="true"
android:background="@color/list_divider" /> android:background="@color/list_divider" />
<!-- <f-droid-main> --> <!-- <lite> -->
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -100,18 +100,18 @@
android:paddingBottom="16dp"> android:paddingBottom="16dp">
<TextView <TextView
android:id="@+id/tvFdroidMainTitle" android:id="@+id/tvLiteTitle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" 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:textColor="@color/colorPrimary"
android:textSize="16sp" /> android:textSize="16sp" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tvFdroidMainTitle" android:layout_below="@+id/tvLiteTitle"
android:layout_toLeftOf="@id/btnInstallMainFDroidVariant" android:layout_toLeftOf="@id/btnInstallLiteVariant"
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout <RelativeLayout
@ -121,17 +121,17 @@
android:foreground="@drawable/item_browse_files_node_selector"> android:foreground="@drawable/item_browse_files_node_selector">
<ImageView <ImageView
android:id="@+id/supportedMainRepoIcon" android:id="@+id/supportedLiteRepoIcon"
android:layout_width="@dimen/thumbnail_size" android:layout_width="@dimen/thumbnail_size"
android:layout_height="@dimen/thumbnail_size" android:layout_height="@dimen/thumbnail_size"
android:src="@drawable/ic_done_gray" /> android:src="@drawable/ic_done_gray" />
<TextView <TextView
android:id="@+id/tvFdroidMainSupported" android:id="@+id/tvLiteSupported"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_toRightOf="@id/supportedMainRepoIcon" /> android:layout_toRightOf="@id/supportedLiteRepoIcon" />
</RelativeLayout> </RelativeLayout>
@ -142,39 +142,39 @@
android:foreground="@drawable/item_browse_files_node_selector"> android:foreground="@drawable/item_browse_files_node_selector">
<ImageView <ImageView
android:id="@+id/unsupportedMainRepoIcon" android:id="@+id/unsupportedLiteRepoIcon"
android:layout_width="@dimen/thumbnail_size" android:layout_width="@dimen/thumbnail_size"
android:layout_height="@dimen/thumbnail_size" android:layout_height="@dimen/thumbnail_size"
android:src="@drawable/ic_clear_gray" /> android:src="@drawable/ic_clear_gray" />
<TextView <TextView
android:id="@+id/tvFdroidMainUnsupported" android:id="@+id/tvLiteUnsupported"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_toRightOf="@id/unsupportedMainRepoIcon"/> android:layout_toRightOf="@id/unsupportedLiteRepoIcon" />
</RelativeLayout> </RelativeLayout>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/screen_cryptomator_variants_fdroid_main_description" /> android:text="@string/screen_cryptomator_variants_lite_description" />
</LinearLayout> </LinearLayout>
<Button <Button
android:id="@+id/btnInstallMainFDroidVariant" android:id="@+id/btnInstallLiteVariant"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:background="@drawable/primary_button_selector" 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" /> android:textColor="@color/textColorWhite" />
</RelativeLayout> </RelativeLayout>
<!-- </f-droid-main> --> <!-- </lite> -->
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -199,7 +199,7 @@
android:foreground="@drawable/item_browse_files_node_selector"> android:foreground="@drawable/item_browse_files_node_selector">
<ImageView <ImageView
android:id="@+id/supportedMainCloudsIcon" android:id="@+id/supportedFdroidCloudsIcon"
android:layout_width="@dimen/thumbnail_size" android:layout_width="@dimen/thumbnail_size"
android:layout_height="@dimen/thumbnail_size" android:layout_height="@dimen/thumbnail_size"
android:src="@drawable/ic_done_gray" /> android:src="@drawable/ic_done_gray" />
@ -209,7 +209,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_toRightOf="@id/supportedMainCloudsIcon" /> android:layout_toRightOf="@id/supportedFdroidCloudsIcon" />
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout

View File

@ -309,18 +309,18 @@
<!-- ## screen: cryptomator app variants --> <!-- ## screen: cryptomator app variants -->
<string name="screen_cryptomator_variants_title">Variants of Cryptomator</string> <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_lite_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_lite_description">Excluded because they require API keys.</string>
<string name="screen_cryptomator_variants_fdroid_main_install">Install</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_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_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_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_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_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_title">Website</string>
<string name="screen_cryptomator_variants_website_description">Contains proprietary dependencies.</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> <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 --> <!-- # dialogs -->