Skip to content

Commit

Permalink
Merge branch 'release/1.11.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
SailReal committed Jan 24, 2025
2 parents 58e97cb + 56e7151 commit 0af633c
Show file tree
Hide file tree
Showing 67 changed files with 233 additions and 83 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ gem "fastlane"
gem "net-sftp"
gem "ed25519"
gem "bcrypt_pbkdf"
gem 'fastlane-plugin-bundletool'

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ GEM
apktools (~> 0.7)
aws-sdk-s3 (~> 1)
mime-types (~> 3.3)
fastlane-plugin-bundletool (1.1.0)
fastlane-plugin-get_version_name (0.2.2)
fastlane-sirp (1.0.0)
sysrandom (~> 1.0)
Expand Down Expand Up @@ -236,6 +237,7 @@ DEPENDENCIES
ed25519
fastlane
fastlane-plugin-aws_s3
fastlane-plugin-bundletool
fastlane-plugin-get_version_name
net-sftp

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![cryptomator-android](cryptomator-android.png)

[![Twitter](https://img.shields.io/badge/[email protected]?style=flat)](http://twitter.com/Cryptomator)
[![Mastodon](https://img.shields.io/mastodon/follow/176112?domain=mastodon.online&style=flat)](https://mastodon.online/@cryptomator)
[![Community](https://img.shields.io/badge/help-Community-orange.svg)](https://community.cryptomator.org)
[![Documentation](https://img.shields.io/badge/help-Docs-orange.svg)](https://docs.cryptomator.org)
[![Crowdin](https://badges.crowdin.net/cryptomator/localized.svg)](https://translate.cryptomator.org/)
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def getVersionCode = { ->
allprojects {
ext {
androidApplicationId = 'org.cryptomator'
androidVersionCode = 2971 // must be getVersionCode(). only at release tag set the actual value
androidVersionName = '1.10.4'
androidVersionCode = getVersionCode()
androidVersionName = '1.11.0'
}
repositories {
mavenCentral()
Expand Down
15 changes: 14 additions & 1 deletion data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ android {
lite {
dimension "version"
}

accrescent {
dimension "version"
}
}

sourceSets {
Expand All @@ -68,12 +72,16 @@ android {
}

fdroid {
java.srcDirs = ['src/main/java/', 'src/apiKey/java/', 'src/fdroid/java/']
java.srcDirs = ['src/main/java/', 'src/apiKey/java/', 'src/fdroidAccrescent/java/']
}

lite {
java.srcDirs = ['src/main/java/', 'src/lite/java/']
}

accrescent {
java.srcDirs = ['src/main/java/', 'src/apiKey/java/', 'src/fdroidAccrescent/java/']
}
}
packagingOptions {
resources {
Expand Down Expand Up @@ -106,6 +114,7 @@ dependencies {
playstoreImplementation dependencies.pcloud
apkstoreImplementation dependencies.pcloud
fdroidImplementation dependencies.pcloud
accrescentImplementation dependencies.pcloud

coreLibraryDesugaring dependencies.coreDesugaring

Expand All @@ -127,14 +136,18 @@ dependencies {
apkstoreImplementation dependencies.dropboxAndroid
fdroidImplementation dependencies.dropboxCore
fdroidImplementation dependencies.dropboxAndroid
accrescentImplementation dependencies.dropboxCore
accrescentImplementation dependencies.dropboxAndroid


playstoreImplementation dependencies.msgraphAuth
apkstoreImplementation dependencies.msgraphAuth
fdroidImplementation dependencies.msgraphAuth
accrescentImplementation dependencies.msgraphAuth
playstoreImplementation dependencies.msgraph
apkstoreImplementation dependencies.msgraph
fdroidImplementation dependencies.msgraph
accrescentImplementation dependencies.msgraph

implementation dependencies.stax
api dependencies.minIo
Expand Down
36 changes: 36 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ platform :android do |options|
deployToServer(alpha:options[:alpha], beta:options[:beta])
deployToFDroid(alpha:options[:alpha], beta:options[:beta])
deployLite(alpha:options[:alpha], beta:options[:beta])
deployToAccrescent(alpha:options[:alpha], beta:options[:beta])
createGitHubDraftRelease(alpha:options[:alpha], beta:options[:beta])

slack(
Expand Down Expand Up @@ -292,6 +293,41 @@ platform :android do |options|
FileUtils.cp(lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH], "release/Cryptomator-#{version}_fdroid_signed.apk")
end

desc "Deploy new version to Accrescent"
private_lane :deployToAccrescent do |options|
gradle(task: "clean")

gradle(
task: "bundle",
build_type: "Release",
flavor: "accrescent",
print_command: false,
properties: {
"android.injected.signing.store.file" => ENV["SIGNING_KEYSTORE_PATH"],
"android.injected.signing.store.password" => ENV["SIGNING_KEYSTORE_PASSWORD"],
"android.injected.signing.key.alias" => ENV["SIGNING_KEY_ALIAS"],
"android.injected.signing.key.password" => ENV["SIGNING_KEY_PASSWORD"],
}
)

FileUtils.cp(lane_context[SharedValues::GRADLE_AAB_OUTPUT_PATH], "release/Cryptomator-#{version}_signed.aab")

bundletool(
ks_path: ENV["SIGNING_KEYSTORE_PATH"],
ks_password: ENV["SIGNING_KEYSTORE_PASSWORD"],
ks_key_alias: ENV["SIGNING_KEY_ALIAS"],
ks_key_alias_password: ENV["SIGNING_KEY_PASSWORD"],
bundletool_version: '1.10.0',
aab_path: lane_context[SharedValues::GRADLE_AAB_OUTPUT_PATH],
apk_output_path: "fastlane/release/Cryptomator-#{version}_signed.apks",
verbose: true,
cache_path: "~/.cache/bundletool",
universal_apk: false
)

puts "Upload fastlane/release/Cryptomator-#{version}_signed.apks to Accrescent"
end

desc "Deploy new lite version"
private_lane :deployLite do |options|
sh("docker build -t cryptomator-android ../buildsystem")
Expand Down
16 changes: 14 additions & 2 deletions presentation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ android {
applicationIdSuffix ".lite"
resValue "string", "app_id", androidApplicationId + applicationIdSuffix
}

accrescent {
dimension "version"
}
}

sourceSets {
Expand All @@ -116,11 +120,15 @@ android {
}

fdroid {
java.srcDirs = ['src/main/java/', 'src/apiKey/java/', 'src/fdroid/java/', 'src/fdroidAndLite/java/']
java.srcDirs = ['src/main/java/', 'src/apiKey/java/', 'src/fdroid/java/', 'src/fdroidLiteAccrescent/java/']
}

lite {
java.srcDirs = ['src/main/java/', 'src/lite/java/', 'src/fdroidAndLite/java/']
java.srcDirs = ['src/main/java/', 'src/lite/java/', 'src/fdroidLiteAccrescent/java/']
}

accrescent {
java.srcDirs = ['src/main/java/', 'src/apiKey/java/', 'src/accrescent/java/', 'src/fdroidLiteAccrescent/java/']
}
}

Expand Down Expand Up @@ -184,13 +192,17 @@ dependencies {
apkstoreImplementation dependencies.dropboxAndroid
fdroidImplementation dependencies.dropboxCore
fdroidImplementation dependencies.dropboxAndroid
accrescentImplementation dependencies.dropboxCore
accrescentImplementation dependencies.dropboxAndroid

playstoreImplementation dependencies.msgraphAuth
apkstoreImplementation dependencies.msgraphAuth
fdroidImplementation dependencies.msgraphAuth
accrescentImplementation dependencies.msgraphAuth
playstoreImplementation dependencies.msgraph
apkstoreImplementation dependencies.msgraph
fdroidImplementation dependencies.msgraph
accrescentImplementation dependencies.msgraph

playstoreImplementation(dependencies.googleApiServicesDrive) {
exclude module: 'guava-jdk5'
Expand Down
39 changes: 39 additions & 0 deletions presentation/src/accrescent/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<!-- Keep in sync with apkstore, playstore and fdroid -->
<application>
<activity
android:name="com.dropbox.core.android.AuthActivity"
android:configChanges="orientation|keyboard"
android:exported="true"
android:launchMode="singleTask">
<intent-filter>
<data android:scheme="db-${DROPBOX_API_KEY}" />

<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<activity
android:name="com.microsoft.identity.client.BrowserTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="org.cryptomator"
android:path="/${ONEDRIVE_API_KEY_DECODED}"
android:scheme="msauth" />
</intent-filter>
</activity>

</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class CryptomatorApp : MultiDexApplication(), HasComponent<ApplicationComponent>
"apkstore" -> "APK Store Edition"
"fdroid" -> "F-Droid Edition"
"lite" -> "F-Droid Main Repo Edition"
"accrescent" -> "Accrescent Edition"
else -> "Google Play Edition"
}
Timber.tag("App").i(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ChooseCloudServicePresenter @Inject constructor( //
val cloudTypeModels: MutableList<CloudTypeModel> = ArrayList(listOf(*CloudTypeModel.values()))
cloudTypeModels.remove(CloudTypeModel.CRYPTO)

if (BuildConfig.FLAVOR == "fdroid") {
if (BuildConfig.FLAVOR == "fdroid" || BuildConfig.FLAVOR == "accrescent") {
cloudTypeModels.remove(CloudTypeModel.GOOGLE_DRIVE)
} else if (BuildConfig.FLAVOR == "lite") {
cloudTypeModels.remove(CloudTypeModel.GOOGLE_DRIVE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class CloudSettingsPresenter @Inject constructor( //
override fun onSuccess(clouds: List<Cloud>) {
val cloudModel = cloudModelMapper.toModels(clouds) //
.filter { isSingleLoginCloud(it) } //
.filter { cloud -> !(BuildConfig.FLAVOR == "fdroid" && cloud.cloudType() == CloudTypeModel.GOOGLE_DRIVE) } //
.filter { cloud -> !((BuildConfig.FLAVOR == "fdroid" || BuildConfig.FLAVOR == "accrescent") && cloud.cloudType() == CloudTypeModel.GOOGLE_DRIVE) } //
.toMutableList() //
.also {
it.add(aOnedriveCloud())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ class SettingsPresenter @Inject internal constructor(
"F-Droid"
}
"lite" -> {
"F-Droid Main Repo Edition"
"F-Droid Main Repo"
}
"accrescent" -> {
"Accrescent"
}
else -> "Google Play"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class VaultListPresenter @Inject constructor( //
}

private fun checkLicense() {
if (BuildConfig.FLAVOR == "apkstore" || BuildConfig.FLAVOR == "fdroid" || BuildConfig.FLAVOR == "lite") {
if (BuildConfig.FLAVOR == "apkstore" || BuildConfig.FLAVOR == "fdroid" || BuildConfig.FLAVOR == "lite" || BuildConfig.FLAVOR == "accrescent") {
licenseCheckUseCase //
.withLicense("") //
.run(object : NoOpResultHandler<LicenseCheck>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class SettingsFragment : PreferenceFragmentCompat() {
(findPreference(SharedPreferencesHandler.MAIL) as Preference?)?.title = format(getString(R.string.screen_settings_license_mail), sharedPreferencesHandler.mail())
setupUpdateCheck()
}
"fdroid", "lite" -> {
"fdroid", "lite", "accrescent" -> {
(findPreference(SharedPreferencesHandler.MAIL) as Preference?)?.title = format(getString(R.string.screen_settings_license_mail), sharedPreferencesHandler.mail())
removeUpdateCheck()
}
Expand Down Expand Up @@ -215,7 +215,7 @@ class SettingsFragment : PreferenceFragmentCompat() {
}

private fun setupCryptomatorVariants() {
if (BuildConfig.FLAVOR == "playstore") {
if (BuildConfig.FLAVOR == "playstore" || BuildConfig.FLAVOR == "accrescent") {
(findPreference(CRYPTOMATOR_VARIANTS) as Preference?)?.let { preference ->
(findPreference(getString(R.string.screen_settings_section_general)) as PreferenceCategory?)?.removePreference(preference)
}
Expand Down
Loading

0 comments on commit 0af633c

Please sign in to comment.