diff --git a/.github/workflows/release_deploy_play_store.yml b/.github/workflows/release_deploy_play_store.yml new file mode 100644 index 0000000..c45fa39 --- /dev/null +++ b/.github/workflows/release_deploy_play_store.yml @@ -0,0 +1,69 @@ +## See https://github.com/flutter/gallery/blob/main/.github/workflows/release_deploy_play_store.yml + +name: Deploy to Play Store +on: + # Enable manual run + workflow_dispatch: + inputs: + lane: + description: "Fastlane lane" + required: true + default: "alpha" + type: choice + options: + - alpha + - promote_to_beta + - beta + - promote_to_production + - production + +# Declare default permissions as read only. +permissions: read-all + +jobs: + fastlane-deploy: + runs-on: ubuntu-latest + steps: + # Set up Flutter. + - name: Clone Flutter repository with stable channel + uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d + with: + channel: stable + - run: flutter doctor -v + + # Setup app + - name: Checkout Paperless mobile, get packages and run code generators + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + - run: | + pushd scripts + bash install_dependencies.sh + popd + + # Setup Ruby, Bundler, and Gemfile dependencies + - name: Setup Fastlane + uses: ruby/setup-ruby@8df78e55761745aad83acaf3ff12976382356e6d + with: + ruby-version: "2.6" + bundler-cache: true + working-directory: android + + - name: Configure Keystore + run: | + echo "$PLAY_STORE_UPLOAD_KEY" | base64 --decode > app/upload-keystore.jks + echo "storeFile=upload-keystore.jks" >> key.properties + echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> key.properties + echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> key.properties + echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> key.properties + env: + PLAY_STORE_UPLOAD_KEY: ${{ secrets.PLAY_STORE_UPLOAD_KEY }} + KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }} + KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }} + KEYSTORE_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }} + working-directory: android + + # Build and deploy with Fastlane (by default, to alpha track) 🚀. + # Naturally, promote_to_production only deploys. + - run: bundle exec fastlane ${{ github.event.inputs.lane || 'alpha' }} + env: + PLAY_STORE_CREDENTIALS: ${{ secrets.PLAY_STORE_CREDENTIALS }} + working-directory: android \ No newline at end of file diff --git a/android/Gemfile b/android/Gemfile index 7a118b4..adc90d9 100644 --- a/android/Gemfile +++ b/android/Gemfile @@ -1,3 +1,3 @@ source "https://rubygems.org" -gem "fastlane" +gem "fastlane" \ No newline at end of file diff --git a/android/Gemfile.lock b/android/Gemfile.lock index 43abca8..c271406 100644 --- a/android/Gemfile.lock +++ b/android/Gemfile.lock @@ -1,23 +1,23 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.5) + CFPropertyList (3.0.6) rexml addressable (2.8.1) public_suffix (>= 2.0.2, < 6.0) artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.656.0) - aws-sdk-core (3.166.0) + aws-partitions (1.716.0) + aws-sdk-core (3.170.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.5) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.59.0) + aws-sdk-kms (1.62.0) aws-sdk-core (~> 3, >= 3.165.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.117.1) + aws-sdk-s3 (1.119.1) aws-sdk-core (~> 3, >= 3.165.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4) @@ -36,8 +36,8 @@ GEM unf (>= 0.0.5, < 1.0.0) dotenv (2.8.1) emoji_regex (3.2.3) - excon (0.93.1) - faraday (1.10.2) + excon (0.99.0) + faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -66,7 +66,7 @@ GEM faraday_middleware (1.2.0) faraday (~> 1.0) fastimage (2.2.6) - fastlane (2.210.1) + fastlane (2.212.1) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) @@ -106,9 +106,9 @@ GEM xcpretty (~> 0.3.0) xcpretty-travis-formatter (>= 0.0.3) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.30.0) + google-apis-androidpublisher_v3 (0.34.0) google-apis-core (>= 0.9.1, < 2.a) - google-apis-core (0.9.1) + google-apis-core (0.11.0) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -117,8 +117,8 @@ GEM retriable (>= 2.0, < 4.a) rexml webrick - google-apis-iamcredentials_v1 (0.16.0) - google-apis-core (>= 0.9.1, < 2.a) + google-apis-iamcredentials_v1 (0.17.0) + google-apis-core (>= 0.11.0, < 2.a) google-apis-playcustomapp_v1 (0.12.0) google-apis-core (>= 0.9.1, < 2.a) google-apis-storage_v1 (0.19.0) @@ -148,11 +148,11 @@ GEM http-cookie (1.0.5) domain_name (~> 0.5) httpclient (2.8.3) - jmespath (1.6.1) - json (2.6.2) - jwt (2.5.0) + jmespath (1.6.2) + json (2.6.3) + jwt (2.7.0) memoist (0.16.2) - mini_magick (4.11.0) + mini_magick (4.12.0) mini_mime (1.1.2) multi_json (1.15.0) multipart-post (2.0.0) @@ -160,8 +160,8 @@ GEM naturally (2.2.1) optparse (0.1.1) os (1.1.4) - plist (3.6.0) - public_suffix (5.0.0) + plist (3.7.0) + public_suffix (5.0.1) rake (13.0.6) representable (3.2.0) declarative (< 0.1.0) @@ -178,7 +178,7 @@ GEM faraday (>= 0.17.5, < 3.a) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) - simctl (1.6.8) + simctl (1.6.10) CFPropertyList naturally terminal-notifier (2.0.0) @@ -192,9 +192,10 @@ GEM uber (0.1.0) unf (0.1.4) unf_ext - unf_ext (0.0.8.2-x64-mingw-ucrt) + unf_ext (0.0.8.2) + unf_ext (0.0.8.2-x86-mingw32) unicode-display_width (1.8.0) - webrick (1.7.0) + webrick (1.8.1) word_wrap (1.0.0) xcodeproj (1.22.0) CFPropertyList (>= 2.3.3, < 4.0) @@ -209,10 +210,11 @@ GEM xcpretty (~> 0.2, >= 0.0.7) PLATFORMS - x64-mingw-ucrt + ruby + x86-mingw32 DEPENDENCIES fastlane BUNDLED WITH - 2.3.7 + 2.1.4 diff --git a/android/build.gradle b/android/build.gradle index 7e7824c..02cd41a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.2.1' + classpath 'com.android.tools.build:gradle:7.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // implementation 'androidx.window:window:1.0.0' // implementation 'androidx.window:window-java:1.0.0' diff --git a/android/fastlane/Appfile b/android/fastlane/Appfile new file mode 100644 index 0000000..a5559fa --- /dev/null +++ b/android/fastlane/Appfile @@ -0,0 +1 @@ +package_name("de.astubenbord.paperless_mobile") diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile new file mode 100644 index 0000000..cbea6b2 --- /dev/null +++ b/android/fastlane/Fastfile @@ -0,0 +1,73 @@ +# This file contains the fastlane.tools configuration +# You can find the documentation at https://docs.fastlane.tools +# +# For a list of all available actions, check out +# +# https://docs.fastlane.tools/actions +# +# For a list of all available plugins, check out +# +# https://docs.fastlane.tools/plugins/available-plugins +# + +# Uncomment the line if you want fastlane to automatically update itself +# update_fastlane + +default_platform(:android) + +platform :android do + desc "Runs all the tests" + lane :test do + gradle(task: "test") + end + + desc "Submit a new alpha build to Google Play" + lane :alpha do + sh "flutter build appbundle -v" + upload_to_play_store( + track: 'alpha', + aab: '../build/app/outputs/bundle/release/app-release.aab', + json_key_data: ENV['PLAY_STORE_CREDENTIALS'], + ) + end + + desc "Promote alpha track to beta" + lane :promote_to_production do + upload_to_play_store( + track: 'alpha', + track_promote_to: 'beta', + skip_upload_changelogs: true, + json_key_data: ENV['PLAY_STORE_CREDENTIALS'], + ) + end + + desc "Submit a new beta build to Google Play" + lane :alpha do + sh "flutter build appbundle -v" + upload_to_play_store( + track: 'beta', + aab: '../build/app/outputs/bundle/release/app-release.aab', + json_key_data: ENV['PLAY_STORE_CREDENTIALS'], + ) + end + + desc "Promote beta track to prod" + lane :promote_to_production do + upload_to_play_store( + track: 'beta', + track_promote_to: 'production', + skip_upload_changelogs: true, + json_key_data: ENV['PLAY_STORE_CREDENTIALS'], + ) + end + + desc "Submit a new production build to Google Play" + lane :production do + sh "flutter build appbundle -v" + upload_to_play_store( + track: 'production', + aab: '../build/app/outputs/bundle/release/app-release.aab', + json_key_data: ENV['PLAY_STORE_CREDENTIALS'], + ) + end +end \ No newline at end of file diff --git a/android/fastlane/README.md b/android/fastlane/README.md new file mode 100644 index 0000000..7ec1207 --- /dev/null +++ b/android/fastlane/README.md @@ -0,0 +1,48 @@ +fastlane documentation +---- + +# Installation + +Make sure you have the latest version of the Xcode command line tools installed: + +```sh +xcode-select --install +``` + +For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) + +# Available Actions + +## Android + +### android test + +```sh +[bundle exec] fastlane android test +``` + +Runs all the tests + +### android beta + +```sh +[bundle exec] fastlane android beta +``` + +Submit a new Beta Build to Crashlytics Beta + +### android deploy + +```sh +[bundle exec] fastlane android deploy +``` + +Deploy a new version to the Google Play + +---- + +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/android/fastlane/metadata/android/de-DE/changelogs/25.txt b/android/fastlane/metadata/android/de-DE/changelogs/25.txt new file mode 100644 index 0000000..172aad7 --- /dev/null +++ b/android/fastlane/metadata/android/de-DE/changelogs/25.txt @@ -0,0 +1 @@ +* Verbessern der Dateipfad-Verarbeitung beim Hochladen/Teilen von Dokumenten \ No newline at end of file diff --git a/android/fastlane/metadata/android/de-DE/full_description.txt b/android/fastlane/metadata/android/de-DE/full_description.txt new file mode 100644 index 0000000..df37479 --- /dev/null +++ b/android/fastlane/metadata/android/de-DE/full_description.txt @@ -0,0 +1,18 @@ +Ein (fast) vollwertiger mobiler Paperless client kompatibel mit Paperless. + +Das Benutzen der App setzt den Zugang zu einer laufenden Paperless-ng*x Instanz voraus. + +✔️ Betrachte und suche Dokumente +✔️ Bearbeite, lösche oder füge neue Dokumente hinzu +✔️ Teile Dokumente, lade sie herunter oder betrachte deine Dateien +✔️ Verwalte Korrespondenten, Dokumenttypen, Tags oder Speicherpfade +✔️ Scanne und lade Dokumente mit bereits zugewiesenen Werten hoch +✔️ Überprüfe und verarbeite neue Dokumente im Posteingang +✔️ Sichere deine Daten mit biometrischer Authentifizierung +✔️ Unterstützung für TLS-Mutual Authentucation (Client Zertifikate) +✔️ Moderne, intuitive Nutzeroberfläche basierend auf der Material Design 3 Spezifikation +✔️ Heller und Dunkler Modus sowie Unterstützung für dynamische Farbgebung (Android 12+) +✔️ Verfügbar in Deutsch, Englisch, Tchechisch* und Türkish* + + +* Noch nicht vollständig übersetzt \ No newline at end of file diff --git a/android/fastlane/metadata/android/de-DE/short_description.txt b/android/fastlane/metadata/android/de-DE/short_description.txt new file mode 100644 index 0000000..4231691 --- /dev/null +++ b/android/fastlane/metadata/android/de-DE/short_description.txt @@ -0,0 +1 @@ +Ein (fast) vollwertiger mobiler Paperless client. \ No newline at end of file diff --git a/fastlane/metadata/title.txt b/android/fastlane/metadata/android/de-DE/title.txt similarity index 100% rename from fastlane/metadata/title.txt rename to android/fastlane/metadata/android/de-DE/title.txt diff --git a/android/fastlane/metadata/android/de-DE/video.txt b/android/fastlane/metadata/android/de-DE/video.txt new file mode 100644 index 0000000..e69de29 diff --git a/android/fastlane/metadata/android/en-US/changelogs/25.txt b/android/fastlane/metadata/android/en-US/changelogs/25.txt new file mode 100644 index 0000000..30ee0de --- /dev/null +++ b/android/fastlane/metadata/android/en-US/changelogs/25.txt @@ -0,0 +1 @@ +* Fix file path splitting when uploading/sharing files \ No newline at end of file diff --git a/android/fastlane/metadata/android/en-US/full_description.txt b/android/fastlane/metadata/android/en-US/full_description.txt new file mode 100644 index 0000000..b35b739 --- /dev/null +++ b/android/fastlane/metadata/android/en-US/full_description.txt @@ -0,0 +1,18 @@ +An (almost) fully fledged mobile Paperless client compatible with Paperless. + +Using this app requires access to running a Paperless-ng*x instance. + +✔️ View and search documents +✔️ Add, delete or edit documents +✔️ Share, download and preview your files +✔️ Manage correspondents, document types, tags and storage paths +✔️ Scan and upload documents with preset correspondent, document type, tags and creation date +✔️ Review and quickly process newly added documents in the inbox +✔️ Secure your data with biometric authentication +✔️ Support for TLS mutual authentication (client certificates) +✔️ Modern, intuitive UI built according to the Material Design 3 specification +✔️ Light and dark theme and support for dynamic color (Android 12+) +✔️ Available in English, German, Czech* and Turkish* language + + +* Not fully translated yet \ No newline at end of file diff --git a/fastlane/metadata/images/featureGraphic.png b/android/fastlane/metadata/android/en-US/images/featureGraphic.png similarity index 100% rename from fastlane/metadata/images/featureGraphic.png rename to android/fastlane/metadata/android/en-US/images/featureGraphic.png diff --git a/android/fastlane/metadata/android/en-US/images/icon.png b/android/fastlane/metadata/android/en-US/images/icon.png new file mode 100644 index 0000000..d6f38ae Binary files /dev/null and b/android/fastlane/metadata/android/en-US/images/icon.png differ diff --git a/fastlane/metadata/images/phoneScreenshots/1.png b/android/fastlane/metadata/android/en-US/images/phoneScreenshots/1_en-US.png similarity index 100% rename from fastlane/metadata/images/phoneScreenshots/1.png rename to android/fastlane/metadata/android/en-US/images/phoneScreenshots/1_en-US.png diff --git a/fastlane/metadata/images/phoneScreenshots/2.png b/android/fastlane/metadata/android/en-US/images/phoneScreenshots/2_en-US.png similarity index 100% rename from fastlane/metadata/images/phoneScreenshots/2.png rename to android/fastlane/metadata/android/en-US/images/phoneScreenshots/2_en-US.png diff --git a/fastlane/metadata/images/phoneScreenshots/3.png b/android/fastlane/metadata/android/en-US/images/phoneScreenshots/3_en-US.png similarity index 100% rename from fastlane/metadata/images/phoneScreenshots/3.png rename to android/fastlane/metadata/android/en-US/images/phoneScreenshots/3_en-US.png diff --git a/fastlane/metadata/images/phoneScreenshots/4.png b/android/fastlane/metadata/android/en-US/images/phoneScreenshots/4_en-US.png similarity index 100% rename from fastlane/metadata/images/phoneScreenshots/4.png rename to android/fastlane/metadata/android/en-US/images/phoneScreenshots/4_en-US.png diff --git a/fastlane/metadata/images/phoneScreenshots/5.png b/android/fastlane/metadata/android/en-US/images/phoneScreenshots/5_en-US.png similarity index 100% rename from fastlane/metadata/images/phoneScreenshots/5.png rename to android/fastlane/metadata/android/en-US/images/phoneScreenshots/5_en-US.png diff --git a/fastlane/metadata/images/phoneScreenshots/6.png b/android/fastlane/metadata/android/en-US/images/phoneScreenshots/6_en-US.png similarity index 100% rename from fastlane/metadata/images/phoneScreenshots/6.png rename to android/fastlane/metadata/android/en-US/images/phoneScreenshots/6_en-US.png diff --git a/fastlane/metadata/images/phoneScreenshots/7.png b/android/fastlane/metadata/android/en-US/images/phoneScreenshots/7_en-US.png similarity index 100% rename from fastlane/metadata/images/phoneScreenshots/7.png rename to android/fastlane/metadata/android/en-US/images/phoneScreenshots/7_en-US.png diff --git a/fastlane/metadata/images/phoneScreenshots/8.png b/android/fastlane/metadata/android/en-US/images/phoneScreenshots/8_en-US.png similarity index 100% rename from fastlane/metadata/images/phoneScreenshots/8.png rename to android/fastlane/metadata/android/en-US/images/phoneScreenshots/8_en-US.png diff --git a/android/fastlane/metadata/android/en-US/short_description.txt b/android/fastlane/metadata/android/en-US/short_description.txt new file mode 100644 index 0000000..22b155f --- /dev/null +++ b/android/fastlane/metadata/android/en-US/short_description.txt @@ -0,0 +1 @@ +An (almost) fully fledged mobile Paperless client. \ No newline at end of file diff --git a/android/fastlane/metadata/android/en-US/title.txt b/android/fastlane/metadata/android/en-US/title.txt new file mode 100644 index 0000000..2d3bacf --- /dev/null +++ b/android/fastlane/metadata/android/en-US/title.txt @@ -0,0 +1 @@ +Paperless Mobile \ No newline at end of file diff --git a/android/fastlane/metadata/android/en-US/video.txt b/android/fastlane/metadata/android/en-US/video.txt new file mode 100644 index 0000000..e69de29 diff --git a/android/fastlane/report.xml b/android/fastlane/report.xml new file mode 100644 index 0000000..b246d30 --- /dev/null +++ b/android/fastlane/report.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/android/gradle.properties b/android/gradle.properties index 94adc3a..ea121f2 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,4 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true +android.suppressUnsupportedCompileSdk=33 diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 562c5e4..6b66533 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/fastlane/metadata/changelogs/19.txt b/fastlane/metadata/changelogs/19.txt deleted file mode 100644 index 59f7ec1..0000000 --- a/fastlane/metadata/changelogs/19.txt +++ /dev/null @@ -1 +0,0 @@ -* Add F-Droid metadata \ No newline at end of file diff --git a/fastlane/metadata/full_description.txt b/fastlane/metadata/full_description.txt deleted file mode 100644 index 0c5b82d..0000000 --- a/fastlane/metadata/full_description.txt +++ /dev/null @@ -1,15 +0,0 @@ -With this app you can conveniently add, manage or simply find documents stored in your paperless server without any compromises. - -🚀 Features -✔️ View your documents at a glance, in a compact list or a more detailed grid view -✔️ Add, delete or edit your documents -✔️ Share, download and preview PDF files -✔️ Manage and assign correspondents, document types, tags and storage paths -✔️ Scan and upload documents to paperless with preset correspondent, document type, tags and creation date -✔️ Upload existing documents from other apps via Paperless Mobile -✔️ See all new documents in a dedicated inbox -✔️ Search for documents using a wide range of filter criteria -✔️ Secure your data with biometric authentication across sessions -✔️ Support for TLS mutual authentication (client certificates) -✔️ Modern, intuitive UI built according to the Material Design 3 specification -✔️ Available in English and German language (more to come!) \ No newline at end of file diff --git a/fastlane/metadata/images/icon.png b/fastlane/metadata/images/icon.png deleted file mode 100644 index 4a6f7f7..0000000 Binary files a/fastlane/metadata/images/icon.png and /dev/null differ diff --git a/fastlane/metadata/short_description.txt b/fastlane/metadata/short_description.txt deleted file mode 100644 index f7db863..0000000 --- a/fastlane/metadata/short_description.txt +++ /dev/null @@ -1 +0,0 @@ -An (almost) fully fledged Paperless mobile client. \ No newline at end of file