diff --git a/data/build.gradle b/data/build.gradle index bbd9f47e..0e62cde7 100644 --- a/data/build.gradle +++ b/data/build.gradle @@ -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 { diff --git a/data/src/fdroidmain/java/org/cryptomator/data/cloud/CloudContentRepositoryFactories.java b/data/src/lite/java/org/cryptomator/data/cloud/CloudContentRepositoryFactories.java similarity index 100% rename from data/src/fdroidmain/java/org/cryptomator/data/cloud/CloudContentRepositoryFactories.java rename to data/src/lite/java/org/cryptomator/data/cloud/CloudContentRepositoryFactories.java diff --git a/presentation/build.gradle b/presentation/build.gradle index 705fd4c3..60b64a04 100644 --- a/presentation/build.gradle +++ b/presentation/build.gradle @@ -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 { diff --git a/presentation/src/fdroidAndfdroidmain/java/org/cryptomator/presentation/presenter/GoogleAuthHelper.kt b/presentation/src/fdroidAndLite/java/org/cryptomator/presentation/presenter/GoogleAuthHelper.kt similarity index 100% rename from presentation/src/fdroidAndfdroidmain/java/org/cryptomator/presentation/presenter/GoogleAuthHelper.kt rename to presentation/src/fdroidAndLite/java/org/cryptomator/presentation/presenter/GoogleAuthHelper.kt diff --git a/presentation/src/fdroidmain/AndroidManifest.xml b/presentation/src/lite/AndroidManifest.xml similarity index 100% rename from presentation/src/fdroidmain/AndroidManifest.xml rename to presentation/src/lite/AndroidManifest.xml diff --git a/presentation/src/fdroidmain/java/org/cryptomator/presentation/presenter/DropboxAuthHelper.kt b/presentation/src/lite/java/org/cryptomator/presentation/presenter/DropboxAuthHelper.kt similarity index 100% rename from presentation/src/fdroidmain/java/org/cryptomator/presentation/presenter/DropboxAuthHelper.kt rename to presentation/src/lite/java/org/cryptomator/presentation/presenter/DropboxAuthHelper.kt diff --git a/presentation/src/fdroidmain/java/org/cryptomator/presentation/presenter/OnedriveAuthentication.kt b/presentation/src/lite/java/org/cryptomator/presentation/presenter/OnedriveAuthentication.kt similarity index 100% rename from presentation/src/fdroidmain/java/org/cryptomator/presentation/presenter/OnedriveAuthentication.kt rename to presentation/src/lite/java/org/cryptomator/presentation/presenter/OnedriveAuthentication.kt diff --git a/presentation/src/fdroidmain/res/drawable/ic_launcher_foreground.xml b/presentation/src/lite/res/drawable/ic_launcher_foreground.xml similarity index 100% rename from presentation/src/fdroidmain/res/drawable/ic_launcher_foreground.xml rename to presentation/src/lite/res/drawable/ic_launcher_foreground.xml diff --git a/presentation/src/fdroidmain/res/mipmap-anydpi-v26/ic_launcher.xml b/presentation/src/lite/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from presentation/src/fdroidmain/res/mipmap-anydpi-v26/ic_launcher.xml rename to presentation/src/lite/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/presentation/src/fdroidmain/res/values/ic_launcher_background.xml b/presentation/src/lite/res/values/ic_launcher_background.xml similarity index 100% rename from presentation/src/fdroidmain/res/values/ic_launcher_background.xml rename to presentation/src/lite/res/values/ic_launcher_background.xml diff --git a/presentation/src/fdroidmainDebug/res/mipmap-anydpi-v26/ic_launcher.xml b/presentation/src/liteDebug/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from presentation/src/fdroidmainDebug/res/mipmap-anydpi-v26/ic_launcher.xml rename to presentation/src/liteDebug/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/presentation/src/fdroidmainDebug/res/values/ic_launcher_background.xml b/presentation/src/liteDebug/res/values/ic_launcher_background.xml similarity index 100% rename from presentation/src/fdroidmainDebug/res/values/ic_launcher_background.xml rename to presentation/src/liteDebug/res/values/ic_launcher_background.xml diff --git a/presentation/src/main/java/org/cryptomator/presentation/CryptomatorApp.kt b/presentation/src/main/java/org/cryptomator/presentation/CryptomatorApp.kt index fc01215c..7ed6021c 100644 --- a/presentation/src/main/java/org/cryptomator/presentation/CryptomatorApp.kt +++ b/presentation/src/main/java/org/cryptomator/presentation/CryptomatorApp.kt @@ -51,7 +51,7 @@ class CryptomatorApp : MultiDexApplication(), HasComponent "fdroid" -> { "F-Droid Edition" } - "fdroidmain" -> { + "lite" -> { "F-Droid Main Repo Edition" } else -> "Google Play Edition" diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/ChooseCloudServicePresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/ChooseCloudServicePresenter.kt index e1d14874..3b2a5d4c 100644 --- a/presentation/src/main/java/org/cryptomator/presentation/presenter/ChooseCloudServicePresenter.kt +++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/ChooseCloudServicePresenter.kt @@ -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()) diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudSettingsPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudSettingsPresenter.kt index c6fa6263..5607f424 100644 --- a/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudSettingsPresenter.kt +++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudSettingsPresenter.kt @@ -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 diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/SettingsPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/SettingsPresenter.kt index 42cd0395..f8c10768 100644 --- a/presentation/src/main/java/org/cryptomator/presentation/presenter/SettingsPresenter.kt +++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/SettingsPresenter.kt @@ -84,7 +84,7 @@ class SettingsPresenter @Inject internal constructor( "fdroid" -> { "F-Droid" } - "fdroidmain" -> { + "lite" -> { "F-Droid Main Repo Edition" } else -> "Google Play" diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/VaultListPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/VaultListPresenter.kt index 92d50204..f30cfed6 100644 --- a/presentation/src/main/java/org/cryptomator/presentation/presenter/VaultListPresenter.kt +++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/VaultListPresenter.kt @@ -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() { diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/CryptomatorVariantsActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/CryptomatorVariantsActivity.kt index ee522807..97eedf54 100644 --- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/CryptomatorVariantsActivity.kt +++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/CryptomatorVariantsActivity.kt @@ -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 { diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/fragment/ChooseCloudServiceFragment.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/fragment/ChooseCloudServiceFragment.kt index efe4bb46..31d5ec57 100644 --- a/presentation/src/main/java/org/cryptomator/presentation/ui/fragment/ChooseCloudServiceFragment.kt +++ b/presentation/src/main/java/org/cryptomator/presentation/ui/fragment/ChooseCloudServiceFragment.kt @@ -27,7 +27,7 @@ class ChooseCloudServiceFragment : BaseFragment() { override fun setupView() { setupRecyclerView() - chooseCloudServicePresenter.showCloudMissingSnackbarHintInFDroidMainVariant() + chooseCloudServicePresenter.showCloudMissingSnackbarHintInLiteVariant() } fun render(cloudModels: List?) { diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/fragment/SettingsFragment.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/fragment/SettingsFragment.kt index f25e132f..528fa65f 100644 --- a/presentation/src/main/java/org/cryptomator/presentation/ui/fragment/SettingsFragment.kt +++ b/presentation/src/main/java/org/cryptomator/presentation/ui/fragment/SettingsFragment.kt @@ -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() } diff --git a/presentation/src/main/res/drawable/ic_dropbox_vault.xml b/presentation/src/main/res/drawable/ic_dropbox_vault.xml new file mode 100644 index 00000000..5cac58fa --- /dev/null +++ b/presentation/src/main/res/drawable/ic_dropbox_vault.xml @@ -0,0 +1,10 @@ + + + diff --git a/presentation/src/main/res/layout/activity_cryptomator_variants.xml b/presentation/src/main/res/layout/activity_cryptomator_variants.xml index 909c186f..20aa6339 100644 --- a/presentation/src/main/res/layout/activity_cryptomator_variants.xml +++ b/presentation/src/main/res/layout/activity_cryptomator_variants.xml @@ -92,7 +92,7 @@ android:layout_alignParentBottom="true" android:background="@color/list_divider" /> - + + android:layout_toRightOf="@id/supportedLiteRepoIcon" /> @@ -142,39 +142,39 @@ android:foreground="@drawable/item_browse_files_node_selector"> + android:layout_toRightOf="@id/unsupportedLiteRepoIcon" /> + android:text="@string/screen_cryptomator_variants_lite_description" />