Categories:
  - Phone & SMS
License: Apache-2.0
AuthorName: Mudar Noufal
AuthorEmail: mn@mudar.ca
WebSite: http://fairphone.mudar.ca/
SourceCode: https://gitlab.com/mudar-ca/PeaceOfMind
IssueTracker: https://gitlab.com/mudar-ca/PeaceOfMind/issues
Changelog: https://gitlab.com/mudar-ca/PeaceOfMind/-/releases

AutoName: Peace of Mind+
Description: |-
    We become more conscious of our phones as our lives become increasingly
    connected. Would you like to disconnect, if only for a moment? Your phone will
    go silent and disconnect from the world: no e-mail, no status updates, no SMS
    and no phone calls. Choose how long you wish to disconnect (up to 12 hours).

    Originally developed by Kwame Corporation for Fairphone 1, Peace of Mind+ aims
    simply to bring this beautiful app to other devices, and for future
    Fairphone-owners patiently waiting to receive their phone!

    App works without root, but from Android 4.2+ root access is needed to switch to
    flight mode. Without root access the app will switch the phone to silent mode
    only.

RepoType: git
Repo: https://gitlab.com/mudar-ca/PeaceOfMind.git

Builds:
  - versionName: '1.2'
    versionCode: 12
    disable: gradle to old for our magic?
    commit: 3c8548675f
    subdir: FairphonePeaceOfMind
    submodules: true
    gradle:
      - fdroidFlavor
    rm:
      - FairphoneHome
      - FairphoneUpdater
      - FairphonePeaceOfMind/libs

  - versionName: 2.1.1
    versionCode: 19
    commit: v2.1.1
    subdir: PeaceOfMind+/app
    gradle:
      - yes
    srclibs:
      - RootShell@1.6
    rm:
      - FairphoneHome
      - FairphoneUpdater
      - FairphonePeaceOfMind
      - PeaceOfMind+/RootShell/RootShell.aar
    prebuild:
      - sed -i -e '/maven.fabric.io/d' -e '/io.fabric/d' -e '/RootShell/d' build.gradle
      - cp -fR $$RootShell$$/src/main/java src/main/

  - versionName: 2.1.4
    versionCode: 22
    commit: v2.1.4
    subdir: PeaceOfMind+/app
    gradle:
      - yes
    srclibs:
      - RootShell@1.6
    rm:
      - FairphoneHome
      - FairphoneUpdater
      - FairphonePeaceOfMind
      - PeaceOfMind+/RootShell/RootShell.aar
    prebuild:
      - sed -i -e '/maven.fabric.io/d' -e '/io.fabric/d' -e '/com.crashlytics.sdk.android:crashlytics/,+2d'
        -e '/RootShell/d' -e 's/"USE_CRASHLYTICS", "true"/"USE_CRASHLYTICS", "false"/'
        build.gradle
      - sed -i -e '/maven {$/,+2d' -e '/io.fabric.tools:gradle/d' ../build.gradle
      - sed -i -e '/Fabric/d' -e '/com.crashlytics.android.Crashlytics/d' src/main/java/ca/mudar/fairphone/peaceofmind/PeaceOfMindApp.kt
      - sed -i -e '/Crashlytics/d' src/main/java/ca/mudar/fairphone/peaceofmind/util/LogUtils.java
      - cp -fR $$RootShell$$/src/main/java src/main/

MaintainerNotes: Includes Crashlytics.

AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 2.1.4
CurrentVersionCode: 22
