diff --git a/.gitignore b/.gitignore index a18d2645..c4f61d1c 100644 --- a/.gitignore +++ b/.gitignore @@ -31,11 +31,6 @@ build/ local.properties # fastlane -secret_key_file.json -**/**/fastlane/fastlane/** -**/**/fastlane/metadata/** -**/**/fastlane/report.xml -**/**/fastlane/mappings/** -**/**/fastlane/release_notes/** -**/**/fastlane/latest_versions/** -.env.default +**/fastlane/.env +**/fastlane/metadata/**/images/** +**/fastlane/report.xml diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..448c34f4 --- /dev/null +++ b/Gemfile @@ -0,0 +1,9 @@ +source "https://rubygems.org" + +gem "fastlane" +gem "net-sftp" +gem "ed25519" +gem "bcrypt_pbkdf" + +plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') +eval_gemfile(plugins_path) if File.exist?(plugins_path) diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000..0e25b8aa --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,221 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.3) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + apktools (0.7.4) + rubyzip (~> 2.0) + artifactory (3.0.15) + atomos (0.1.3) + aws-eventstream (1.1.0) + aws-partitions (1.426.0) + aws-sdk-core (3.112.0) + aws-eventstream (~> 1, >= 1.0.2) + aws-partitions (~> 1, >= 1.239.0) + aws-sigv4 (~> 1.1) + jmespath (~> 1.0) + aws-sdk-kms (1.42.0) + aws-sdk-core (~> 3, >= 3.112.0) + aws-sigv4 (~> 1.1) + aws-sdk-s3 (1.88.0) + aws-sdk-core (~> 3, >= 3.112.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.1) + aws-sigv4 (1.2.2) + aws-eventstream (~> 1, >= 1.0.2) + babosa (1.0.4) + bcrypt_pbkdf (1.0.1) + claide (1.0.3) + colored (1.2) + colored2 (3.1.2) + commander-fastlane (4.4.6) + highline (~> 1.7.2) + declarative (0.0.20) + declarative-option (0.1.0) + digest-crc (0.6.3) + rake (>= 12.0.0, < 14.0.0) + domain_name (0.5.20190701) + unf (>= 0.0.5, < 1.0.0) + dotenv (2.7.6) + ed25519 (1.2.4) + emoji_regex (3.2.1) + excon (0.79.0) + faraday (1.3.0) + faraday-net_http (~> 1.0) + multipart-post (>= 1.2, < 3) + ruby2_keywords + faraday-cookie_jar (0.0.7) + faraday (>= 0.8.0) + http-cookie (~> 1.0.0) + faraday-net_http (1.0.1) + faraday_middleware (1.0.0) + faraday (~> 1.0) + fastimage (2.2.2) + fastlane (2.174.0) + CFPropertyList (>= 2.3, < 4.0.0) + addressable (>= 2.3, < 3.0.0) + artifactory (~> 3.0) + aws-sdk-s3 (~> 1.0) + babosa (>= 1.0.3, < 2.0.0) + bundler (>= 1.12.0, < 3.0.0) + colored + commander-fastlane (>= 4.4.6, < 5.0.0) + dotenv (>= 2.1.1, < 3.0.0) + emoji_regex (>= 0.1, < 4.0) + excon (>= 0.71.0, < 1.0.0) + faraday (~> 1.0) + faraday-cookie_jar (~> 0.0.6) + faraday_middleware (~> 1.0) + fastimage (>= 2.1.0, < 3.0.0) + gh_inspector (>= 1.1.2, < 2.0.0) + google-api-client (>= 0.37.0, < 0.39.0) + google-cloud-storage (>= 1.15.0, < 2.0.0) + highline (>= 1.7.2, < 2.0.0) + json (< 3.0.0) + jwt (>= 2.1.0, < 3) + mini_magick (>= 4.9.4, < 5.0.0) + multipart-post (~> 2.0.0) + plist (>= 3.1.0, < 4.0.0) + rubyzip (>= 2.0.0, < 3.0.0) + security (= 0.1.3) + simctl (~> 1.6.3) + slack-notifier (>= 2.0.0, < 3.0.0) + terminal-notifier (>= 2.0.0, < 3.0.0) + terminal-table (>= 1.4.5, < 2.0.0) + tty-screen (>= 0.6.3, < 1.0.0) + tty-spinner (>= 0.8.0, < 1.0.0) + word_wrap (~> 1.0.0) + xcodeproj (>= 1.13.0, < 2.0.0) + xcpretty (~> 0.3.0) + xcpretty-travis-formatter (>= 0.0.3) + fastlane-plugin-aws_s3 (1.8.0) + apktools (~> 0.7) + aws-sdk-s3 (~> 1) + mime-types (~> 3.3) + fastlane-plugin-get_version_name (0.2.2) + gh_inspector (1.1.3) + google-api-client (0.38.0) + addressable (~> 2.5, >= 2.5.1) + googleauth (~> 0.9) + httpclient (>= 2.8.1, < 3.0) + mini_mime (~> 1.0) + representable (~> 3.0) + retriable (>= 2.0, < 4.0) + signet (~> 0.12) + google-apis-core (0.2.1) + addressable (~> 2.5, >= 2.5.1) + googleauth (~> 0.14) + httpclient (>= 2.8.1, < 3.0) + mini_mime (~> 1.0) + representable (~> 3.0) + retriable (>= 2.0, < 4.0) + rexml + signet (~> 0.14) + webrick + google-apis-iamcredentials_v1 (0.1.0) + google-apis-core (~> 0.1) + google-apis-storage_v1 (0.2.0) + google-apis-core (~> 0.1) + google-cloud-core (1.5.0) + google-cloud-env (~> 1.0) + google-cloud-errors (~> 1.0) + google-cloud-env (1.4.0) + faraday (>= 0.17.3, < 2.0) + google-cloud-errors (1.0.1) + google-cloud-storage (1.30.0) + addressable (~> 2.5) + digest-crc (~> 0.4) + google-apis-iamcredentials_v1 (~> 0.1) + google-apis-storage_v1 (~> 0.1) + google-cloud-core (~> 1.2) + googleauth (~> 0.9) + mini_mime (~> 1.0) + googleauth (0.15.1) + faraday (>= 0.17.3, < 2.0) + jwt (>= 1.4, < 3.0) + memoist (~> 0.16) + multi_json (~> 1.11) + os (>= 0.9, < 2.0) + signet (~> 0.14) + highline (1.7.10) + http-cookie (1.0.3) + domain_name (~> 0.5) + httpclient (2.8.3) + jmespath (1.4.0) + json (2.5.1) + jwt (2.2.2) + memoist (0.16.2) + mime-types (3.3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2020.1104) + mini_magick (4.11.0) + mini_mime (1.0.2) + multi_json (1.15.0) + multipart-post (2.0.0) + nanaimo (0.3.0) + naturally (2.2.1) + net-sftp (2.1.2) + net-ssh (>= 2.6.5) + net-ssh (5.2.0) + os (1.1.1) + plist (3.6.0) + public_suffix (4.0.6) + rake (13.0.3) + representable (3.0.4) + declarative (< 0.1.0) + declarative-option (< 0.2.0) + uber (< 0.2.0) + retriable (3.1.2) + rexml (3.2.4) + rouge (2.0.7) + ruby2_keywords (0.0.4) + rubyzip (2.3.0) + security (0.1.3) + signet (0.14.1) + addressable (~> 2.3) + faraday (>= 0.17.3, < 2.0) + jwt (>= 1.5, < 3.0) + multi_json (~> 1.10) + simctl (1.6.8) + CFPropertyList + naturally + slack-notifier (2.3.2) + terminal-notifier (2.0.0) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + tty-cursor (0.7.1) + tty-screen (0.8.1) + tty-spinner (0.9.3) + tty-cursor (~> 0.7) + uber (0.1.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.7) + unicode-display_width (1.7.0) + webrick (1.7.0) + word_wrap (1.0.0) + xcodeproj (1.19.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.3.0) + xcpretty (0.3.0) + rouge (~> 2.0.7) + xcpretty-travis-formatter (1.0.1) + xcpretty (~> 0.2, >= 0.0.7) + +PLATFORMS + ruby + +DEPENDENCIES + bcrypt_pbkdf + ed25519 + fastlane + fastlane-plugin-aws_s3 + fastlane-plugin-get_version_name + net-sftp + +BUNDLED WITH + 2.2.5 diff --git a/README.md b/README.md index 48aafde9..303c40e3 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,42 @@ Please read our [contribution guide](.github/CONTRIBUTING.md), if you would like Help us keep Cryptomator open and inclusive. Please read and follow our [Code of Conduct](.github/CODE_OF_CONDUCT.md). +## Deployment + +Follow these steps to deploy a release: + +1. Check `TODO`/`FIXME` comments + - Create issue for or delete + - Regexp for "Find in Path": `\W(TODO|FIXME)(?! #[0-9]{1,4}:)` +1. Merge translations +1. Check latest dependencies +1. Create release branch +1. Test database migration +1. Smoke-Test changed or added functionality +1. Update version +1. Create and commit release notes +1. Merge in `master` +1. Create tag and execute deploy app using Fastlane +1. Close GitHub-issues or move them to next milestone +1. Close milestone +1. Update version on website ([cryptomator.org/android](https://cryptomator.org/android/)) + +### Release Notes + +Before tagging the release, create and commit the release notes. For Playstore create [fastlane/metadata/android/de-DE/changelogs/default.txt](https://github.com/cryptomator/android/blob/develop/fastlane/metadata/android/de-DE/changelogs/default.txt), [fastlane/metadata/android/en-US/changelogs/default.txt](https://github.com/cryptomator/android/blob/develop/fastlane/metadata/android/en-US/changelogs/default.txt) and for the website create [fastlane/release_notes_apkstore_en.html](https://github.com/cryptomator/android/blob/develop/fastlane/release_notes_apkstore_en.html). + +### Deploy app using Fastlane + +Deploy production version to Google Play, Website/GitHub-Releases and F-Droid using `fastlane android deploy` or `bundle exec fastlane deploy` + +There are further targets and options like `beta`, see [fastlane/README.md](https://github.com/cryptomator/android/blob/develop/fastlane/README.md) + +### Initial setup Fastlane + +1. Make sure you copied `.default.env` to `.env` in the `fastlane` folder and filled out those variables. +1. Install Ruby (depends on OS, Ubuntu): `sudo apt install ruby-dev` +1. Install fastlane (depends on OS, Ubuntu): `gem install fastlane -N` + ## License This project is dual-licensed under the GPLv3 for FOSS projects as well as a commercial license for independent software vendors and resellers. If you want to modify this application under different conditions, feel free to contact our support team. diff --git a/build.gradle b/build.gradle index fc0461cc..feadbf81 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply from: 'buildsystem/dependencies.gradle' apply plugin: "com.vanniktech.android.junit.jacoco" buildscript { - ext.kotlin_version = '1.4.21' + ext.kotlin_version = '1.4.30' repositories { jcenter() mavenCentral() @@ -42,7 +42,7 @@ allprojects { ext { androidApplicationId = 'org.cryptomator' androidVersionCode = getVersionCode() - androidVersionName = '1.5.11-SNAPSHOT' + androidVersionName = '1.5.12-SNAPSHOT' } repositories { mavenCentral() diff --git a/buildsystem/dependencies.gradle b/buildsystem/dependencies.gradle index 4716a0a7..698c33bf 100644 --- a/buildsystem/dependencies.gradle +++ b/buildsystem/dependencies.gradle @@ -27,18 +27,18 @@ ext { rxAndroidVersion = '2.1.1' rxBindingVersion = '2.2.0' - daggerVersion = '2.31.2' + daggerVersion = '2.32' gsonVersion = '2.8.6' - okHttpVersion = '4.9.0' + okHttpVersion = '4.9.1' okHttpDigestVersion = '2.5' velocityVersion = '1.7' timberVersion = '4.7.1' - zxcvbnVersion = '1.3.4' + zxcvbnVersion = '1.3.6' scaleImageViewVersion = '3.10.0' @@ -58,7 +58,7 @@ ext { googlePlayServicesVersion = '19.0.0' googleClientVersion = '1.31.2' - msgraphVersion = '2.5.0' + msgraphVersion = '2.7.0' msaAuthVersion = '0.10.0' commonsCodecVersion = '1.15' @@ -67,7 +67,7 @@ ext { // testing dependencies - jUnitVersion = '5.7.0' + jUnitVersion = '5.7.1' jUnit4Version = '4.13.1' assertJVersion = '1.7.1' mockitoVersion = '3.7.7' @@ -88,7 +88,7 @@ ext { androidxPreferenceVersion = '1.0.0' // 1.1.0 and 1.1.2 does have a bug with the text size androidxRecyclerViewVersion = '1.1.0' androidxDocumentfileVersion = '1.0.1' - androidxBiometricVersion = '1.0.1' + androidxBiometricVersion = '1.1.0' androidxTestCoreVersion = '1.3.0' jsonWebTokenApiVersion = '0.11.2' diff --git a/data/src/main/java/org/cryptomator/data/cloud/local/LocalStorageContentRepositoryFactory.java b/data/src/main/java/org/cryptomator/data/cloud/local/LocalStorageContentRepositoryFactory.java index 1a7427a6..c3ea26b0 100644 --- a/data/src/main/java/org/cryptomator/data/cloud/local/LocalStorageContentRepositoryFactory.java +++ b/data/src/main/java/org/cryptomator/data/cloud/local/LocalStorageContentRepositoryFactory.java @@ -1,7 +1,6 @@ package org.cryptomator.data.cloud.local; import android.content.Context; -import android.os.Build; import org.cryptomator.data.cloud.local.file.LocalStorageContentRepository; import org.cryptomator.data.cloud.local.storageaccessframework.LocalStorageAccessFrameworkContentRepository; @@ -43,7 +42,7 @@ public class LocalStorageContentRepositoryFactory implements CloudContentReposit if (!hasPermissions(WRITE_EXTERNAL_STORAGE, READ_EXTERNAL_STORAGE)) { throw new NoAuthenticationProvidedException(cloud); } - if (((LocalStorageCloud) cloud).rootUri() != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + if (((LocalStorageCloud) cloud).rootUri() != null) { return new LocalStorageAccessFrameworkContentRepository(context, mimeTypes, (LocalStorageCloud) cloud); } else { return new LocalStorageContentRepository(context, (LocalStorageCloud) cloud); diff --git a/fastlane/.default.env b/fastlane/.default.env new file mode 100644 index 00000000..228ca9a5 --- /dev/null +++ b/fastlane/.default.env @@ -0,0 +1,21 @@ +# This file is just a template and should remain untouched +# COPY this file to .env and fill out the env variables + +GOOGLE_PLAYSTORE_PRIVATE_KEY_FILE_PATH= + +SIGNING_KEYSTORE_PATH= +SIGNING_KEYSTORE_PASSWORD= +SIGNING_KEY_ALIAS= +SIGNING_KEY_PASSWORD= + +SIGNING_UPDATE_APK_STORE_KEY_PATH= +SIGNING_UPDATE_APK_STORE_PUB_KEY_PATH= +APK_STORE_BASIC_URL= + +S3_BUCKET= +S3_ENDPOINT= +S3_REGION= +S3_ACCESS_KEY= +S3_SECRET_ACCESS_KEY= + +SLACK_URL= diff --git a/fastlane/Appfile b/fastlane/Appfile new file mode 100644 index 00000000..864808dc --- /dev/null +++ b/fastlane/Appfile @@ -0,0 +1,2 @@ +json_key_file(ENV["GOOGLE_PLAYSTORE_PRIVATE_KEY_FILE_PATH"]) +package_name("org.cryptomator") diff --git a/fastlane/Fastfile b/fastlane/Fastfile new file mode 100644 index 00000000..348e5fa2 --- /dev/null +++ b/fastlane/Fastfile @@ -0,0 +1,201 @@ +fastlane_require 'dotenv' +fastlane_require 'jwt' +fastlane_require 'base64' +fastlane_require 'net/sftp' + +default_platform(:android) + +branch_name = `git rev-parse --abbrev-ref HEAD` +build = `git rev-list --count #{branch_name} | tr -d " \t\n\r"` +build = build.to_i + 1958 # adding 1958 for legacy reasons. Must be in sync with getVersionCode() from build.gradle +version = get_version_name( + gradle_file_path:"build.gradle", + ext_constant_name:"androidVersionName") +version = version.delete "'" + +platform :android do |options| + + desc "Run all the tests" + lane :test do |options| + gradle(task: "test") + end + + desc "Deploy new version to Google Play and APK Store options: beta:false (default)" + lane :deploy do |options| + release_note_path_en = "metadata/android/en-US/changelogs/default.txt" + + # use english-change-log for french language too + FileUtils.cp(release_note_path_en, "metadata/android/fr-FR/changelogs/default.txt") + + deployToPlaystore(beta:options[:beta]) + + if options[:beta] + puts "Skipping deployment to server cause there isn't currently a beta channel" + + slack( + default_payloads: [], # reduce the notification to the minimum + message: ":rocket: Successfully deployed #{version} with code #{build} to the Play Store :cryptomator:", + payload: { + "Changes" => File.read(release_note_path_en) + } + ) + else + deployToServer(beta:options[:beta]) + deployToFDroid(beta:options[:beta]) + + slack( + default_payloads: [], # reduce the notification to the minimum + message: ":rocket: Successfully deployed #{version} with code #{build} to the Play Store and APK store :cryptomator:", + payload: { + "Changes" => File.read(release_note_path_en) + } + ) + end + + end + + desc "Deploy new version to Play Store" + lane :deployToPlaystore do |options| + deploy_target = "production" + + if options[:beta] + deploy_target = "beta" + end + + gradle(task: "clean") + + gradle( + task: "assemble", + build_type: "Release", + flavor: "playstore", + 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"], + } + ) + + upload_to_play_store( + track: deploy_target, + apk: lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH], + mapping: lane_context[SharedValues::GRADLE_MAPPING_TXT_OUTPUT_PATH], + version_name: version, + version_code: build, + release_status: "draft", + json_key: ENV["GOOGLE_PLAYSTORE_PRIVATE_KEY_FILE_PATH"], + skip_upload_aab: true, + skip_upload_metadata: false, + skip_upload_images: true, + skip_upload_screenshots: true, + metadata_path: "fastlane/metadata/android" + ) + + FileUtils.cp(lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH], "release/Cryptomator-#{version}_playstore_signed.apk") + end + + desc "Deploy new version to server" + lane :deployToServer do |options| + gradle(task: "clean") + + gradle( + task: "assemble", + build_type: "Release", + flavor: "apkstore", + 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_APK_OUTPUT_PATH], "release/Cryptomator-#{version}.apk") + + server_host = ENV["APK_STORE_BASIC_URL"] + base_url = "https://#{server_host}/android/" + apk_url = "#{base_url}#{version}/Cryptomator-#{version}.apk" + release_note_url = "#{base_url}#{version}/release-notes.html" + + claims = { + "version": version, + "url": apk_url, + "release_notes": release_note_url + } + + private_key = OpenSSL::PKey.read(File.read(ENV["SIGNING_UPDATE_APK_STORE_KEY_PATH"])) + token = JWT.encode claims, private_key, "ES256" + + latest_version_filename = "latest-version-#{version}.json" + + latest_version_jsn = File.new("latest_versions/#{latest_version_filename}","w") + latest_version_jsn.write(token) + latest_version_jsn.close + + puts "Uploading APK and release note" + + aws_s3( + bucket: ENV['S3_BUCKET'], + endpoint: ENV['S3_ENDPOINT'], + region: ENV['S3_REGION'], + access_key: ENV['S3_ACCESS_KEY'], + secret_access_key: ENV['S3_SECRET_ACCESS_KEY'], + path: "android/#{version}", + files: [ + "fastlane/release/Cryptomator-#{version}.apk", + "fastlane/release-notes.html" + ], + skip_html_upload: true, + apk: '' + ) + + puts "Uploading #{latest_version_filename} with claims #{claims}" + puts "Rename #{latest_version_filename} to latest-version.json for deployment" + + aws_s3( + bucket: ENV['S3_BUCKET'], + endpoint: ENV['S3_ENDPOINT'], + region: ENV['S3_REGION'], + access_key: ENV['S3_ACCESS_KEY'], + secret_access_key: ENV['S3_SECRET_ACCESS_KEY'], + path: "android", + files: [ + "fastlane/latest_versions/#{latest_version_filename}" + ], + skip_html_upload: true, + apk: '' + ) + + FileUtils.mv("release/Cryptomator-#{version}.apk", "release/Cryptomator-#{version}_signed.apk") + end + + desc "Deploy new version to F-Droid" + lane :deployToFDroid do |options| + gradle(task: "clean") + + gradle( + task: "assemble", + build_type: "Release", + flavor: "fdroid", + 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_APK_OUTPUT_PATH], "release/Cryptomator-#{version}_fdroid_signed.apk") + end + + after_all do |lane| + #error do |lane, exception| + # slack( + # message: exception.message, + # success:false + # ) + end +end diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile new file mode 100644 index 00000000..9b434483 --- /dev/null +++ b/fastlane/Pluginfile @@ -0,0 +1,6 @@ +# Autogenerated by fastlane +# +# Ensure this file is checked in to source control! + +gem 'fastlane-plugin-get_version_name' +gem 'fastlane-plugin-aws_s3' diff --git a/fastlane/README.md b/fastlane/README.md new file mode 100644 index 00000000..eee28971 --- /dev/null +++ b/fastlane/README.md @@ -0,0 +1,49 @@ +fastlane documentation +================ +# Installation + +Make sure you have the latest version of the Xcode command line tools installed: + +``` +xcode-select --install +``` + +Install _fastlane_ using +``` +[sudo] gem install fastlane -NV +``` +or alternatively using `brew install fastlane` + +# Available Actions +## Android +### android test +``` +fastlane android test +``` +Run all the tests +### android deploy +``` +fastlane android deploy +``` +Deploy new version to Google Play and APK Store options: beta:false (default) +### android deployToPlaystore +``` +fastlane android deployToPlaystore +``` +Deploy new version to Play Store +### android deployToServer +``` +fastlane android deployToServer +``` +Deploy new version to server +### android deployToFDroid +``` +fastlane android deployToFDroid +``` +Deploy new version to F-Droid + +---- + +This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run. +More information about fastlane can be found on [fastlane.tools](https://fastlane.tools). +The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools). diff --git a/fastlane/latest_versions/.gitignore b/fastlane/latest_versions/.gitignore new file mode 100644 index 00000000..5e7d2734 --- /dev/null +++ b/fastlane/latest_versions/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/fastlane/metadata/android/de-DE/changelogs/default.txt b/fastlane/metadata/android/de-DE/changelogs/default.txt new file mode 100644 index 00000000..96332f4f --- /dev/null +++ b/fastlane/metadata/android/de-DE/changelogs/default.txt @@ -0,0 +1 @@ +- Foo \ No newline at end of file diff --git a/fastlane/metadata/android/de-DE/full_description.txt b/fastlane/metadata/android/de-DE/full_description.txt new file mode 100644 index 00000000..11885796 --- /dev/null +++ b/fastlane/metadata/android/de-DE/full_description.txt @@ -0,0 +1,39 @@ +Mit Cryptomator liegt der Schlüssel zu deinen Daten bei dir. Durch Cryptomator ver­schlüsselst du deine Daten schnell und unkompliziert. Anschließend lädst du sie geschützt in deinen Lieblingscloudservice hoch. + +EINFACH + +Cryptomator ist ein einfaches Tool zur digitalen Selbstverteidigung. Es ermöglicht dir, deine Cloud-Daten eigenständig und unabhängig zu schützen. + +• Erstelle einen Tresor und vergib ein Passwort +• Keine komplizierte Konfiguration und keine weiteren Accounts notwendig +• Entsperr Tresore mit deinem Fingerabdruck* + +* ab Android 6.0 and Smartphones mit Fingerabdruck-Sensor + +KOMPATIBEL + +Cryptomator ist kompatibel mit den meistgenutzten Cloudspeichern und verfügbar für alle gängigen Betriebssysteme. + +• Kompatibel mit Dropbox, Google Drive, OneDrive und WebDAV-basierten Cloudspeicher-Diensten +• Erstelle auch Tresore in Androids lokalem Speicher (funktioniert bspw. zusammen mit Sync-Apps von Drittanbietern) +• Greife auf deine Tresore von allen deinen mobilen Endgeräten und Computern zu + +SICHER + +Du musst Cryptomator nicht blind vertrauen, denn die App ist quelloffen, was für dich als Nutzer bedeutet, dass jeder den Code einsehen kann. + +• Verschlüsselung der Dateiinhalte und Dateinamen mit AES und 256-Bit-Schlüssellänge +• Erhöhte Brute-Force-Resistenz des Tresor-Passworts durch Einsatz von scrypt +• Tresore werden automatisch gesperrt, wenn die App in den Hintergrund geschickt wird +• Verschlüsselungsimplementierung ist öffentlich dokumentiert + +PREISGEKRÖNT + +Cryptomator wurde mit dem CeBIT Innovation Award 2016 for Usable Security and Privacy ausgezeichnet. Wir freuen uns, hunderttausenden Cryptomator-Nutzern Sicherheit und Privatsphärenschutz bieten zu können. + +CRYPTOMATOR COMMUNITY + +Tritt der Cryptomator Community bei und tausche dich mit Cryptomator-Nutzern aus: https://community.cryptomator.org + +• Folge uns auf Twitter @Cryptomator +• Like uns auf Facebook /Cryptomator \ No newline at end of file diff --git a/fastlane/metadata/android/de-DE/short_description.txt b/fastlane/metadata/android/de-DE/short_description.txt new file mode 100644 index 00000000..591a40e1 --- /dev/null +++ b/fastlane/metadata/android/de-DE/short_description.txt @@ -0,0 +1 @@ +Nimm die Sicherung deiner Cloud-Daten selbst in die Hand \ No newline at end of file diff --git a/fastlane/metadata/android/de-DE/title.txt b/fastlane/metadata/android/de-DE/title.txt new file mode 100644 index 00000000..f9944b4a --- /dev/null +++ b/fastlane/metadata/android/de-DE/title.txt @@ -0,0 +1 @@ +Cryptomator \ No newline at end of file diff --git a/fastlane/metadata/android/de-DE/video.txt b/fastlane/metadata/android/de-DE/video.txt new file mode 100644 index 00000000..e69de29b diff --git a/fastlane/metadata/android/en-US/changelogs/default.txt b/fastlane/metadata/android/en-US/changelogs/default.txt new file mode 100644 index 00000000..96332f4f --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/default.txt @@ -0,0 +1 @@ +- Foo \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/full_description.txt b/fastlane/metadata/android/en-US/full_description.txt new file mode 100644 index 00000000..f1841971 --- /dev/null +++ b/fastlane/metadata/android/en-US/full_description.txt @@ -0,0 +1,39 @@ +With Cryptomator, the key to your data is in your hands. Cryptomator encrypts your data quickly and easily. Afterwards you upload them protected to your favorite cloud service. + +EASY-TO-USE + +Cryptomator is a simple tool for digital self-defense. It allows you to protect your cloud data by yourself and independently. + +• Simply create a vault and assign a password +• No additional account or configuration needed +• Unlock vaults with your fingerprint* + +* from Android 6.0 and smartphones with fingerprint sensor + +COMPATIBLE + +Cryptomator is compatible with the most commonly used cloud storages and available for all major operating systems. + +• Compatible with Dropbox, Google Drive, OneDrive, and WebDAV-based cloud storage services +• Create vaults in Android’s local storage (e.g., works with third-party sync apps) +• Access your vaults on all your mobile devices and computers + +SECURE + +You don't have to trust Cryptomator blindly, because it is open source software. For you as a user, this means that everyone can see the code. + +• File content and filename encryption with AES and 256 bit key length +• Vault password is secured with scrypt for enhanced brute-force resistance +• Vaults are automatically locked after sending app to background +• Crypto implementation is publicly documented + +AWARD-WINNING + +Cryptomator received the CeBIT Innovation Award 2016 for Usable Security and Privacy. We're proud to provide security and privacy for hundreds of thousands of Cryptomator users. + +CRYPTOMATOR COMMUNITY + +Join the Cryptomator Community and participate in the conversations with other Cryptomator users. + +• Follow us on Twitter @Cryptomator +• Like us on Facebook /Cryptomator \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/short_description.txt b/fastlane/metadata/android/en-US/short_description.txt new file mode 100644 index 00000000..7a0ae9a7 --- /dev/null +++ b/fastlane/metadata/android/en-US/short_description.txt @@ -0,0 +1 @@ +Put a lock on your cloud: Take the security of your data into your own hands \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/title.txt b/fastlane/metadata/android/en-US/title.txt new file mode 100644 index 00000000..f9944b4a --- /dev/null +++ b/fastlane/metadata/android/en-US/title.txt @@ -0,0 +1 @@ +Cryptomator \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/video.txt b/fastlane/metadata/android/en-US/video.txt new file mode 100644 index 00000000..e69de29b diff --git a/fastlane/metadata/android/fr-FR/changelogs/default.txt b/fastlane/metadata/android/fr-FR/changelogs/default.txt new file mode 100644 index 00000000..96332f4f --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/default.txt @@ -0,0 +1 @@ +- Foo \ No newline at end of file diff --git a/fastlane/metadata/android/fr-FR/full_description.txt b/fastlane/metadata/android/fr-FR/full_description.txt new file mode 100644 index 00000000..4bfd34cb --- /dev/null +++ b/fastlane/metadata/android/fr-FR/full_description.txt @@ -0,0 +1,39 @@ +Cryptomator rend votre stockage dans le cloud beaucoup plus sûr. L'application chiffre les fichiers sur votre appareil mobile avant qu'ils ne soient envoyés dans votre cloud. Même si une tierce partie obtient un accès non autorisé à vos fichiers (par exemple, une attaque de pirates informatiques), vos fichiers sont à l'abri des regards indiscrets. + +SIMPLICITÉ + +Cryptomator a été développé en mettant l'accent sur la convivialité. + +• Il suffit de créer un coffre-fort et d'y attribuer un mot de passe +• Aucun compte ou configuration supplémentaire n'est nécessaire +• Déverrouillez les coffres-forts avec votre empreinte digitale*. + +* à partir d'Android 6.0 et sur smartphones avec capteur biométrique d'empreintes digitales + +COMPATIBILITÉ + +Cryptomator est compatible avec les systèmes de stockage dans le cloud les plus couramment utilisés et disponible pour tous les principaux systèmes d'exploitation. + +• Compatible avec Dropbox, Google Drive, OneDrive et les services de stockage dans le nuage basés sur WebDAV +• Créer des coffres-forts dans le stockage local d'Android (par exemple, fonctionne avec des applications de synchronisation tierces) +• Accédez à vos coffres-forts sur tous vos appareils mobiles et ordinateurs + +SÉCURITÉ + +Cryptomator pour Android est basé sur le projet open-source de Cryptomator pour Ordinateur de bureau. + +• Chiffrement du contenu et des noms de fichiers via AES et une longueur de clé de 256 bits +• Le mot de passe du coffre-fort est sécurisé par cryptage pour une meilleure résistance aux attaque par force brut +• Les coffre-forts sont automatiquement verrouillées après la mise en arrière-plan de l'application +• La mise en œuvre de Crypto est basée sur la bibliothèque open-source CryptoLib et est documentée publiquement + +UNE GÉNIALITUDE GÉNÉRAL + +Cryptomator a reçu le prix de l'innovation CeBIT 2016 pour la sécurité pratique et la confidentialité. Nous sommes fiers d'assurer la sécurité et la confidentialité des centaines de milliers d'utilisateurs du Cryptomator. + +LA COMMUNAUTÉ CRYPTOMATOR + +Rejoignez la communauté de Cryptomator et participez aux conversations avec les autres utilisateurs de Cryptomator: https://community.cryptomator.org + +- Suivez-nous sur Twitter @Cryptomator +- Comme nous sur Facebook/Cryptomator \ No newline at end of file diff --git a/fastlane/metadata/android/fr-FR/short_description.txt b/fastlane/metadata/android/fr-FR/short_description.txt new file mode 100644 index 00000000..0a4252a1 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/short_description.txt @@ -0,0 +1 @@ +Verrouillé votre cloud: Prenez en mains la sécurité de vos données \ No newline at end of file diff --git a/fastlane/metadata/android/fr-FR/title.txt b/fastlane/metadata/android/fr-FR/title.txt new file mode 100644 index 00000000..f9944b4a --- /dev/null +++ b/fastlane/metadata/android/fr-FR/title.txt @@ -0,0 +1 @@ +Cryptomator \ No newline at end of file diff --git a/fastlane/metadata/android/fr-FR/video.txt b/fastlane/metadata/android/fr-FR/video.txt new file mode 100644 index 00000000..e69de29b diff --git a/fastlane/release-notes.html b/fastlane/release-notes.html new file mode 100644 index 00000000..8066f97b --- /dev/null +++ b/fastlane/release-notes.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/fastlane/release/.gitignore b/fastlane/release/.gitignore new file mode 100644 index 00000000..5e7d2734 --- /dev/null +++ b/fastlane/release/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/presentation/src/main/java/org/cryptomator/presentation/model/CloudTypeModel.kt b/presentation/src/main/java/org/cryptomator/presentation/model/CloudTypeModel.kt index a9c3dfcf..74f9d2b6 100644 --- a/presentation/src/main/java/org/cryptomator/presentation/model/CloudTypeModel.kt +++ b/presentation/src/main/java/org/cryptomator/presentation/model/CloudTypeModel.kt @@ -1,6 +1,5 @@ package org.cryptomator.presentation.model -import android.os.Build import org.cryptomator.domain.CloudType import org.cryptomator.presentation.R @@ -22,14 +21,13 @@ enum class CloudTypeModel(builder: Builder) { .withMultiInstances()), // LOCAL(Builder("LOCAL", R.string.cloud_names_local_storage) // .withCloudImageResource(R.drawable.storage_type_local) // - .withCloudImageLargeResource(R.drawable.storage_type_local_large) // - .withMultiInstancesIfLollipopOrLater()); + .withCloudImageLargeResource(R.drawable.storage_type_local_large)); - val cloudName: String - val displayNameResource: Int - val cloudImageResource: Int - val cloudImageLargeResource: Int - val isMultiInstance: Boolean + val cloudName: String = builder.cloudName + val displayNameResource: Int = builder.displayNameResource + val cloudImageResource: Int = builder.cloudImageResource + val cloudImageLargeResource: Int = builder.cloudImageLargeResource + val isMultiInstance: Boolean = builder.multiInstances private class Builder(val cloudName: String, val displayNameResource: Int) { var cloudImageResource = 0 @@ -50,11 +48,6 @@ enum class CloudTypeModel(builder: Builder) { multiInstances = true return this } - - fun withMultiInstancesIfLollipopOrLater(): Builder { - multiInstances = Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP - return this - } } companion object { @@ -66,12 +59,4 @@ enum class CloudTypeModel(builder: Builder) { return CloudType.valueOf(type.name) } } - - init { - cloudName = builder.cloudName - displayNameResource = builder.displayNameResource - cloudImageResource = builder.cloudImageResource - cloudImageLargeResource = builder.cloudImageLargeResource - isMultiInstance = builder.multiInstances - } } diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/BrowseFilesPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/BrowseFilesPresenter.kt index c3f9f7fe..d053b17a 100644 --- a/presentation/src/main/java/org/cryptomator/presentation/presenter/BrowseFilesPresenter.kt +++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/BrowseFilesPresenter.kt @@ -673,22 +673,11 @@ class BrowseFilesPresenter @Inject constructor( // } fun onExportFileClicked(cloudFile: CloudFileModel, trigger: ExportOperation) { - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { - exportFileToDownloadDirectory(cloudFile, trigger) - } else { - exportFileToUserSelectedLocation(cloudFile, trigger) - } + exportFileToUserSelectedLocation(cloudFile, trigger) } fun onExportNodesClicked(selectedCloudFiles: ArrayList>, trigger: ExportOperation) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - exportNodesToUserSelectedLocation(selectedCloudFiles, trigger) - } - } - - private fun exportFileToDownloadDirectory(fileToExport: CloudFileModel, exportOperation: ExportOperation) { - requestPermissions(PermissionsResultCallbacks.exportFileToDownloadDirectory(fileToExport, exportOperation), // - R.string.permission_message_export_file, Manifest.permission.WRITE_EXTERNAL_STORAGE) + exportNodesToUserSelectedLocation(selectedCloudFiles, trigger) } @Callback diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudConnectionListPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudConnectionListPresenter.kt index e4e565ac..b4a11094 100644 --- a/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudConnectionListPresenter.kt +++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudConnectionListPresenter.kt @@ -103,7 +103,7 @@ class CloudConnectionListPresenter @Inject constructor( // } private fun releaseUriPermissionForLocalStorageCloud(cloudModel: LocalStorageModel) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && (cloudModel.toCloud() as LocalStorageCloud).rootUri() != null) { + if ((cloudModel.toCloud() as LocalStorageCloud).rootUri() != null) { releaseUriPermission(cloudModel.uri()) } } diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/ImagePreviewActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/ImagePreviewActivity.kt index 4b4f7d59..5d70f3b1 100644 --- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/ImagePreviewActivity.kt +++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/ImagePreviewActivity.kt @@ -1,7 +1,6 @@ package org.cryptomator.presentation.ui.activity import android.net.Uri -import android.os.Build import android.view.View.* import androidx.core.content.ContextCompat import androidx.fragment.app.Fragment @@ -91,9 +90,7 @@ class ImagePreviewActivity : BaseActivity(), ImagePreviewView, ConfirmDeleteClou } private fun setupStatusBar() { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - window.statusBarColor = ContextCompat.getColor(this, R.color.colorBlack) - } + window.statusBarColor = ContextCompat.getColor(this, R.color.colorBlack) } private fun setupToolbar(index: Int) { @@ -131,10 +128,7 @@ class ImagePreviewActivity : BaseActivity(), ImagePreviewView, ConfirmDeleteClou var newUiOptions = window.decorView.systemUiVisibility newUiOptions = newUiOptions or SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION newUiOptions = newUiOptions xor SYSTEM_UI_FLAG_FULLSCREEN - - if (Build.VERSION.SDK_INT >= 19) { - newUiOptions = newUiOptions xor SYSTEM_UI_FLAG_IMMERSIVE_STICKY - } + newUiOptions = newUiOptions xor SYSTEM_UI_FLAG_IMMERSIVE_STICKY window.decorView.systemUiVisibility = newUiOptions } 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 f27a3af0..5c912189 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 @@ -179,11 +179,7 @@ class SettingsFragment : PreferenceFragmentCompat() { val strDate: String = dateFormatUser.format(lastUpdateCheck) format(getString(R.string.screen_settings_last_check_updates), strDate) } else { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - getString(R.string.screen_settings_last_check_updates_never) - } else { - getString(R.string.screen_settings_last_check_updates_never_pre_marshmallow) - } + getString(R.string.screen_settings_last_check_updates_never) } val date = SpannableString(readableDate) diff --git a/presentation/src/main/res/values-de/strings.xml b/presentation/src/main/res/values-de/strings.xml index 6af46287..227eca18 100644 --- a/presentation/src/main/res/values-de/strings.xml +++ b/presentation/src/main/res/values-de/strings.xml @@ -99,7 +99,7 @@ Speicherort Speichern Dateien verschlüsselt - text.txt + @string/dialog_file_name_placeholder Cloud-Dienst Neuen Tresor anlegen @@ -219,7 +219,7 @@ Möchten Sie wirklich beenden, ohne zu speichern? Verwerfen @string/dialog_button_cancel - @string/screen_share_files_new_text_file + text.txt Sind Sie sicher, dass sie den Tresor entfernen wollen? Dieser Vorgang wird den Tresor nur aus dieser Liste entfernen und nicht tatsächlich löschen. Lade hoch… @@ -341,8 +341,7 @@ Intervall der Aktualisierungsprüfung Nach Aktualisierungen suchen Letzte Ausführung %1$s - Noch nie - Noch nie ~ Wenn aus technischen Gründen keine Update-Prüfung durchgeführt werden kann, können Updates manuell über die Website https://cryptomator.org/android/ heruntergeladen und installiert werden. + @string/lock_timeout_never Zwischenspeichergröße pro Cloud Sofort diff --git a/presentation/src/main/res/values-fr/strings.xml b/presentation/src/main/res/values-fr/strings.xml index ccdf0340..312cd807 100644 --- a/presentation/src/main/res/values-fr/strings.xml +++ b/presentation/src/main/res/values-fr/strings.xml @@ -350,7 +350,6 @@ Vérifier les mises à jour Dernière exécution %1$s @string/lock_timeout_never - Jamais ~ Si la vérification de mise à jour ne peut être effectué pour des raisons techniques, les mises à jour peuvent être téléchargées et installées manuellement à partir du site https://cryptomator.org/android/. Taille du cache par cloud Instantané diff --git a/presentation/src/main/res/values-tr/strings.xml b/presentation/src/main/res/values-tr/strings.xml index c74cf321..43ceaef7 100644 --- a/presentation/src/main/res/values-tr/strings.xml +++ b/presentation/src/main/res/values-tr/strings.xml @@ -342,7 +342,6 @@ Güncellemeleri kontrol et Son çalıştırma %1$s @string/lock_timeout_never - Teknik nedenlerle güncelleme kontrolü yapılamıyorsa, güncellemeler, https://cryptomator.org/android/ web sitesinden manuel olarak indirilebilir ve yüklenebilir. Bulut başına önbellek boyutu Anında diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml index fa95a7bd..240d713f 100644 --- a/presentation/src/main/res/values/strings.xml +++ b/presentation/src/main/res/values/strings.xml @@ -509,8 +509,7 @@ Update check interval Check for updates Last run %1$s - Never - Never ~ If an update check cannot be performed for technical reasons, updates can be downloaded and installed manually from the website https://cryptomator.org/android/. + @string/lock_timeout_never Cache size per Cloud @@ -520,7 +519,7 @@ 2 minutes 5 minutes 10 minutes - @string/screen_settings_last_check_updates_never + Never 50 MB @@ -540,6 +539,6 @@ Once a day Once a week Once a month - @string/screen_settings_last_check_updates_never + @string/lock_timeout_never