AbdulElahGwaith commited on
Commit
0b2a88d
·
verified ·
1 Parent(s): 88fbf87

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .editorconfig +24 -0
  2. .gitattributes +10 -35
  3. .github/FUNDING.yml +3 -0
  4. .github/ISSUE_TEMPLATE/bug_report.md +29 -0
  5. .github/ISSUE_TEMPLATE/config.yml +1 -0
  6. .github/ISSUE_TEMPLATE/feature_request.md +15 -0
  7. .github/ISSUE_TEMPLATE/other.md +6 -0
  8. .github/copilot-instructions.md +175 -0
  9. .github/mergeable.yml +22 -0
  10. .github/workflows/artifacts.yml +20 -0
  11. .github/workflows/preview-apk.yml +57 -0
  12. .github/workflows/release.yml +81 -0
  13. .gitignore +51 -0
  14. .gitmodules +3 -0
  15. .tx/config +10 -0
  16. BUILDING.md +245 -0
  17. CHANGELOG-upstream.md +0 -0
  18. CONTRIBUTING.md +153 -0
  19. Dockerfile +44 -0
  20. LICENSE +621 -0
  21. README.md +33 -0
  22. RELEASE.md +148 -0
  23. build.gradle +308 -0
  24. docs/f-droid.md +79 -0
  25. docs/images/2019-12-material-icon-dev-template.png +0 -0
  26. docs/images/2019-12-material-icon-template.png +0 -0
  27. docs/playstore.md +14 -0
  28. fastlane/metadata/android/en-US/full_description.txt +36 -0
  29. fastlane/metadata/android/en-US/images/featureGraphic.png +3 -0
  30. fastlane/metadata/android/en-US/images/icon.png +0 -0
  31. fastlane/metadata/android/en-US/images/phoneScreenshots/1.png +3 -0
  32. fastlane/metadata/android/en-US/images/phoneScreenshots/2.png +3 -0
  33. fastlane/metadata/android/en-US/images/phoneScreenshots/3.png +3 -0
  34. fastlane/metadata/android/en-US/images/phoneScreenshots/4.png +3 -0
  35. fastlane/metadata/android/en-US/images/phoneScreenshots/5.png +3 -0
  36. fastlane/metadata/android/en-US/short_description.txt +1 -0
  37. fastlane/metadata/android/en-US/title.txt +1 -0
  38. fastlane/metadata/android/ru-RU/full_description.txt +36 -0
  39. fastlane/metadata/android/ru-RU/short_description.txt +1 -0
  40. fastlane/metadata/android/ru-RU/title.txt +1 -0
  41. flake.lock +187 -0
  42. flake.nix +49 -0
  43. google-services.json +105 -0
  44. gradle.properties +5 -0
  45. gradle/wrapper/gradle-wrapper.jar +0 -0
  46. gradle/wrapper/gradle-wrapper.properties +7 -0
  47. gradlew +244 -0
  48. gradlew.bat +92 -0
  49. jni/Android.mk +36 -0
  50. jni/Application.mk +8 -0
.editorconfig ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # EditorConfig (https://editorconfig.org/)
2
+
3
+ root = true
4
+
5
+ [*]
6
+ end_of_line = lf
7
+ charset = utf-8
8
+ insert_final_newline = true
9
+
10
+ [*.java]
11
+ indent_style = space
12
+ indent_size = 2
13
+
14
+ [*.c]
15
+ indent_style = space
16
+ indent_size = 4
17
+
18
+ [*.gradle]
19
+ indent_style = space
20
+ indent_size = 4
21
+
22
+ [*.sh]
23
+ indent_style = space
24
+ indent_size = 4
.gitattributes CHANGED
@@ -1,35 +1,10 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
- *.model filter=lfs diff=lfs merge=lfs -text
13
- *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
- *.onnx filter=lfs diff=lfs merge=lfs -text
17
- *.ot filter=lfs diff=lfs merge=lfs -text
18
- *.parquet filter=lfs diff=lfs merge=lfs -text
19
- *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
- *.pt filter=lfs diff=lfs merge=lfs -text
23
- *.pth filter=lfs diff=lfs merge=lfs -text
24
- *.rar filter=lfs diff=lfs merge=lfs -text
25
- *.safetensors filter=lfs diff=lfs merge=lfs -text
26
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
- *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
- *.tflite filter=lfs diff=lfs merge=lfs -text
30
- *.tgz filter=lfs diff=lfs merge=lfs -text
31
- *.wasm filter=lfs diff=lfs merge=lfs -text
32
- *.xz filter=lfs diff=lfs merge=lfs -text
33
- *.zip filter=lfs diff=lfs merge=lfs -text
34
- *.zst filter=lfs diff=lfs merge=lfs -text
35
- *tfevents* filter=lfs diff=lfs merge=lfs -text
 
1
+ *.ai binary
2
+ fastlane/metadata/android/en-US/images/featureGraphic.png filter=lfs diff=lfs merge=lfs -text
3
+ fastlane/metadata/android/en-US/images/phoneScreenshots/1.png filter=lfs diff=lfs merge=lfs -text
4
+ fastlane/metadata/android/en-US/images/phoneScreenshots/2.png filter=lfs diff=lfs merge=lfs -text
5
+ fastlane/metadata/android/en-US/images/phoneScreenshots/3.png filter=lfs diff=lfs merge=lfs -text
6
+ fastlane/metadata/android/en-US/images/phoneScreenshots/4.png filter=lfs diff=lfs merge=lfs -text
7
+ fastlane/metadata/android/en-US/images/phoneScreenshots/5.png filter=lfs diff=lfs merge=lfs -text
8
+ src/main/assets/fonts/Roboto-Light.ttf filter=lfs diff=lfs merge=lfs -text
9
+ src/main/res/drawable/background_hd.jpg filter=lfs diff=lfs merge=lfs -text
10
+ src/main/res/drawable/intro1.png filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.github/FUNDING.yml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ ko_fi: adbenitez
2
+ liberapay: adbenitez
3
+ custom: "https://arcanechat.me/#contribute"
.github/ISSUE_TEMPLATE/bug_report.md ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: Bug report
3
+ about: Report something that isn't working.
4
+ title: ''
5
+ assignees: ''
6
+ labels: bug
7
+ ---
8
+
9
+ <!--
10
+ Please fill out as much of this form as you can (leaving out stuff that is not applicable is ok).
11
+ -->
12
+
13
+ - Android version:
14
+ - Device:
15
+ - ArcaneChat version:
16
+ - Expected behavior:
17
+ - Actual behavior:
18
+ - Steps to reproduce the problem:
19
+ - Screenshots:
20
+ - Logs:
21
+
22
+ <!--
23
+ Debug logs can be copied from within the app with
24
+ Settings menu -> Advanced -> View log
25
+
26
+ Logs may contain private data
27
+ which shall be removed or anonymised prior to posting.
28
+ -->
29
+
.github/ISSUE_TEMPLATE/config.yml ADDED
@@ -0,0 +1 @@
 
 
1
+ blank_issues_enabled: false
.github/ISSUE_TEMPLATE/feature_request.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: Feature request
3
+ about: Request a new feature.
4
+ title: ''
5
+ assignees: ''
6
+ labels: enhancement
7
+ ---
8
+
9
+ <!--
10
+ Please fill out as much of this form as you can (leaving out stuff that is not applicable is ok).
11
+ -->
12
+
13
+ ### Describe your feature:
14
+
15
+ ### Why do you think it is useful:
.github/ISSUE_TEMPLATE/other.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ ---
2
+ name: Other
3
+ about: Start with a new blank issue.
4
+ title: ''
5
+ assignees: ''
6
+ ---
.github/copilot-instructions.md ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GitHub Copilot Instructions for ArcaneChat Android
2
+
3
+ ## Project Overview
4
+
5
+ ArcaneChat is a Delta Chat Android client built on top of the official Delta Chat client with several improvements. It is a messenger app that uses email infrastructure for secure communication.
6
+
7
+ **Technology Stack:**
8
+ - **Language:** Java (Java 8 compatibility)
9
+ - **Build System:** Gradle with Android Gradle Plugin 8.11.1
10
+ - **Min SDK:** 21 (Android 5.0)
11
+ - **Target SDK:** 35 (Android 15)
12
+ - **NDK Version:** 27.0.12077973
13
+ - **Native Components:** Rust (deltachat-core-rust submodule)
14
+ - **UI Framework:** Android SDK, Material Design Components
15
+ - **Testing:** JUnit 4, Espresso, Mockito, PowerMock, AssertJ
16
+
17
+ ## Repository Structure
18
+
19
+ - `src/main/` - Main application source code
20
+ - `src/androidTest/` - Instrumented tests (UI tests, benchmarks)
21
+ - `src/gplay/` - Google Play flavor-specific code
22
+ - `src/foss/` - F-Droid/FOSS flavor-specific code
23
+ - `jni/deltachat-core-rust/` - Native Rust core library (submodule)
24
+ - `scripts/` - Build and helper scripts
25
+ - `docs/` - Documentation
26
+ - `fastlane/` - App store metadata and screenshots
27
+
28
+ ## Build Instructions
29
+
30
+ ### Prerequisites
31
+
32
+ 1. **Initialize submodules:**
33
+ ```bash
34
+ git submodule update --init --recursive
35
+ ```
36
+
37
+ 2. **Build native libraries:**
38
+ ```bash
39
+ scripts/ndk-make.sh
40
+ ```
41
+ Note: First run may take significant time as it builds for all architectures (armeabi-v7a, arm64-v8a, x86, x86_64)
42
+
43
+ 3. **Build APK:**
44
+ ```bash
45
+ ./gradlew assembleDebug
46
+ ```
47
+
48
+ ### Build Flavors
49
+
50
+ - **gplay:** Google Play version with Firebase Cloud Messaging (applicationId: `com.github.arcanechat`)
51
+ - **foss:** F-Droid version without proprietary services (applicationId: `chat.delta.lite`)
52
+
53
+ ### Build Outputs
54
+
55
+ - Debug APKs: `build/outputs/apk/gplay/debug/` and `build/outputs/apk/fat/debug/`
56
+ - Release APKs require signing configuration in `~/.gradle/gradle.properties`
57
+
58
+ ## Testing
59
+
60
+ ### Running Unit Tests
61
+
62
+ ```bash
63
+ ./gradlew test
64
+ ```
65
+
66
+ ### Running Instrumented Tests
67
+
68
+ 1. **Disable animations** on your device/emulator:
69
+ - Developer Options → Set "Window animation scale", "Transition animation scale", and "Animator duration scale" to 0x
70
+
71
+ 2. **Run tests:**
72
+ ```bash
73
+ ./gradlew connectedAndroidTest
74
+ ```
75
+
76
+ ### Online Tests
77
+
78
+ Some tests require real email credentials. Configure in `~/.gradle/gradle.properties`:
79
+ ```properties
80
+ TEST_ADDR=youraccount@yourdomain.org
81
+ TEST_MAIL_PW=yourpassword
82
+ ```
83
+
84
+ ### UI Tests and Benchmarks
85
+
86
+ - Located in `src/androidTest/java/com/b44t/messenger/`
87
+ - Test categories: `uitests/online/`, `uitests/offline/`, `uibenchmarks/`
88
+ - Run via Android Studio: Run → Edit Configurations → Android Instrumented Test
89
+
90
+ ## Coding Conventions
91
+
92
+ ### General Guidelines
93
+
94
+ 1. **Embrace existing style:** Match the coding style of the file you're editing
95
+ 2. **Minimize changes:** Don't refactor or rename in the same PR as bug fixes/features
96
+ 3. **Readable over paradigmatic:** Favor readability over strict Java patterns
97
+ 4. **Avoid premature optimization:** Keep things simple and on point
98
+ 5. **No excessive abstraction:** Avoid unnecessary factories, one-liner functions, or abstraction layers
99
+ 6. **Comments:** Only add comments if they match existing style or explain complex logic
100
+
101
+ ### Architecture
102
+
103
+ - **UI/Model Separation:** Delta Chat Core (Rust) handles the model layer
104
+ - **High-level interface:** Core provides data in UI-ready form; avoid additional transformations in UI layer
105
+ - **Direct approach:** Prefer direct implementation over excessive class hierarchies
106
+
107
+ ### Key Principles
108
+
109
+ - Work hard to avoid options and up-front choices
110
+ - Avoid speaking about keys/encryption in primary UI
111
+ - App must work offline and with poor network
112
+ - Users don't read much text
113
+ - Consistency matters
114
+ - Primary UI should only show highly useful features
115
+
116
+ ## Common Development Tasks
117
+
118
+ ### Adding New Features
119
+
120
+ 1. Consider the UX philosophy (minimal options, offline-first, simplicity)
121
+ 2. Check if core library changes are needed before implementing in UI
122
+ 3. Match existing code style in modified files
123
+ 4. Add instrumented tests for UI changes when appropriate
124
+ 5. Update relevant documentation
125
+
126
+ ### Modifying Core Integration
127
+
128
+ - Core library is in `jni/deltachat-core-rust/` submodule
129
+ - Java bindings are in `src/main/java/com/b44t/messenger/Dc*.java`
130
+ - JSON-RPC bindings in `chat.delta.rpc.*` package (generated via dcrpcgen)
131
+
132
+ ### Working with Translations
133
+
134
+ - Translations managed via Transifex (not in repository)
135
+ - English source strings: `res/values/strings.xml`
136
+ - Don't mix string changes with refactoring
137
+
138
+ ### Debugging Native Code
139
+
140
+ Decode crash symbols:
141
+ ```bash
142
+ $ANDROID_NDK_ROOT/ndk-stack --sym obj/local/armeabi-v7a --dump crash.txt > decoded.txt
143
+ ```
144
+
145
+ ## WebXDC Support
146
+
147
+ ArcaneChat has extended WebXDC support:
148
+ - `window.webxdc.arcanechat` - Version detection
149
+ - `sendToChat()` - Extra properties: `subject`, `html`, `type` (sticker/image/audio/video/file)
150
+ - External link support in apps
151
+ - `manifest.toml` - `orientation` field for landscape mode
152
+
153
+ ## Important Files
154
+
155
+ - `build.gradle` - Main build configuration
156
+ - `CONTRIBUTING.md` - Contribution guidelines
157
+ - `BUILDING.md` - Detailed build setup
158
+ - `RELEASE.md` - Release process
159
+ - `proguard-rules.pro` - ProGuard configuration
160
+ - `google-services.json` - Firebase configuration (gplay flavor)
161
+
162
+ ## Package Structure
163
+
164
+ - `org.thoughtcrime.securesms.*` - Main UI components (legacy namespace from Signal)
165
+ - `com.b44t.messenger.*` - Delta Chat core integration
166
+ - `chat.delta.rpc.*` - JSON-RPC bindings (generated)
167
+
168
+ ## Notes for AI Assistants
169
+
170
+ - This is a fork of Delta Chat Android with ArcaneChat-specific improvements
171
+ - Maintain compatibility with Delta Chat core library
172
+ - Test on both gplay and foss flavors when making changes
173
+ - Native library must be rebuilt after core changes
174
+ - ProGuard is enabled in both debug and release builds
175
+ - Multi-dex is enabled due to app size
.github/mergeable.yml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: 2
2
+ mergeable:
3
+ - when: pull_request.*
4
+ name: "Changelog check"
5
+ validate:
6
+ - do: or
7
+ validate:
8
+ - do: description
9
+ must_include:
10
+ regex: '#skip-changelog'
11
+ - do: and
12
+ validate:
13
+ - do: dependent
14
+ changed:
15
+ file: '**/*.java'
16
+ required: ['CHANGELOG.md']
17
+ fail:
18
+ - do: checks
19
+ status: 'action_required'
20
+ payload:
21
+ title: CHANGELOG.md might need an update
22
+ summary: "Please update CHANGELOG.md or add #skip-changelog to the description"
.github/workflows/artifacts.yml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: add artifact links to pull request
2
+ on:
3
+ workflow_run:
4
+ workflows: ["Upload Preview APK"]
5
+ types: [completed]
6
+
7
+ jobs:
8
+ artifacts-url-comments:
9
+ name: add artifact links to pull request
10
+ runs-on: ubuntu-latest
11
+ if: ${{ github.event.workflow_run.conclusion == 'success' }}
12
+ steps:
13
+ - name: add artifact links to pull request
14
+ uses: tonyhallett/artifacts-url-comments@v1.1.0
15
+ env:
16
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17
+ with:
18
+ prefix: "**To test the changes in this pull request, install this apk:**"
19
+ format: "[📦 {name}]({url})"
20
+ addTo: pull
.github/workflows/preview-apk.yml ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Upload Preview APK
2
+
3
+ on: pull_request
4
+
5
+ concurrency:
6
+ group: ${{ github.workflow }}-${{ github.ref }}
7
+ cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
8
+
9
+ jobs:
10
+ build:
11
+ name: Upload Preview APK
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v5
15
+ with:
16
+ submodules: recursive
17
+ - name: Validate Fastlane Metadata
18
+ uses: ashutoshgngwr/validate-fastlane-supply-metadata@v2
19
+ - uses: Swatinem/rust-cache@v2
20
+ with:
21
+ working-directory: jni/deltachat-core-rust
22
+ - uses: actions/setup-java@v5
23
+ with:
24
+ java-version: 17
25
+ distribution: 'temurin'
26
+ - uses: android-actions/setup-android@v3
27
+ - uses: actions/cache@v4
28
+ with:
29
+ path: |
30
+ ~/.gradle/caches
31
+ ~/.gradle/wrapper
32
+ key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
33
+ restore-keys: |
34
+ ${{ runner.os }}-gradle-
35
+ - uses: nttld/setup-ndk@v1
36
+ id: setup-ndk
37
+ with:
38
+ ndk-version: r27
39
+
40
+ - name: Validate Gradle Wrapper
41
+ uses: gradle/actions/wrapper-validation@v4
42
+
43
+ - name: Compile core
44
+ env:
45
+ ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
46
+ run: |
47
+ export PATH="${PATH}:${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin/"
48
+ scripts/install-toolchains.sh && scripts/ndk-make.sh armeabi-v7a
49
+
50
+ - name: Build APK
51
+ run: ./gradlew --no-daemon -PABI_FILTER=armeabi-v7a assembleFossDebug
52
+
53
+ - name: Upload APK
54
+ uses: actions/upload-artifact@v4
55
+ with:
56
+ name: app-preview.apk
57
+ path: 'build/outputs/apk/foss/debug/*.apk'
.github/workflows/release.yml ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Upload Release APK
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*.*.*'
7
+
8
+ jobs:
9
+ check:
10
+ runs-on: ubuntu-latest
11
+ outputs:
12
+ match: ${{ steps.check-tag.outputs.match }}
13
+ steps:
14
+ - id: check-tag
15
+ run: |
16
+ if [[ "${{ github.event.ref }}" =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
17
+ echo ::set-output name=match::true
18
+ fi
19
+
20
+ build:
21
+ needs: check
22
+ if: needs.check.outputs.match == 'true'
23
+ name: Upload Release APK
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - uses: actions/checkout@v3
27
+ with:
28
+ submodules: recursive
29
+ - uses: Swatinem/rust-cache@v2
30
+ with:
31
+ working-directory: jni/deltachat-core-rust
32
+ - uses: actions/setup-java@v3
33
+ with:
34
+ java-version: 17
35
+ distribution: 'temurin'
36
+ - uses: android-actions/setup-android@v3
37
+ - uses: nttld/setup-ndk@v1
38
+ id: setup-ndk
39
+ with:
40
+ ndk-version: r27
41
+
42
+ - name: Compile core
43
+ env:
44
+ ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
45
+ run: |
46
+ export PATH="${PATH}:${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin/:${ANDROID_NDK_ROOT}"
47
+ ./scripts/install-toolchains.sh && ./scripts/ndk-make.sh
48
+
49
+ - name: Build APK
50
+ run: |
51
+ mkdir -p ~/.gradle
52
+ echo -n ${{ secrets.KEYSTORE_FILE }} | base64 -d >> ~/keystore.jks
53
+ echo "DC_RELEASE_STORE_FILE=$HOME/keystore.jks" >> ~/.gradle/gradle.properties
54
+ echo "DC_RELEASE_STORE_PASSWORD=${{ secrets.KEYSTORE_PASSWORD }}" >> ~/.gradle/gradle.properties
55
+ echo "DC_RELEASE_KEY_ALIAS_FDROID=${{ secrets.ALIAS_FDROID }}" >> ~/.gradle/gradle.properties
56
+ echo "DC_RELEASE_KEY_ALIAS_GPLAY=${{ secrets.ALIAS_GPLAY }}" >> ~/.gradle/gradle.properties
57
+ echo "DC_RELEASE_KEY_PASSWORD=${{ secrets.KEYSTORE_PASSWORD }}" >> ~/.gradle/gradle.properties
58
+ ./gradlew assembleFossRelease
59
+ rm build/outputs/apk/foss/release/*universal*
60
+ ./gradlew assembleGplayRelease
61
+ mv build/outputs/apk/gplay/release/*universal* build/outputs/apk/foss/release/ArcaneChat-gplay.apk
62
+
63
+ - name: Release on GitHub
64
+ uses: softprops/action-gh-release@v1
65
+ with:
66
+ token: "${{ secrets.GITHUB_TOKEN }}"
67
+ body: '[<img src="store/get-it-on-gplay.png" alt="Get it on Google Play" height="48">](https://play.google.com/store/apps/details?id=com.github.arcanechat) [<img src="store/get-it-on-fdroid.png" alt="Get it on F-Droid" height="48">](https://f-droid.org/packages/chat.delta.lite) [<img src="store/get-it-on-github.png" alt="Get it on GitHub" height="48">](https://github.com/ArcaneChat/android/releases/latest/download/ArcaneChat-gplay.apk)'
68
+ prerelease: ${{ contains(github.event.ref, '-beta') }}
69
+ fail_on_unmatched_files: true
70
+ files: build/outputs/apk/foss/release/*.apk
71
+
72
+ - name: Release on ZapStore
73
+ run: |
74
+ export CHECKSUM=6e2c7cf6da53c3f1a78b523a6aacd6316dce3d74ace6f859c2676729ee439990
75
+ curl -sL https://cdn.zapstore.dev/$CHECKSUM -o zapstore
76
+ if echo "$CHECKSUM zapstore" | sha256sum -c --status; then
77
+ chmod +x zapstore
78
+ SIGN_WITH=${{ secrets.NOSTR_KEY }} ./zapstore publish --indexer-mode
79
+ else
80
+ echo "ERROR: checksum doesn't match!"
81
+ fi
.gitignore ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.keystore
2
+ .classpath
3
+ project.properties
4
+ .project
5
+ .settings
6
+ bin/
7
+ gen/
8
+ /gplay/
9
+ .idea/
10
+ *.iml
11
+ *.so
12
+ out
13
+ tests
14
+ lint.xml
15
+ local.properties
16
+ ant.properties
17
+ .DS_Store
18
+ build.log
19
+ build-log.xml
20
+ .gradle
21
+ build
22
+ signing.properties
23
+ library/lib/
24
+ library/obj/
25
+ ffpr
26
+ test/androidTestEspresso/res/values/arrays.xml
27
+ obj/
28
+ jni/libspeex/.deps/
29
+ ndkArch
30
+
31
+ # ignore debug symbols created by ./tools/upload-release.sh
32
+ *-symbols.zip
33
+
34
+ # ignore private scripts and directories, eg. local2github.prv.sh
35
+ *.prv*
36
+
37
+ # contains files for ndk-build when done from gradle.
38
+ .externalNativeBuild
39
+
40
+ # no vi tmp files
41
+ *.swp
42
+
43
+ jni/x86
44
+ jni/x86_64
45
+ jni/armeabi
46
+ jni/armeabi-v7a
47
+ jni/arm64-v8a
48
+
49
+ artwork/drawable*/
50
+ artwork/mipmap-*/
51
+ *~
.gitmodules ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ [submodule "jni/deltachat-core-rust"]
2
+ path = jni/deltachat-core-rust
3
+ url = https://github.com/ArcaneChat/core
.tx/config ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ [main]
2
+ host = https://www.transifex.com
3
+ lang_map = id: in, ja_JP: ja, nl_NL: nl, pt_BR: pt-rBR, zh_CN: zh-rCN, zh_TW: zh-rTW
4
+
5
+ [o:delta-chat:p:delta-chat-app:r:stringsxml]
6
+ file_filter = src/main/res/values-<lang>/strings.xml
7
+ source_file = src/main/res/values/strings.xml
8
+ source_lang = en
9
+ type = ANDROID
10
+
BUILDING.md ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Building and Testing
2
+
3
+ This document describes how to set up the build environment,
4
+ build and test the app. Before diving into developing, please
5
+ first read [CONTRIBUTING.md](./CONTRIBUTING.md) for general
6
+ contribution hints and conventions.
7
+
8
+ Please follow all steps precisely.
9
+ If you run into troubles,
10
+ ask on one of the [communication channels](https://delta.chat/contribute) for help
11
+
12
+
13
+ ## Check Out Repository
14
+
15
+ When checking out _deltachat-android_, make sure also to check out the
16
+ subproject _deltachat-core-rust_:
17
+
18
+ - When using Git, you can do this initially by
19
+ `$ git clone --recursive https://github.com/deltachat/deltachat-android`
20
+ or later by `git submodule update --init --recursive`. If you do this in your
21
+ home directory, this results in the folder `~/deltachat-android` which is just fine.
22
+
23
+ ## Generate JSON-RPC bindings
24
+
25
+ To generate/update the JSON-RPC bindings (ex. `chat.delta.rpc.*` package)
26
+ install Rust tooling (read sections below) and the [dcrpcgen tool](https://github.com/chatmail/dcrpcgen)
27
+ then generate the code running the script:
28
+
29
+ ```
30
+ ./scripts/generate-rpc-bindings.sh
31
+ ```
32
+
33
+ ## Build Using Nix
34
+
35
+ The repository contains [Nix](https://nixos.org/) development environment
36
+ described in `flake.nix` file.
37
+ If you don't have Nix installed,
38
+ the easiest way is to follow the [Lix installation instructions](https://lix.systems/install/)
39
+ as this results in a setup with [Flakes](https://nixos.wiki/wiki/Flakes) feature enabled out of the box
40
+ and can be cleanly uninstalled with `/nix/nix-installer uninstall` once you don't need it anymore.
41
+
42
+ Once you have Nix with Flakes feature set up start the development environment shell:
43
+ ```
44
+ nix develop
45
+ ```
46
+ Nix development environment contains Rust with cross-compilation toolchains and Android SDK.
47
+
48
+ To [build an APK](https://developer.android.com/studio/build/building-cmdline) run the following 2 steps.
49
+ Note that the first step may take some time to build for all architectures. You can optionally read
50
+ [the first comment block in the `ndk-make.sh` script](https://github.com/deltachat/deltachat-android/blob/master/scripts/ndk-make.sh)
51
+ for pointers on how to build for a specific architecture.
52
+ ```
53
+ $ scripts/ndk-make.sh
54
+ $ ./gradlew assembleDebug
55
+ ```
56
+
57
+ Resulting APK files can be found in
58
+ `build/outputs/apk/gplay/debug/` and
59
+ `build/outputs/apk/fat/debug/`.
60
+
61
+ ## Build Using Dockerfile
62
+
63
+ Another way to build APK is to use provided `Dockerfile`
64
+ with [Docker](https://www.docker.com/) or [Podman](https://podman.io/).
65
+ Podman is a drop-in replacement for Docker that does not require root privileges.
66
+
67
+ If you don't have Docker or Podman setup yet, read [how to setup Podman](#setup-podman)
68
+ below. If you don't want to use Docker or Podman, read [how to manually install the
69
+ build environment](#install-build-environment).
70
+
71
+ First, build the image `deltachat-android` by running
72
+ ```
73
+ podman build --build-arg UID=$(id -u) --build-arg GID=$(id -g) . -t deltachat-android
74
+ ```
75
+ or
76
+ ```
77
+ docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) . -t deltachat-android
78
+ ```
79
+
80
+ Then, run the image:
81
+ ```
82
+ podman run --userns=keep-id -it --name deltachat -v $(pwd):/home/app:z -w /home/app localhost/deltachat-android
83
+ ```
84
+ or
85
+ ```
86
+ docker run -it --name deltachat -v $(pwd):/home/app:z -w /home/app localhost/deltachat-android
87
+ ```
88
+
89
+ You can leave the container with Ctrl+D or by typing `exit` and re-enter it with
90
+ `docker start -ia deltachat` or `podman start -ia deltachat`.
91
+
92
+ Within the container, install toolchains and build the native library:
93
+ ```
94
+ deltachat@6012dcb974fe:/home/app$ scripts/install-toolchains.sh
95
+ deltachat@6012dcb974fe:/home/app$ scripts/ndk-make.sh
96
+ ```
97
+
98
+ Then, [build an APK](https://developer.android.com/studio/build/building-cmdline):
99
+ ```
100
+ deltachat@6012dcb974fe:/home/app$ ./gradlew assembleDebug
101
+ ```
102
+
103
+ ### Troubleshooting
104
+
105
+ - Executing `./gradlew assembleDebug` inside the container fails with `The SDK directory '/home/user/Android/Sdk' does not exist.`:
106
+
107
+ The problem is that Android Studio (outside the container) automatically creates a file `local.properties` with a content like `sdk.dir=/home/username/Android/Sdk`,
108
+ so, Gradle-inside-the-container looks for the Sdk at `/home/username/Android/Sdk`, where it can't find it.
109
+ You could:
110
+ - either: remove the file or just the line starting with `sdk.dir`
111
+ - or: run `./gradlew assembleDebug` from outside the container (however, there may be incompatibility issues if different versions are installed inside and outside the container)
112
+
113
+ - Running the image fails with `ERRO[0000] The storage 'driver' option must be set in /etc/containers/storage.conf, guarantee proper operation.`:
114
+
115
+ In /etc/containers/storage.conf, replace the line: `driver = ""` with: `driver = "overlay"`.
116
+ You can also set the `driver` option to something else, you just need to set it to _something_.
117
+ [Read about possible options here](https://github.com/containers/storage/blob/master/docs/containers-storage.conf.5.md#storage-table).
118
+
119
+ ## <a name="setup-podman"></a>Setup Podman
120
+
121
+ These instructions were only tested on a Manjaro machine so far. If anything doesn't work, please open an issue.
122
+
123
+ First, [Install Podman](https://podman.io/getting-started/installation).
124
+
125
+ Then, if you want to run Podman without root, run:
126
+ ```
127
+ sudo touch /etc/subgid
128
+ sudo touch /etc/subuid
129
+ sudo usermod --add-subuids 165536-231072 --add-subgids 165536-231072 yourusername
130
+ ```
131
+ (replace `yourusername` with your username).
132
+ See https://wiki.archlinux.org/index.php/Podman#Rootless_Podman for more information.
133
+
134
+ ## <a name="install-build-environment"></a>Install Build Environment (without Docker or Podman)
135
+
136
+ To setup build environment manually:
137
+ - _Either_, in Android Studio, go to "Tools / SDK Manager / SDK Tools", enable "Show Package Details",
138
+ select "CMake" and the desired NDK (install the same NDK version as the [Dockerfile](https://github.com/deltachat/deltachat-android/blob/master/Dockerfile)), hit "Apply".
139
+ - _Or_ read [Dockerfile](https://github.com/deltachat/deltachat-android/blob/master/Dockerfile) and mimic what it does.
140
+
141
+ Then, in both cases, install Rust using [rustup](https://rustup.rs/)
142
+ and Rust toolchains for cross-compilation by executing `scripts/install-toolchains.sh`.
143
+
144
+ Then, configure `ANDROID_NDK_ROOT` environment variable to point to the Android NDK
145
+ installation directory e.g. by adding this to your `.bashrc`:
146
+
147
+ ```bash
148
+ export ANDROID_NDK_ROOT=${HOME}/Android/Sdk/ndk/[version] # (or wherever your NDK is) Note that there is no `/` at the end!
149
+ export PATH=${PATH}:${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin/:${ANDROID_NDK_ROOT}
150
+ ```
151
+
152
+ After that, call `scripts/ndk-make.sh` in the root directory to build core-rust.
153
+ Afterwards run the project in Android Studio. The project requires API 25.
154
+
155
+ With chance, that's it :) - if not, read on how to set up a proper development
156
+ environment.
157
+
158
+
159
+ ## Install Development Environment
160
+
161
+ 1. Some libs required by Android Studio may be missing on 64 bit Linux machines
162
+ [Source](https://developer.android.com/studio/install.html)], so for Ubuntu execute
163
+ `$ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386`
164
+ and for Fedora execute
165
+ `$ sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686`.
166
+
167
+ 2. Download Android Studio from <https://developer.android.com> (android-studio-ide-...-linux.zip)
168
+ and unpack the archive which contains a single folder called `android-studio`;
169
+ move this folder e.g. to `~/android-studio`.
170
+
171
+ 3. To launch Android Studio for the first time, open a terminal, navigate to
172
+ `~/android-studio/bin`, execute `./studio.sh` and use all the standard values
173
+ from the wizard.
174
+
175
+ 4. Android Studio now asks you if you want to open an existing project;
176
+ choose `~/deltachat-android` as created in the "Build" chapter (Android Studio starts to
177
+ build the project, however, there are some steps missing before this will
178
+ succeed).
179
+
180
+ 5. If components are missing, click on the corresponding error
181
+ message and install eg. required SDKs and the "Build-Tools" (you should
182
+ also find the option at "Tools / Android / SDK Manager / SDK Platforms").
183
+ Now the build should succeed - but the app still misses the native part.
184
+
185
+ 6. Download Android NDK from
186
+ [NDK Archives](https://developer.android.com/ndk/downloads)
187
+ and extract the archive containing a single folder
188
+ called something like `android-ndk-r23b-linux`; move this folder e.g. to `~/android-ndk`.
189
+
190
+ 7. Export the folder path to your environment as `ANDROID_NDK_ROOT` and add it to `PATH`.
191
+ You can achieve this e.g. by adding this to your `.bashrc`
192
+ ```bash
193
+ export ANDROID_NDK_ROOT=${HOME}/android-ndk
194
+ export PATH=${PATH}:${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin/:${ANDROID_NDK_ROOT}
195
+ ```
196
+
197
+ ## Run UI Tests and Benchmarks
198
+
199
+ - You don't necessarily need a dedicated testing device.
200
+ Backup your current account first, maybe there are some bugs in switching accounts.
201
+
202
+ - You can run benchmarks on either an emulated device or a real device.
203
+ You need at least Android 9. For better benchmark results,
204
+ you should run the benchmark on a real device and make sure that the core is compiled in release mode.
205
+
206
+ - Disable animations on your device, otherwise the test may fail:
207
+ at "Developer options"
208
+ set all of "Window animation scale", "Transition animation scale" and "Animator duration scale" to 0x
209
+
210
+ - In Android Studio: "File" / "Sync project with gradle files"
211
+
212
+ - In Android Studio: "Run" / "Edit configurations" / "+" / "Android Instrumented test":
213
+ Either select a specific class or select "All in Module" / "OK" /
214
+ Select your configuration in the toolbar / Click on the green "run" button in the toolbar to run the tests
215
+
216
+ ### Get the benchmark results
217
+
218
+ When the benchmark is done, you will get a result like
219
+ `MEASURED RESULTS (Benchmark) - Going thorough all 10 chats: 11635,11207,11363,11352,11279,11183,11137,11145,11032,11057`.
220
+ You can paste `11635,11207,11363,11352,11279,11183,11137,11145,11032,11057`
221
+ into a cell in a LibreOffice spreadsheet, do "Data" / "Text to columns",
222
+ choose `,` as a separator, hit "OK", and create a diagram.
223
+
224
+ ### Run online tests
225
+
226
+ For some tests, you need to provide the credentials to an actual email account.
227
+ You have 2 ways to do this:
228
+
229
+ 1. (Recommended): Put them into the file ~/.gradle/gradle.properties (create it if it doesn't exist):
230
+ ```
231
+ TEST_ADDR=youraccount@yourdomain.org
232
+ TEST_MAIL_PW=youpassword
233
+ ```
234
+
235
+ 2. Or set them via environment variables.
236
+
237
+ ## Decoding Symbols in Crash Reports
238
+
239
+ ```
240
+ $ANDROID_NDK_ROOT/ndk-stack --sym obj/local/armeabi-v7a --dump crash.txt > decoded.txt
241
+ ```
242
+
243
+ `obj/local/armeabi-v7a` is the extracted path from `deltachat-gplay-release-X.X.X.apk-symbols.zip` file from https://download.delta.chat/android/symbols/
244
+
245
+ Replace `armeabi-v7a` by the correct architecture the logs come from (can be guessed by trial and error)
CHANGELOG-upstream.md ADDED
The diff for this file is too large to render. See raw diff
 
CONTRIBUTING.md ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Contributing Guidelines
2
+
3
+ Thank you for looking for ways to help on Delta Chat Android!
4
+
5
+ This document tries to outline some conventions that may not be obvious
6
+ and aims to give a good starting point to new contributors.
7
+
8
+
9
+ ## Reporting Bugs
10
+
11
+ If you found a bug, [report it on Github](https://github.com/deltachat/deltachat-android/issues).
12
+
13
+ Project maintainers may transfer bugs that are not UI specific
14
+ (eg. network, database or encryption related)
15
+ to [Delta Chat Core](https://github.com/deltachat/deltachat-core-rust/issues).
16
+ If you assume beforehand, that the bug you've found belongs to Core,
17
+ you can report there directly.
18
+
19
+ Please search both open and closed issues to make sure your bug report is not a duplicate.
20
+
21
+ For community interactions around Delta Chat
22
+ please read our [Community Standards](https://delta.chat/community-standards).
23
+
24
+
25
+ ## Proposing Features
26
+
27
+ If you have a feature request,
28
+ create a new topic on the [Forum](https://support.delta.chat/c/features/6).
29
+
30
+
31
+ ## Rough UX Philosophy
32
+
33
+ Some rough ideas, that may be helpful when thinking about how to enhance things:
34
+
35
+ - Work hard to avoid options and up-front choices.
36
+ Thinking about concrete user stories may help on that.
37
+ - Avoid to speak about keys and other hard to understand things in the primary UI.
38
+ - The app shall work offline as well as with bad network.
39
+ - Users do not read (much).
40
+ - Consistency matters.
41
+ - Offer only things that are highly useful to many people in primary UI.
42
+ If really needed, bury other things eg. in some menus.
43
+ - The app should be for the many, not for the few.
44
+
45
+
46
+ ## Contributing Code
47
+
48
+ The [BUILDING.md](./BUILDING.md) file explains in detail how to set up the build environment.
49
+ Please follow all steps precisely.
50
+ If you run into troubles,
51
+ ask on one of the [communication channels](https://delta.chat/contribute) for help.
52
+
53
+ To contribute code,
54
+ [open a Pull Request](https://github.com/deltachat/deltachat-android/pulls).
55
+
56
+ If you have write access to the repository,
57
+ push a branch named `<username>/<feature>`
58
+ so it is clear who is responsible for the branch,
59
+ and open a PR proposing to merge the change.
60
+ Otherwise fork the repository and create a branch in your fork.
61
+
62
+ Please add a meaningful description to your PR
63
+ so that reviewers get an idea about what the modifications are supposed to do.
64
+
65
+ A meaningful PR title is helpful for [updating `CHANGELOG.md` on releases](./RELEASE.md)
66
+ (CHANGELOG.md is updated manually
67
+ to only add things that are at least roughly understandable by the end user)
68
+
69
+ If the changes affect the user interface,
70
+ screenshots are very helpful,
71
+ esp. before/after screenshots.
72
+
73
+
74
+ ### Coding Conventions
75
+
76
+ Source files are partly derived from different other open source projects
77
+ and may follow different coding styles and conventions.
78
+
79
+ If you do a PR fixing a bug or adding a feature,
80
+ please embrace the coding convention you see in the corresponding files,
81
+ so that the result fits well together.
82
+
83
+ Do not refactor or rename things in the same PR
84
+ to make the diff small and the PR easy to review.
85
+
86
+ Project language is Java.
87
+
88
+ By using [Delta Chat Core](https://github.com/deltachat/deltachat-core-rust)
89
+ there is already a strong separation between "UI" and "Model".
90
+ Further separations and abstraction layers are often not helpful
91
+ and only add more complexity.
92
+
93
+ Try to avoid premature optimisation
94
+ and complexity because it "may be needed in some future".
95
+ Usually, it is not.
96
+
97
+ Readable code is better than having some Java paradigms fulfilled.
98
+ Classic Java has a strong drive to add lots of classes, factories, one-liner-functions.
99
+ Try to not follow these patterns and keep things really on point and simple.
100
+ If this gets in conflict with embracing existing style, however,
101
+ consistency with existing code is more important.
102
+
103
+ The "Delta Chat Core" is a high-level interface to what the UI actually needs,
104
+ data should be served in a form that the UI do not need much additional work.
105
+ If this is not the case, consider a feature proposal to "Delta Chat Core".
106
+
107
+
108
+ ### Merging Conventions
109
+
110
+ PR are merged usually to the branch `main` from which [releases](./RELEASE.md) are done.
111
+
112
+ As a default, do a `git rebase main` in case feature branches and `main` differ too much.
113
+
114
+ Once a PR has an approval, unless stated otherwise, it can be merged by the author.
115
+ A PR may be approved but postponed to be merged eg. because of an ongoing release.
116
+
117
+ To ensure the correct merge merge strategy, merging left up to the PR author:
118
+
119
+ - Usually, PR are squash-merged
120
+ as UI development often results in tiny tweak commits that are not that meaningful on their own.
121
+ - If all commits are meaningful and have a well-written description,
122
+ they can be rebased-merged.
123
+
124
+ If you do not have write access to the repository,
125
+ you may leave a note in the PR about the desired merge strategy.
126
+
127
+
128
+ ## Translations
129
+
130
+ Translations are done via [Transifex](https://explore.transifex.com/delta-chat/),
131
+ you can log in there with your E-Mail Address or with a Github or Google handle.
132
+ You find two projects there:
133
+ - "Delta Chat App" contains the strings used in the app's UI
134
+ - "Delta Chat Website" contains the offline help from "Settings / Help"
135
+ as well as the pages used on <https://delta.chat>
136
+
137
+ Most strings and the whole help are used for all systems
138
+ (Android, iOS, Linux, Windows, macOS)
139
+ and should be formulated accordingly.
140
+
141
+ If you want to change the english sources,
142
+ do a PR to [`strings.xml`](https://github.com/deltachat/deltachat-android/blob/main/res/values/strings.xml)
143
+ or to [`help.md`](https://github.com/deltachat/deltachat-pages/blob/master/en/help.md).
144
+ Again, please do not mix adding things and refactorings, esp. for `help.md`,
145
+ this would require retranslations and should be considered carefully.
146
+
147
+
148
+ ## Other Ways To Contribute
149
+
150
+ For other ways to contribute, refer to the [website](https://delta.chat/contribute).
151
+
152
+ If you think, something important is missed in this overview,
153
+ please do a PR to this document :)
Dockerfile ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM docker.io/debian:12.4
2
+
3
+ # Install Android Studio requirements
4
+ # See https://developer.android.com/studio/install#linux
5
+ RUN apt-get update -y \
6
+ && apt-get install -y --no-install-recommends \
7
+ wget \
8
+ curl \
9
+ unzip \
10
+ openjdk-17-jre \
11
+ file \
12
+ build-essential \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ ARG USER=deltachat
16
+ ARG UID=1000
17
+ ARG GID=1000
18
+
19
+ RUN groupadd -g $GID -o $USER
20
+ RUN useradd -m -u $UID -g $GID -o $USER
21
+ USER $USER
22
+
23
+ ENV ANDROID_SDK_ROOT /home/${USER}/android-sdk
24
+ RUN mkdir ${ANDROID_SDK_ROOT}
25
+ WORKDIR $ANDROID_SDK_ROOT
26
+ RUN wget -q https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip && \
27
+ unzip commandlinetools-linux-8512546_latest.zip && \
28
+ rm commandlinetools-linux-8512546_latest.zip
29
+
30
+ RUN yes | ${ANDROID_SDK_ROOT}/cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_SDK_ROOT} --licenses
31
+
32
+ ENV PATH ${PATH}:${ANDROID_SDK_ROOT}/cmdline-tools/bin
33
+
34
+ # Install NDK manually. Other SDK parts are installed automatically by gradle.
35
+ #
36
+ # If you change the NDK version here, also change it in `flake.nix`.
37
+ # NDK version r27 LTS aka 27.0.11902837
38
+ RUN sdkmanager --sdk_root=${ANDROID_SDK_ROOT} 'ndk;27.0.11902837'
39
+
40
+ ENV ANDROID_NDK_ROOT ${ANDROID_SDK_ROOT}/ndk/27.0.11902837
41
+ ENV PATH ${PATH}:${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin/
42
+
43
+ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
44
+ ENV PATH ${PATH}:/home/${USER}/.cargo/bin
LICENSE ADDED
@@ -0,0 +1,621 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU General Public License is a free, copyleft license for
11
+ software and other kinds of works.
12
+
13
+ The licenses for most software and other practical works are designed
14
+ to take away your freedom to share and change the works. By contrast,
15
+ the GNU General Public License is intended to guarantee your freedom to
16
+ share and change all versions of a program--to make sure it remains free
17
+ software for all its users. We, the Free Software Foundation, use the
18
+ GNU General Public License for most of our software; it applies also to
19
+ any other work released this way by its authors. You can apply it to
20
+ your programs, too.
21
+
22
+ When we speak of free software, we are referring to freedom, not
23
+ price. Our General Public Licenses are designed to make sure that you
24
+ have the freedom to distribute copies of free software (and charge for
25
+ them if you wish), that you receive source code or can get it if you
26
+ want it, that you can change the software or use pieces of it in new
27
+ free programs, and that you know you can do these things.
28
+
29
+ To protect your rights, we need to prevent others from denying you
30
+ these rights or asking you to surrender the rights. Therefore, you have
31
+ certain responsibilities if you distribute copies of the software, or if
32
+ you modify it: responsibilities to respect the freedom of others.
33
+
34
+ For example, if you distribute copies of such a program, whether
35
+ gratis or for a fee, you must pass on to the recipients the same
36
+ freedoms that you received. You must make sure that they, too, receive
37
+ or can get the source code. And you must show them these terms so they
38
+ know their rights.
39
+
40
+ Developers that use the GNU GPL protect your rights with two steps:
41
+ (1) assert copyright on the software, and (2) offer you this License
42
+ giving you legal permission to copy, distribute and/or modify it.
43
+
44
+ For the developers' and authors' protection, the GPL clearly explains
45
+ that there is no warranty for this free software. For both users' and
46
+ authors' sake, the GPL requires that modified versions be marked as
47
+ changed, so that their problems will not be attributed erroneously to
48
+ authors of previous versions.
49
+
50
+ Some devices are designed to deny users access to install or run
51
+ modified versions of the software inside them, although the manufacturer
52
+ can do so. This is fundamentally incompatible with the aim of
53
+ protecting users' freedom to change the software. The systematic
54
+ pattern of such abuse occurs in the area of products for individuals to
55
+ use, which is precisely where it is most unacceptable. Therefore, we
56
+ have designed this version of the GPL to prohibit the practice for those
57
+ products. If such problems arise substantially in other domains, we
58
+ stand ready to extend this provision to those domains in future versions
59
+ of the GPL, as needed to protect the freedom of users.
60
+
61
+ Finally, every program is threatened constantly by software patents.
62
+ States should not allow patents to restrict development and use of
63
+ software on general-purpose computers, but in those that do, we wish to
64
+ avoid the special danger that patents applied to a free program could
65
+ make it effectively proprietary. To prevent this, the GPL assures that
66
+ patents cannot be used to render the program non-free.
67
+
68
+ The precise terms and conditions for copying, distribution and
69
+ modification follow.
70
+
71
+ TERMS AND CONDITIONS
72
+
73
+ 0. Definitions.
74
+
75
+ "This License" refers to version 3 of the GNU General Public License.
76
+
77
+ "Copyright" also means copyright-like laws that apply to other kinds of
78
+ works, such as semiconductor masks.
79
+
80
+ "The Program" refers to any copyrightable work licensed under this
81
+ License. Each licensee is addressed as "you". "Licensees" and
82
+ "recipients" may be individuals or organizations.
83
+
84
+ To "modify" a work means to copy from or adapt all or part of the work
85
+ in a fashion requiring copyright permission, other than the making of an
86
+ exact copy. The resulting work is called a "modified version" of the
87
+ earlier work or a work "based on" the earlier work.
88
+
89
+ A "covered work" means either the unmodified Program or a work based
90
+ on the Program.
91
+
92
+ To "propagate" a work means to do anything with it that, without
93
+ permission, would make you directly or secondarily liable for
94
+ infringement under applicable copyright law, except executing it on a
95
+ computer or modifying a private copy. Propagation includes copying,
96
+ distribution (with or without modification), making available to the
97
+ public, and in some countries other activities as well.
98
+
99
+ To "convey" a work means any kind of propagation that enables other
100
+ parties to make or receive copies. Mere interaction with a user through
101
+ a computer network, with no transfer of a copy, is not conveying.
102
+
103
+ An interactive user interface displays "Appropriate Legal Notices"
104
+ to the extent that it includes a convenient and prominently visible
105
+ feature that (1) displays an appropriate copyright notice, and (2)
106
+ tells the user that there is no warranty for the work (except to the
107
+ extent that warranties are provided), that licensees may convey the
108
+ work under this License, and how to view a copy of this License. If
109
+ the interface presents a list of user commands or options, such as a
110
+ menu, a prominent item in the list meets this criterion.
111
+
112
+ 1. Source Code.
113
+
114
+ The "source code" for a work means the preferred form of the work
115
+ for making modifications to it. "Object code" means any non-source
116
+ form of a work.
117
+
118
+ A "Standard Interface" means an interface that either is an official
119
+ standard defined by a recognized standards body, or, in the case of
120
+ interfaces specified for a particular programming language, one that
121
+ is widely used among developers working in that language.
122
+
123
+ The "System Libraries" of an executable work include anything, other
124
+ than the work as a whole, that (a) is included in the normal form of
125
+ packaging a Major Component, but which is not part of that Major
126
+ Component, and (b) serves only to enable use of the work with that
127
+ Major Component, or to implement a Standard Interface for which an
128
+ implementation is available to the public in source code form. A
129
+ "Major Component", in this context, means a major essential component
130
+ (kernel, window system, and so on) of the specific operating system
131
+ (if any) on which the executable work runs, or a compiler used to
132
+ produce the work, or an object code interpreter used to run it.
133
+
134
+ The "Corresponding Source" for a work in object code form means all
135
+ the source code needed to generate, install, and (for an executable
136
+ work) run the object code and to modify the work, including scripts to
137
+ control those activities. However, it does not include the work's
138
+ System Libraries, or general-purpose tools or generally available free
139
+ programs which are used unmodified in performing those activities but
140
+ which are not part of the work. For example, Corresponding Source
141
+ includes interface definition files associated with source files for
142
+ the work, and the source code for shared libraries and dynamically
143
+ linked subprograms that the work is specifically designed to require,
144
+ such as by intimate data communication or control flow between those
145
+ subprograms and other parts of the work.
146
+
147
+ The Corresponding Source need not include anything that users
148
+ can regenerate automatically from other parts of the Corresponding
149
+ Source.
150
+
151
+ The Corresponding Source for a work in source code form is that
152
+ same work.
153
+
154
+ 2. Basic Permissions.
155
+
156
+ All rights granted under this License are granted for the term of
157
+ copyright on the Program, and are irrevocable provided the stated
158
+ conditions are met. This License explicitly affirms your unlimited
159
+ permission to run the unmodified Program. The output from running a
160
+ covered work is covered by this License only if the output, given its
161
+ content, constitutes a covered work. This License acknowledges your
162
+ rights of fair use or other equivalent, as provided by copyright law.
163
+
164
+ You may make, run and propagate covered works that you do not
165
+ convey, without conditions so long as your license otherwise remains
166
+ in force. You may convey covered works to others for the sole purpose
167
+ of having them make modifications exclusively for you, or provide you
168
+ with facilities for running those works, provided that you comply with
169
+ the terms of this License in conveying all material for which you do
170
+ not control copyright. Those thus making or running the covered works
171
+ for you must do so exclusively on your behalf, under your direction
172
+ and control, on terms that prohibit them from making any copies of
173
+ your copyrighted material outside their relationship with you.
174
+
175
+ Conveying under any other circumstances is permitted solely under
176
+ the conditions stated below. Sublicensing is not allowed; section 10
177
+ makes it unnecessary.
178
+
179
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
+
181
+ No covered work shall be deemed part of an effective technological
182
+ measure under any applicable law fulfilling obligations under article
183
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
+ similar laws prohibiting or restricting circumvention of such
185
+ measures.
186
+
187
+ When you convey a covered work, you waive any legal power to forbid
188
+ circumvention of technological measures to the extent such circumvention
189
+ is effected by exercising rights under this License with respect to
190
+ the covered work, and you disclaim any intention to limit operation or
191
+ modification of the work as a means of enforcing, against the work's
192
+ users, your or third parties' legal rights to forbid circumvention of
193
+ technological measures.
194
+
195
+ 4. Conveying Verbatim Copies.
196
+
197
+ You may convey verbatim copies of the Program's source code as you
198
+ receive it, in any medium, provided that you conspicuously and
199
+ appropriately publish on each copy an appropriate copyright notice;
200
+ keep intact all notices stating that this License and any
201
+ non-permissive terms added in accord with section 7 apply to the code;
202
+ keep intact all notices of the absence of any warranty; and give all
203
+ recipients a copy of this License along with the Program.
204
+
205
+ You may charge any price or no price for each copy that you convey,
206
+ and you may offer support or warranty protection for a fee.
207
+
208
+ 5. Conveying Modified Source Versions.
209
+
210
+ You may convey a work based on the Program, or the modifications to
211
+ produce it from the Program, in the form of source code under the
212
+ terms of section 4, provided that you also meet all of these conditions:
213
+
214
+ a) The work must carry prominent notices stating that you modified
215
+ it, and giving a relevant date.
216
+
217
+ b) The work must carry prominent notices stating that it is
218
+ released under this License and any conditions added under section
219
+ 7. This requirement modifies the requirement in section 4 to
220
+ "keep intact all notices".
221
+
222
+ c) You must license the entire work, as a whole, under this
223
+ License to anyone who comes into possession of a copy. This
224
+ License will therefore apply, along with any applicable section 7
225
+ additional terms, to the whole of the work, and all its parts,
226
+ regardless of how they are packaged. This License gives no
227
+ permission to license the work in any other way, but it does not
228
+ invalidate such permission if you have separately received it.
229
+
230
+ d) If the work has interactive user interfaces, each must display
231
+ Appropriate Legal Notices; however, if the Program has interactive
232
+ interfaces that do not display Appropriate Legal Notices, your
233
+ work need not make them do so.
234
+
235
+ A compilation of a covered work with other separate and independent
236
+ works, which are not by their nature extensions of the covered work,
237
+ and which are not combined with it such as to form a larger program,
238
+ in or on a volume of a storage or distribution medium, is called an
239
+ "aggregate" if the compilation and its resulting copyright are not
240
+ used to limit the access or legal rights of the compilation's users
241
+ beyond what the individual works permit. Inclusion of a covered work
242
+ in an aggregate does not cause this License to apply to the other
243
+ parts of the aggregate.
244
+
245
+ 6. Conveying Non-Source Forms.
246
+
247
+ You may convey a covered work in object code form under the terms
248
+ of sections 4 and 5, provided that you also convey the
249
+ machine-readable Corresponding Source under the terms of this License,
250
+ in one of these ways:
251
+
252
+ a) Convey the object code in, or embodied in, a physical product
253
+ (including a physical distribution medium), accompanied by the
254
+ Corresponding Source fixed on a durable physical medium
255
+ customarily used for software interchange.
256
+
257
+ b) Convey the object code in, or embodied in, a physical product
258
+ (including a physical distribution medium), accompanied by a
259
+ written offer, valid for at least three years and valid for as
260
+ long as you offer spare parts or customer support for that product
261
+ model, to give anyone who possesses the object code either (1) a
262
+ copy of the Corresponding Source for all the software in the
263
+ product that is covered by this License, on a durable physical
264
+ medium customarily used for software interchange, for a price no
265
+ more than your reasonable cost of physically performing this
266
+ conveying of source, or (2) access to copy the
267
+ Corresponding Source from a network server at no charge.
268
+
269
+ c) Convey individual copies of the object code with a copy of the
270
+ written offer to provide the Corresponding Source. This
271
+ alternative is allowed only occasionally and noncommercially, and
272
+ only if you received the object code with such an offer, in accord
273
+ with subsection 6b.
274
+
275
+ d) Convey the object code by offering access from a designated
276
+ place (gratis or for a charge), and offer equivalent access to the
277
+ Corresponding Source in the same way through the same place at no
278
+ further charge. You need not require recipients to copy the
279
+ Corresponding Source along with the object code. If the place to
280
+ copy the object code is a network server, the Corresponding Source
281
+ may be on a different server (operated by you or a third party)
282
+ that supports equivalent copying facilities, provided you maintain
283
+ clear directions next to the object code saying where to find the
284
+ Corresponding Source. Regardless of what server hosts the
285
+ Corresponding Source, you remain obligated to ensure that it is
286
+ available for as long as needed to satisfy these requirements.
287
+
288
+ e) Convey the object code using peer-to-peer transmission, provided
289
+ you inform other peers where the object code and Corresponding
290
+ Source of the work are being offered to the general public at no
291
+ charge under subsection 6d.
292
+
293
+ A separable portion of the object code, whose source code is excluded
294
+ from the Corresponding Source as a System Library, need not be
295
+ included in conveying the object code work.
296
+
297
+ A "User Product" is either (1) a "consumer product", which means any
298
+ tangible personal property which is normally used for personal, family,
299
+ or household purposes, or (2) anything designed or sold for incorporation
300
+ into a dwelling. In determining whether a product is a consumer product,
301
+ doubtful cases shall be resolved in favor of coverage. For a particular
302
+ product received by a particular user, "normally used" refers to a
303
+ typical or common use of that class of product, regardless of the status
304
+ of the particular user or of the way in which the particular user
305
+ actually uses, or expects or is expected to use, the product. A product
306
+ is a consumer product regardless of whether the product has substantial
307
+ commercial, industrial or non-consumer uses, unless such uses represent
308
+ the only significant mode of use of the product.
309
+
310
+ "Installation Information" for a User Product means any methods,
311
+ procedures, authorization keys, or other information required to install
312
+ and execute modified versions of a covered work in that User Product from
313
+ a modified version of its Corresponding Source. The information must
314
+ suffice to ensure that the continued functioning of the modified object
315
+ code is in no case prevented or interfered with solely because
316
+ modification has been made.
317
+
318
+ If you convey an object code work under this section in, or with, or
319
+ specifically for use in, a User Product, and the conveying occurs as
320
+ part of a transaction in which the right of possession and use of the
321
+ User Product is transferred to the recipient in perpetuity or for a
322
+ fixed term (regardless of how the transaction is characterized), the
323
+ Corresponding Source conveyed under this section must be accompanied
324
+ by the Installation Information. But this requirement does not apply
325
+ if neither you nor any third party retains the ability to install
326
+ modified object code on the User Product (for example, the work has
327
+ been installed in ROM).
328
+
329
+ The requirement to provide Installation Information does not include a
330
+ requirement to continue to provide support service, warranty, or updates
331
+ for a work that has been modified or installed by the recipient, or for
332
+ the User Product in which it has been modified or installed. Access to a
333
+ network may be denied when the modification itself materially and
334
+ adversely affects the operation of the network or violates the rules and
335
+ protocols for communication across the network.
336
+
337
+ Corresponding Source conveyed, and Installation Information provided,
338
+ in accord with this section must be in a format that is publicly
339
+ documented (and with an implementation available to the public in
340
+ source code form), and must require no special password or key for
341
+ unpacking, reading or copying.
342
+
343
+ 7. Additional Terms.
344
+
345
+ "Additional permissions" are terms that supplement the terms of this
346
+ License by making exceptions from one or more of its conditions.
347
+ Additional permissions that are applicable to the entire Program shall
348
+ be treated as though they were included in this License, to the extent
349
+ that they are valid under applicable law. If additional permissions
350
+ apply only to part of the Program, that part may be used separately
351
+ under those permissions, but the entire Program remains governed by
352
+ this License without regard to the additional permissions.
353
+
354
+ When you convey a copy of a covered work, you may at your option
355
+ remove any additional permissions from that copy, or from any part of
356
+ it. (Additional permissions may be written to require their own
357
+ removal in certain cases when you modify the work.) You may place
358
+ additional permissions on material, added by you to a covered work,
359
+ for which you have or can give appropriate copyright permission.
360
+
361
+ Notwithstanding any other provision of this License, for material you
362
+ add to a covered work, you may (if authorized by the copyright holders of
363
+ that material) supplement the terms of this License with terms:
364
+
365
+ a) Disclaiming warranty or limiting liability differently from the
366
+ terms of sections 15 and 16 of this License; or
367
+
368
+ b) Requiring preservation of specified reasonable legal notices or
369
+ author attributions in that material or in the Appropriate Legal
370
+ Notices displayed by works containing it; or
371
+
372
+ c) Prohibiting misrepresentation of the origin of that material, or
373
+ requiring that modified versions of such material be marked in
374
+ reasonable ways as different from the original version; or
375
+
376
+ d) Limiting the use for publicity purposes of names of licensors or
377
+ authors of the material; or
378
+
379
+ e) Declining to grant rights under trademark law for use of some
380
+ trade names, trademarks, or service marks; or
381
+
382
+ f) Requiring indemnification of licensors and authors of that
383
+ material by anyone who conveys the material (or modified versions of
384
+ it) with contractual assumptions of liability to the recipient, for
385
+ any liability that these contractual assumptions directly impose on
386
+ those licensors and authors.
387
+
388
+ All other non-permissive additional terms are considered "further
389
+ restrictions" within the meaning of section 10. If the Program as you
390
+ received it, or any part of it, contains a notice stating that it is
391
+ governed by this License along with a term that is a further
392
+ restriction, you may remove that term. If a license document contains
393
+ a further restriction but permits relicensing or conveying under this
394
+ License, you may add to a covered work material governed by the terms
395
+ of that license document, provided that the further restriction does
396
+ not survive such relicensing or conveying.
397
+
398
+ If you add terms to a covered work in accord with this section, you
399
+ must place, in the relevant source files, a statement of the
400
+ additional terms that apply to those files, or a notice indicating
401
+ where to find the applicable terms.
402
+
403
+ Additional terms, permissive or non-permissive, may be stated in the
404
+ form of a separately written license, or stated as exceptions;
405
+ the above requirements apply either way.
406
+
407
+ 8. Termination.
408
+
409
+ You may not propagate or modify a covered work except as expressly
410
+ provided under this License. Any attempt otherwise to propagate or
411
+ modify it is void, and will automatically terminate your rights under
412
+ this License (including any patent licenses granted under the third
413
+ paragraph of section 11).
414
+
415
+ However, if you cease all violation of this License, then your
416
+ license from a particular copyright holder is reinstated (a)
417
+ provisionally, unless and until the copyright holder explicitly and
418
+ finally terminates your license, and (b) permanently, if the copyright
419
+ holder fails to notify you of the violation by some reasonable means
420
+ prior to 60 days after the cessation.
421
+
422
+ Moreover, your license from a particular copyright holder is
423
+ reinstated permanently if the copyright holder notifies you of the
424
+ violation by some reasonable means, this is the first time you have
425
+ received notice of violation of this License (for any work) from that
426
+ copyright holder, and you cure the violation prior to 30 days after
427
+ your receipt of the notice.
428
+
429
+ Termination of your rights under this section does not terminate the
430
+ licenses of parties who have received copies or rights from you under
431
+ this License. If your rights have been terminated and not permanently
432
+ reinstated, you do not qualify to receive new licenses for the same
433
+ material under section 10.
434
+
435
+ 9. Acceptance Not Required for Having Copies.
436
+
437
+ You are not required to accept this License in order to receive or
438
+ run a copy of the Program. Ancillary propagation of a covered work
439
+ occurring solely as a consequence of using peer-to-peer transmission
440
+ to receive a copy likewise does not require acceptance. However,
441
+ nothing other than this License grants you permission to propagate or
442
+ modify any covered work. These actions infringe copyright if you do
443
+ not accept this License. Therefore, by modifying or propagating a
444
+ covered work, you indicate your acceptance of this License to do so.
445
+
446
+ 10. Automatic Licensing of Downstream Recipients.
447
+
448
+ Each time you convey a covered work, the recipient automatically
449
+ receives a license from the original licensors, to run, modify and
450
+ propagate that work, subject to this License. You are not responsible
451
+ for enforcing compliance by third parties with this License.
452
+
453
+ An "entity transaction" is a transaction transferring control of an
454
+ organization, or substantially all assets of one, or subdividing an
455
+ organization, or merging organizations. If propagation of a covered
456
+ work results from an entity transaction, each party to that
457
+ transaction who receives a copy of the work also receives whatever
458
+ licenses to the work the party's predecessor in interest had or could
459
+ give under the previous paragraph, plus a right to possession of the
460
+ Corresponding Source of the work from the predecessor in interest, if
461
+ the predecessor has it or can get it with reasonable efforts.
462
+
463
+ You may not impose any further restrictions on the exercise of the
464
+ rights granted or affirmed under this License. For example, you may
465
+ not impose a license fee, royalty, or other charge for exercise of
466
+ rights granted under this License, and you may not initiate litigation
467
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
468
+ any patent claim is infringed by making, using, selling, offering for
469
+ sale, or importing the Program or any portion of it.
470
+
471
+ 11. Patents.
472
+
473
+ A "contributor" is a copyright holder who authorizes use under this
474
+ License of the Program or a work on which the Program is based. The
475
+ work thus licensed is called the contributor's "contributor version".
476
+
477
+ A contributor's "essential patent claims" are all patent claims
478
+ owned or controlled by the contributor, whether already acquired or
479
+ hereafter acquired, that would be infringed by some manner, permitted
480
+ by this License, of making, using, or selling its contributor version,
481
+ but do not include claims that would be infringed only as a
482
+ consequence of further modification of the contributor version. For
483
+ purposes of this definition, "control" includes the right to grant
484
+ patent sublicenses in a manner consistent with the requirements of
485
+ this License.
486
+
487
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
488
+ patent license under the contributor's essential patent claims, to
489
+ make, use, sell, offer for sale, import and otherwise run, modify and
490
+ propagate the contents of its contributor version.
491
+
492
+ In the following three paragraphs, a "patent license" is any express
493
+ agreement or commitment, however denominated, not to enforce a patent
494
+ (such as an express permission to practice a patent or covenant not to
495
+ sue for patent infringement). To "grant" such a patent license to a
496
+ party means to make such an agreement or commitment not to enforce a
497
+ patent against the party.
498
+
499
+ If you convey a covered work, knowingly relying on a patent license,
500
+ and the Corresponding Source of the work is not available for anyone
501
+ to copy, free of charge and under the terms of this License, through a
502
+ publicly available network server or other readily accessible means,
503
+ then you must either (1) cause the Corresponding Source to be so
504
+ available, or (2) arrange to deprive yourself of the benefit of the
505
+ patent license for this particular work, or (3) arrange, in a manner
506
+ consistent with the requirements of this License, to extend the patent
507
+ license to downstream recipients. "Knowingly relying" means you have
508
+ actual knowledge that, but for the patent license, your conveying the
509
+ covered work in a country, or your recipient's use of the covered work
510
+ in a country, would infringe one or more identifiable patents in that
511
+ country that you have reason to believe are valid.
512
+
513
+ If, pursuant to or in connection with a single transaction or
514
+ arrangement, you convey, or propagate by procuring conveyance of, a
515
+ covered work, and grant a patent license to some of the parties
516
+ receiving the covered work authorizing them to use, propagate, modify
517
+ or convey a specific copy of the covered work, then the patent license
518
+ you grant is automatically extended to all recipients of the covered
519
+ work and works based on it.
520
+
521
+ A patent license is "discriminatory" if it does not include within
522
+ the scope of its coverage, prohibits the exercise of, or is
523
+ conditioned on the non-exercise of one or more of the rights that are
524
+ specifically granted under this License. You may not convey a covered
525
+ work if you are a party to an arrangement with a third party that is
526
+ in the business of distributing software, under which you make payment
527
+ to the third party based on the extent of your activity of conveying
528
+ the work, and under which the third party grants, to any of the
529
+ parties who would receive the covered work from you, a discriminatory
530
+ patent license (a) in connection with copies of the covered work
531
+ conveyed by you (or copies made from those copies), or (b) primarily
532
+ for and in connection with specific products or compilations that
533
+ contain the covered work, unless you entered into that arrangement,
534
+ or that patent license was granted, prior to 28 March 2007.
535
+
536
+ Nothing in this License shall be construed as excluding or limiting
537
+ any implied license or other defenses to infringement that may
538
+ otherwise be available to you under applicable patent law.
539
+
540
+ 12. No Surrender of Others' Freedom.
541
+
542
+ If conditions are imposed on you (whether by court order, agreement or
543
+ otherwise) that contradict the conditions of this License, they do not
544
+ excuse you from the conditions of this License. If you cannot convey a
545
+ covered work so as to satisfy simultaneously your obligations under this
546
+ License and any other pertinent obligations, then as a consequence you may
547
+ not convey it at all. For example, if you agree to terms that obligate you
548
+ to collect a royalty for further conveying from those to whom you convey
549
+ the Program, the only way you could satisfy both those terms and this
550
+ License would be to refrain entirely from conveying the Program.
551
+
552
+ 13. Use with the GNU Affero General Public License.
553
+
554
+ Notwithstanding any other provision of this License, you have
555
+ permission to link or combine any covered work with a work licensed
556
+ under version 3 of the GNU Affero General Public License into a single
557
+ combined work, and to convey the resulting work. The terms of this
558
+ License will continue to apply to the part which is the covered work,
559
+ but the special requirements of the GNU Affero General Public License,
560
+ section 13, concerning interaction through a network will apply to the
561
+ combination as such.
562
+
563
+ 14. Revised Versions of this License.
564
+
565
+ The Free Software Foundation may publish revised and/or new versions of
566
+ the GNU General Public License from time to time. Such new versions will
567
+ be similar in spirit to the present version, but may differ in detail to
568
+ address new problems or concerns.
569
+
570
+ Each version is given a distinguishing version number. If the
571
+ Program specifies that a certain numbered version of the GNU General
572
+ Public License "or any later version" applies to it, you have the
573
+ option of following the terms and conditions either of that numbered
574
+ version or of any later version published by the Free Software
575
+ Foundation. If the Program does not specify a version number of the
576
+ GNU General Public License, you may choose any version ever published
577
+ by the Free Software Foundation.
578
+
579
+ If the Program specifies that a proxy can decide which future
580
+ versions of the GNU General Public License can be used, that proxy's
581
+ public statement of acceptance of a version permanently authorizes you
582
+ to choose that version for the Program.
583
+
584
+ Later license versions may give you additional or different
585
+ permissions. However, no additional obligations are imposed on any
586
+ author or copyright holder as a result of your choosing to follow a
587
+ later version.
588
+
589
+ 15. Disclaimer of Warranty.
590
+
591
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
+
600
+ 16. Limitation of Liability.
601
+
602
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610
+ SUCH DAMAGES.
611
+
612
+ 17. Interpretation of Sections 15 and 16.
613
+
614
+ If the disclaimer of warranty and limitation of liability provided
615
+ above cannot be given local legal effect according to their terms,
616
+ reviewing courts shall apply local law that most closely approximates
617
+ an absolute waiver of all civil liability in connection with the
618
+ Program, unless a warranty or assumption of liability accompanies a
619
+ copy of the Program in return for a fee.
620
+
621
+ END OF TERMS AND CONDITIONS
README.md ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## ArcaneChat Android Client
2
+
3
+ A [Delta Chat](https://delta.chat/) client for Android. Learn more at: https://arcanechat.me
4
+
5
+ [<img src="store/get-it-on-gplay.png" alt="Get it on Google Play" height="48">](https://play.google.com/store/apps/details?id=com.github.arcanechat)
6
+ [<img src="store/get-it-on-fdroid.png" alt="Get it on F-Droid" height="48">](https://f-droid.org/packages/chat.delta.lite)
7
+ [<img src="store/get-it-on-github.png" alt="Get it on GitHub" height="48">](https://github.com/ArcaneChat/android/releases/latest/download/ArcaneChat-gplay.apk)
8
+
9
+
10
+ <img alt="Screenshot" src="fastlane/metadata/android/en-US/images/phoneScreenshots/1.png" width="298" /> <img alt="Screenshot" src="fastlane/metadata/android/en-US/images/phoneScreenshots/2.png" width="298" />
11
+
12
+ # WebXDC
13
+
14
+ This app has some extended support for WebXDC apps:
15
+
16
+ - `window.webxdc.arcanechat` a string with the ArcaneChat version and can be used by app developers
17
+ to detect when they can use the ArcaneChat-specific features.
18
+ - `sendToChat()`: extra property `subject` can be set to a text string to set message/email's subject.
19
+ - `sendToChat()`: extra property `html` can be set to a string of html markup to set the HTML part of the email/message.
20
+ - `sendToChat()`: the file object parameter also accepts a `type` field that can be one of:
21
+ * `"sticker"`
22
+ * `"image"`
23
+ * `"audio"`
24
+ * `"video"`
25
+ * `"file"` (default if `type` field is not present)
26
+ - Inside apps, clicking external links is supported, ex. to open in browser, so you can include links to your website or donation pages.
27
+ - `manifest.toml` field: `orientation`, if you set it to `"landscape"` your app will be launched in landscape mode.
28
+
29
+ # Credits
30
+
31
+ This app is based on the [official Delta Chat client](https://github.com/deltachat/deltachat-android) with several improvements.
32
+
33
+ This app uses a [modified](https://github.com/ArcaneChat/core) version of the [Chatmail Core Library](https://github.com/chatmail/core).
RELEASE.md ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Android Release Checklist
2
+
3
+
4
+ ## Generate APKs
5
+
6
+ ### Update core and translations
7
+
8
+ on the command-line, in a PR called "update-core-and-stuff-DATE":
9
+
10
+ 1. update core:
11
+ ```
12
+ ./scripts/update-core.sh # shows used branch
13
+ ./scripts/update-core.sh BRANCH_OR_TAG # update to tag or latest commit of branch
14
+ ./scripts/clean-core.sh # helps on weird issues, do also "Build / Clean"
15
+ ./scripts/ndk-make.sh
16
+ ```
17
+
18
+ a) Update `CHANGELOG.md`
19
+ from <https://github.com/chatmail/core/blob/main/CHANGELOG.md>,
20
+ do not just copy and avoid technical terms.
21
+ The changelog is for the end user and shall show impacts form that angle.
22
+ Add used core version to end of changelog entry
23
+ as `update to core 1.2.3` or `using core 1.2.3`
24
+
25
+
26
+ 2. update JSON-RPC bindings:
27
+ ```
28
+ ./scripts/update-rpc-bindings.sh
29
+ ```
30
+
31
+ 3. update translations and local help:
32
+ ```
33
+ ./scripts/tx-pull-translations.sh
34
+ ./scripts/create-local-help.sh # requires deltachat-pages checked out at ../deltachat-pages
35
+ ```
36
+
37
+ ### Prepare release
38
+
39
+ the following steps are done in a PR called `prep-VERSION` (no leading "v"):
40
+
41
+ 3. Update `CHANGELOG.md`:
42
+ Rename header with version number and add date as `YYYY-MM`
43
+
44
+ in case previous entries of the changelog refer to betas or to not officially released versions,
45
+ the entries can be summarized.
46
+ this makes it easier for the end user to follow changes by showing major changes atop.
47
+
48
+ 4. add a device message to `ConversationListActivity::onCreate()` or remove the old one.
49
+ do not repeat the CHANGELOG here: write what really is the ux outcome
50
+ in a few lines of easy speak without technical terms.
51
+ if there is time for a translation round, do `./scripts/tx-push-source.sh`
52
+ **ping tangible translators** and start over at step 2.
53
+
54
+ 5. bump `versionCode` _and_ `versionName` (no leading "v") in `build.gradle`
55
+
56
+ 6. build APKs:
57
+ a) generate debug APK at "Build / Build Bundle(s)/APK / Build APK(s)"
58
+ b) generate release APK at "Build / Generate Signed Bundle or APK",
59
+ select "APK", add keys, flavor `gplayRelease`.
60
+ this APK will go to the stores and is located at `gplay/release`
61
+
62
+
63
+ ## Push Test Releases
64
+
65
+ 7. a) `./scripts/upload-beta.sh VERSION` uploads both APKs to testrun.org and drafts a message.
66
+ b) add things critically to be tested to the message (this is not the changelog nor the device message)
67
+ c) post the message to relevant testing channels, **ping testers**
68
+ d) make sure, the `prep-VERSION` PR **gets merged**
69
+
70
+ On serious deteriorations, **ping devs**, make sure they get fixed, and start over at step 1.
71
+
72
+
73
+ ## Release on get.delta.chat
74
+
75
+ Take care the APK used here and in the following steps
76
+ are binary-wise the same as pushed to testers and not overwritten by subsequent builds.
77
+
78
+ 8. a) `./scripts/upload-release.sh VERSION`
79
+ b) do a PR to bump `VERSION_ANDROID` (without leading `v`) on
80
+ `https://github.com/deltachat/deltachat-pages/blob/master/_includes/download-boxes.html`
81
+ c) make sure, **the PR gets merged**
82
+ and the correct APK is finally available on get.delta.chat
83
+
84
+ only afterwards, push the APK to stores. **consider a blog post.**
85
+
86
+
87
+ ## Release on Play Store
88
+
89
+ on <https://play.google.com/apps/publish/>:
90
+
91
+ 9. a) open "Delta Chat / Test and release / Production"
92
+ then "Create new release" and upload APK from above
93
+ b) fill out "Release details/Release notes" (500 chars), add the line
94
+ "These features will roll out over the coming days. Thanks for using Delta Chat!";
95
+ release name should be default ("123 (1.2.3)")
96
+ c) click "Next", set "Rollout Percentage" to 50%, click "Save"
97
+ d) Go to "Publishing Overview", "Managed publishing" is usually off;
98
+ click "Send change for review", confirm
99
+
100
+ 2 days later, change "Rollout Percentage" to 99%. Two more days later to 100%.
101
+ Rollout is anyways slower in practise, however,
102
+ only as long as we do not enter 100%, we can retract the version
103
+ (Once we reach 100%, we have to submit a new version for approval.
104
+ During these up to 4 days, sometimes longer, we cannot do anything on existing rollout)
105
+
106
+
107
+ ## Tag for F-Droid and create Github release
108
+
109
+ 10. make sure, everything is pushed, then:
110
+ $ git tag v1.2.1 COMMIT; git push --tags
111
+
112
+ F-Droid picks on the tags starting with "v" and builds the version.
113
+ This may take some days.
114
+
115
+ 11. a) on <https://github.com/deltachat/deltachat-android/releases>,
116
+ tap "Draft a new Release", choose just created tag, fill changelog
117
+ b) add APK from above using "Attach binary".
118
+ c) tap "Publish release"
119
+
120
+
121
+ ## Release on Huawei AppGallery
122
+
123
+ on <https://developer.huawei.com/consumer/en/appgallery>:
124
+
125
+ 13. a) go to "Upload your app / Android / Delta Chat / Update", again "Update" upper right
126
+ b) "Manage Packages / Upload", upload the APK from above, hit "Save"
127
+ c) Update "App Information / New Features", hit "Save", then "Next"
128
+ d) Hit "Submit"; on the next page, confirm version and language
129
+
130
+
131
+ ## Releases on other stores (ex. Passkoocheh)
132
+
133
+ These stores are not under our control.
134
+ On important updates **ping store maintainers** and ask to update.
135
+
136
+
137
+ ## Testing checklist
138
+
139
+ Only some rough ideas, ideally, this should result into a simple checklist
140
+ that can be checked before releasing.
141
+ However, although it would be nice to test "everything", we should keep in mind
142
+ that the test should be doable in, say, 10~15 minutes.
143
+ - create new account with (one of?): gmail, yandex, other
144
+ or (?) test an existing account
145
+ - send and receive a message
146
+ - create a group
147
+ - do a contact verification
148
+ - join a group via a qr scan
build.gradle ADDED
@@ -0,0 +1,308 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ plugins {
2
+ id 'com.android.application' version '8.11.1'
3
+ id 'com.google.gms.google-services' version '4.4.1'
4
+ }
5
+
6
+ repositories {
7
+ google()
8
+ mavenCentral()
9
+ maven {
10
+ url "https://www.jitpack.io"
11
+ name 'JitPack Github wrapper'
12
+ }
13
+ }
14
+
15
+ android {
16
+ dependenciesInfo {
17
+ // Disables dependency metadata when building APKs.
18
+ includeInApk = false
19
+ // Disables dependency metadata when building Android App Bundles.
20
+ includeInBundle = false
21
+ }
22
+ namespace "org.thoughtcrime.securesms"
23
+ flavorDimensions "none"
24
+ compileSdk 36
25
+
26
+ // Set NDK version to strip native libraries.
27
+ // Even though we compile our libraries outside Gradle with `scripts/ndk-make.sh`,
28
+ // without ndkVersion `./gradlew clean` followed by `./gradlew assembleDebug --warning-mode=all` emits the following warning:
29
+ // > Task :stripFatDebugDebugSymbols
30
+ // Unable to strip the following libraries, packaging them as they are: libanimation-decoder-gif.so, libnative-utils.so.
31
+ // See <https://issuetracker.google.com/issues/237187538> for details.
32
+ ndkVersion "27.0.12077973"
33
+ useLibrary 'org.apache.http.legacy'
34
+
35
+ defaultConfig {
36
+ versionCode 30000734
37
+ versionName "2.33.1"
38
+
39
+ applicationId "chat.delta.lite"
40
+ multiDexEnabled true
41
+
42
+ minSdkVersion 21
43
+ targetSdkVersion 36
44
+
45
+ vectorDrawables.useSupportLibrary = true
46
+
47
+ // base name of the generated apk
48
+ project.ext.set("archivesBaseName", "deltachat");
49
+
50
+ buildConfigField "boolean", "DEV_BUILD", "false"
51
+
52
+ ndk {
53
+ if(project.hasProperty("ABI_FILTER")) {
54
+ abiFilters ABI_FILTER
55
+ } else {
56
+ abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
57
+ }
58
+ }
59
+
60
+
61
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
62
+
63
+ buildConfigField("String", "TEST_ADDR", buildConfigProperty("TEST_ADDR"))
64
+ buildConfigField("String", "TEST_MAIL_PW", buildConfigProperty("TEST_MAIL_PW"))
65
+ buildConfigField("String", "NDK_ARCH", getNdkArch())
66
+ }
67
+
68
+ compileOptions {
69
+ sourceCompatibility JavaVersion.VERSION_1_8
70
+ targetCompatibility JavaVersion.VERSION_1_8
71
+ }
72
+ packagingOptions {
73
+ jniLibs {
74
+ doNotStrip '**/*.so'
75
+ keepDebugSymbols += ['*/mips/*.so', '*/mips64/*.so']
76
+ }
77
+ resources {
78
+ excludes += ['LICENSE.txt', 'LICENSE', 'NOTICE', 'asm-license.txt', 'META-INF/LICENSE', 'META-INF/NOTICE']
79
+ }
80
+ }
81
+
82
+
83
+ signingConfigs {
84
+ debug {
85
+ // add `DC_DEBUG_STORE_FILE=/path/to/debug.keystore` to `~/.gradle/gradle.properties`
86
+ if(project.hasProperty("DC_DEBUG_STORE_FILE" )) {
87
+ storeFile file(DC_DEBUG_STORE_FILE )
88
+ }
89
+ }
90
+ releaseFdroid {
91
+ // can be defined at `~/.gradle/gradle.properties` or at "Build/Generate signed APK"
92
+ if(project.hasProperty("DC_RELEASE_STORE_FILE")) {
93
+ storeFile file(DC_RELEASE_STORE_FILE)
94
+ storePassword DC_RELEASE_STORE_PASSWORD
95
+ keyAlias DC_RELEASE_KEY_ALIAS_FDROID
96
+ keyPassword DC_RELEASE_KEY_PASSWORD
97
+ }
98
+ }
99
+ releaseApk {
100
+ // can be defined at `~/.gradle/gradle.properties` or at "Build/Generate signed APK"
101
+ if(project.hasProperty("DC_RELEASE_STORE_FILE")) {
102
+ storeFile file(DC_RELEASE_STORE_FILE)
103
+ storePassword DC_RELEASE_STORE_PASSWORD
104
+ keyAlias DC_RELEASE_KEY_ALIAS_GPLAY
105
+ keyPassword DC_RELEASE_KEY_PASSWORD
106
+ }
107
+ }
108
+ releaseBundle {
109
+ if(project.hasProperty("DC_BUNDLE_STORE_FILE")) {
110
+ storeFile file(DC_BUNDLE_STORE_FILE)
111
+ storePassword DC_BUNDLE_STORE_PASSWORD
112
+ keyAlias DC_BUNDLE_KEY_ALIAS
113
+ keyPassword DC_BUNDLE_STORE_PASSWORD
114
+ }
115
+ }
116
+ }
117
+
118
+ productFlavors {
119
+ foss {
120
+ dimension "none"
121
+ buildConfigField "boolean", "USE_PLAY_SERVICES", "false"
122
+ }
123
+ gplay {
124
+ dimension "none"
125
+ apply plugin: "com.google.gms.google-services"
126
+ buildConfigField "boolean", "USE_PLAY_SERVICES", "true"
127
+ applicationId "com.github.arcanechat"
128
+ }
129
+ }
130
+
131
+ buildTypes {
132
+ debug {
133
+ minifyEnabled true
134
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
135
+ testProguardFiles 'test-proguard-rules.pro'
136
+ applicationIdSuffix ".beta"
137
+ }
138
+ release {
139
+ // minification and proguard disabled for now.
140
+ //
141
+ // when enabled, it can cut down apk size about 6%,
142
+ // however this also has the potential to break things.
143
+ // so exceptions are needed and have to be maintained.
144
+ // (see git-history and https://github.com/deltachat/deltachat-android/issues/905 )
145
+ //
146
+ // nb: it is highly recommended to use the same settings in debug+release -
147
+ // otherwise problems might be noticed delayed only
148
+ minifyEnabled true
149
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
150
+ testProguardFiles 'test-proguard-rules.pro'
151
+ productFlavors.foss.signingConfig signingConfigs.releaseFdroid
152
+ productFlavors.gplay.signingConfig signingConfigs.releaseApk
153
+ }
154
+ }
155
+
156
+ if(!project.hasProperty("ABI_FILTER")) {
157
+ splits {
158
+ abi {
159
+ enable true
160
+ reset()
161
+ include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
162
+ universalApk true
163
+ }
164
+ }
165
+ }
166
+
167
+ project.ext.versionCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2, 'x86': 3, 'x86_64': 4]
168
+
169
+ android.applicationVariants.all { variant ->
170
+ variant.outputs.all { output ->
171
+ output.outputFileName = output.outputFileName
172
+ .replace("android", "ArcaneChat")
173
+ .replace("-release", "")
174
+ .replace(".apk", "-${variant.versionName}.apk")
175
+ if(project.hasProperty("ABI_FILTER")) {
176
+ output.versionCodeOverride =
177
+ variant.versionCode * 10 + project.ext.versionCodes.get(ABI_FILTER)
178
+ } else {
179
+ output.versionCodeOverride =
180
+ variant.versionCode * 10 + project.ext.versionCodes.get(output.getFilter(com.android.build.OutputFile.ABI), 4)
181
+ }
182
+ }
183
+ }
184
+
185
+ sourceSets {
186
+ main {
187
+ jniLibs.srcDirs = ['libs']
188
+ }
189
+ }
190
+
191
+ androidResources {
192
+ generateLocaleConfig true
193
+ }
194
+
195
+ lint {
196
+ abortOnError false
197
+ }
198
+ buildFeatures {
199
+ renderScript true
200
+ aidl true
201
+ }
202
+
203
+ }
204
+
205
+ final def markwon_version = '4.6.2'
206
+
207
+ dependencies {
208
+ // ArcaneChat-only dependencies:
209
+ implementation "io.noties.markwon:core:$markwon_version"
210
+ implementation "io.noties.markwon:ext-strikethrough:$markwon_version"
211
+ implementation "io.noties.markwon:inline-parser:$markwon_version"
212
+ implementation 'com.airbnb.android:lottie:4.2.2' // Lottie animations support.
213
+
214
+ implementation 'androidx.concurrent:concurrent-futures:1.3.0'
215
+ implementation 'androidx.sharetarget:sharetarget:1.2.0'
216
+ implementation 'androidx.webkit:webkit:1.14.0'
217
+ implementation 'androidx.multidex:multidex:2.0.1'
218
+ implementation 'androidx.appcompat:appcompat:1.7.1'
219
+ implementation 'com.google.android.material:material:1.12.0'
220
+ implementation 'androidx.legacy:legacy-support-v13:1.0.0'
221
+ implementation ('androidx.preference:preference:1.2.1') {
222
+ exclude group: 'androidx.lifecycle', module:'lifecycle-viewmodel'
223
+ exclude group: 'androidx.lifecycle', module:'lifecycle-viewmodel-ktx'
224
+ }
225
+ implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
226
+ implementation 'androidx.exifinterface:exifinterface:1.4.1'
227
+ implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
228
+ implementation 'androidx.lifecycle:lifecycle-common-java8:2.6.2'
229
+ implementation 'androidx.lifecycle:lifecycle-viewmodel:2.6.2'
230
+ implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2'
231
+ implementation 'androidx.work:work-runtime:2.9.1'
232
+ implementation 'androidx.emoji2:emoji2-emojipicker:1.5.0'
233
+ implementation 'com.google.guava:guava:31.1-android'
234
+ implementation 'com.google.android.exoplayer:exoplayer-core:2.19.1' // plays video and audio
235
+ implementation 'com.google.android.exoplayer:exoplayer-ui:2.19.1'
236
+ implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
237
+ implementation 'com.google.zxing:core:3.3.0' // fixed version to support SDK<24
238
+ implementation ('com.journeyapps:zxing-android-embedded:4.3.0') { transitive = false } // QR Code scanner
239
+ implementation 'com.fasterxml.jackson.core:jackson-databind:2.11.1' // used as JSON library
240
+ implementation 'com.github.Baseflow:PhotoView:2.3.0' // does the zooming on photos / media
241
+ implementation 'com.caverock:androidsvg-aar:1.4' // SVG support.
242
+ implementation 'com.github.bumptech.glide:glide:4.16.0'
243
+ annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0'
244
+ annotationProcessor 'androidx.annotation:annotation:1.9.1'
245
+ implementation 'com.makeramen:roundedimageview:2.3.0' // crops the avatars to circles
246
+ implementation 'com.github.amulyakhare:TextDrawable:558677ea31' // number of unread messages,
247
+ // the one-letter circle for the contacts (when there is not avatar) and a white background.
248
+ implementation 'com.googlecode.mp4parser:isoparser:1.0.6' // MP4 recoding; upgrading eg. to 1.1.22 breaks recoding, however, i have not investigated further, just reset to 1.0.6
249
+ implementation ('com.davemorrissey.labs:subsampling-scale-image-view:3.10.0') { // for the zooming on photos / media
250
+ exclude group: 'com.android.support', module: 'support-annotations'
251
+ }
252
+
253
+ // Replacement for ContentResolver
254
+ // that protects against the Surreptitious Sharing attack.
255
+ // <https://github.com/cketti/SafeContentResolver>
256
+ implementation 'de.cketti.safecontentresolver:safe-content-resolver-v21:1.0.0'
257
+
258
+ gplayImplementation('com.google.firebase:firebase-messaging:24.1.2') { // for PUSH notifications, don't upgrade: v25.0.0 requires minSdk>=23
259
+ exclude group: 'com.google.firebase', module: 'firebase-core'
260
+ exclude group: 'com.google.firebase', module: 'firebase-analytics'
261
+ exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
262
+ }
263
+
264
+ testImplementation 'junit:junit:4.13.2'
265
+ testImplementation 'org.assertj:assertj-core:3.27.3'
266
+ testImplementation 'org.mockito:mockito-core:5.18.0'
267
+ testImplementation 'org.powermock:powermock-api-mockito:1.7.4'
268
+ testImplementation 'org.powermock:powermock-module-junit4:2.0.9'
269
+ testImplementation 'org.powermock:powermock-module-junit4-rule:2.0.9'
270
+ testImplementation 'org.powermock:powermock-classloading-xstream:2.0.9'
271
+
272
+ androidTestImplementation 'androidx.test:runner:1.7.0'
273
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'
274
+ androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.7.0'
275
+ androidTestImplementation 'androidx.test:rules:1.7.0'
276
+ androidTestImplementation 'androidx.test.ext:junit:1.3.0'
277
+ androidTestImplementation 'com.android.support:support-annotations:28.0.0'
278
+
279
+ androidTestImplementation ('org.assertj:assertj-core:3.27.3') {
280
+ exclude group: 'org.hamcrest', module: 'hamcrest-core'
281
+ }
282
+ }
283
+
284
+ String buildConfigProperty(String name) {
285
+ return "\"${propertyOrEmpty(name)}\""
286
+ }
287
+
288
+ String propertyOrEmpty(String name) {
289
+ Object p = findProperty(name)
290
+ if (p == null) return environmentVariable(name)
291
+ return (String) p
292
+ }
293
+
294
+ static String environmentVariable(String name) {
295
+ String env = System.getenv(name)
296
+ if (env == null) return ""
297
+ return env
298
+ }
299
+
300
+ String getNdkArch() {
301
+ Properties properties = new Properties()
302
+ def file = project.rootProject.file('ndkArch')
303
+ if (!file.exists()) return "\"\""
304
+ properties.load(file.newDataInputStream())
305
+ def arch = properties.getProperty('NDK_ARCH')
306
+ if (arch == null) return "\"\""
307
+ return "\"$arch\""
308
+ }
docs/f-droid.md ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # F-Droid - Overview
2
+
3
+ - <https://f-droid.org/en/packages/com.b44t.messenger/>
4
+ is the Delta Chat page on F-Droid.org,
5
+ the F-Droid app will show similar information.
6
+
7
+ - <https://github.com/deltachat/deltachat-android/tree/main/metadata>
8
+ contains the description, icon, screenshots and all meta data shown for Delta Chat on F-Droid
9
+ in the [fastlane format](https://f-droid.org/en/docs/All_About_Descriptions_Graphics_and_Screenshots/#fastlane-structure).
10
+
11
+ - <https://gitlab.com/fdroid/fdroiddata/blob/master/metadata/com.b44t.messenger.yml>
12
+ contains [additional F-Droid-specific metadata](https://f-droid.org/en/docs/All_About_Descriptions_Graphics_and_Screenshots/#in-the-f-droid-repo)
13
+ and build instructions that do not fit the fastlane format.
14
+ F-Droid adds new versions automatically to the end of `.yml` file.
15
+
16
+ - New versions are recognized by tags in the form `v1.2.3` -
17
+ before adding tags like that, have a look at
18
+ <https://github.com/deltachat/deltachat-android/blob/main/RELEASE.md#release-on-f-droid>.
19
+ The build and distribution is expected to take
20
+ [up to 7 days](https://gitlab.com/fdroid/wiki/-/wikis/FAQ#how-long-does-it-take-for-my-app-to-show-up-on-website-and-client).
21
+
22
+
23
+ # F-Droid Build status
24
+
25
+ - <https://monitor.f-droid.org/builds>
26
+ shows F-Droid's overall build status,
27
+ if Delta Chat shows up at "Need updating" or "Running",
28
+ things are working as expected. :)
29
+
30
+ - <https://f-droid.org/repo/com.b44t.messenger_VERSIONCODE.apk>
31
+ (with VERSIONCODE = 537 or so) links to successfully built apk
32
+ even if it is not yet in the index (which may take some more time).
33
+ F-Droid keeps the last 3 successful builds in the main repo,
34
+ while the rest will be moved to the Archive repo:
35
+ <https://f-droid.org/archive/com.b44t.messenger_VERSIONCODE.apk>
36
+
37
+
38
+ # Use F-Droid-tools locally
39
+
40
+ $ git clone https://gitlab.com/fdroid/fdroiddata
41
+ $ git clone https://gitlab.com/fdroid/fdroidserver
42
+ $ cd fdroiddata
43
+
44
+ Now, metadata/com.b44t.messenger.yml can be modified.
45
+ For testing, one can change the repo to a branch
46
+ by adding the line `Update Check Mode:RepoManifest/BRANCH` to the file.
47
+
48
+ Set some path to ndk etc:
49
+ $ cp ../fdroidserver/examples/config.py . # adapt file as needed
50
+
51
+ Checkout repo as F-Droid would do:
52
+ $ ../fdroidserver/fdroid checkupdates -v com.b44t.messenger
53
+ (for testing with uncommitted changes, add --allow-dirty)
54
+
55
+ Build repo as F-Droid would do:
56
+ $ ../froidserver/fdroid build -v com.b44t.messenger:<versionCode>
57
+
58
+ (via <https://f-droid.org/docs/Installing_the_Server_and_Repo_Tools/>
59
+ and <https://f-droid.org/docs/Building_Applications/> -
60
+ might require `pip install pyasn1 pyasn1_modules pyaml requests`)
61
+
62
+
63
+ # Changing the description
64
+
65
+ - Change the files `metadata/en-US/short_description.txt`
66
+ and `metadata/en-US/full_description.txt`
67
+ in <https://github.com/deltachat/deltachat-android/> repository.
68
+
69
+ - Make sure there is a "newline" at the end of the description
70
+ (see <https://gitlab.com/fdroid/fdroiddata/merge_requests/3580>).
71
+
72
+
73
+ # Changing F-Droid metadata
74
+
75
+ - The file `com.b44t.messenger.yml` can be changed via a PR to the <https://gitlab.com/fdroid/fdroiddata/> repository.
76
+
77
+ - Reformat the metadata using
78
+ $ ../fdroidserver/fdroid rewritemeta com.b44t.messenger # called from fdroiddata dir
79
+
docs/images/2019-12-material-icon-dev-template.png ADDED
docs/images/2019-12-material-icon-template.png ADDED
docs/playstore.md ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Google Play Store
2
+
3
+ If you have access to uploading and signing apks,
4
+ this can be done at
5
+ https://play.google.com/apps/publish/
6
+
7
+ The description can be discussed and changed at
8
+ https://github.com/deltachat/deltachat-android/blob/master/store/text.md
9
+ In future, we can also add the screenshots or other assets there.
10
+
11
+
12
+ # Google Play Releases
13
+
14
+ see `release-checklist.md`
fastlane/metadata/android/en-US/full_description.txt ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ArcaneChat is a decentralized and secure instant messenger that is easy to use for friends and family.
2
+
3
+ • Anonymous. Instant onboarding without a phone number, e-mail or other private data.
4
+
5
+ • Flexible. Supports multiple chat profiles and is easy to setup on multiple devices.
6
+
7
+ • Extensible. Use mini-apps in chats like shopping lists, calendars or games.
8
+
9
+ • Reliable. Works under bad and adversarial network conditions.
10
+
11
+ • Secure. Audited End-to-End encryption safe against network and server attacks.
12
+
13
+ • Sovereign. Can be run with your own e-mail address or server.
14
+
15
+ ArcaneChat is a Delta Chat client and was created with a focus on usability, good user experience, and saving data plan. Also the app usually experiments with new features that eventually might get added to the official Delta Chat client.
16
+
17
+ <b>Main differences with official Delta Chat client:</b>
18
+
19
+ <ul>
20
+ <li>Support for some markdown styles in text messages (bold, italic, strike, etc.)</li>
21
+ <li>Support for displaying Telegram's animated stickers (.tgs files)</li>
22
+ <li>Support for SVG images previews</li>
23
+ <li>Multiple color themes/skins</li>
24
+ <li>It is possible to disable profiles to completely disconnect them saving data/bandwidth</li>
25
+ <li>You can easily see the connection status of all your profiles in the profile switcher</li>
26
+ <li>Extra option to share location for 12 hours</li>
27
+ <li>Clicking on a message with a POI location, will open the POI on the map</li>
28
+ <li>Last-seen status of contacts is shown in your contact list, like in WhatsApp, Telegram, etc.</li>
29
+ <li>Videos are played in loop, useful for short GIF videos</li>
30
+ <li>Verified icon is shown in the chat list for the "Device Messages" and "Saved Messages" chat to avoid fishing attempts by scammer pretending to be the official chats</li>
31
+ <li>Voice messages have more aggressive compression in "worse quality" mode to save data plan</li>
32
+ <li>Automatic download of messages limited to 640KB by default</li>
33
+ <li>Profile's display name is always shown in the app's title bar instead of the name of the app</li>
34
+ <li>For mini-apps developers: there are some extra features in the WebXDC API, check https://github.com/ArcaneChat/android/#webxdc</li>
35
+ <li>Better settings organization with additional "Privacy" section</li>
36
+ </ul>
fastlane/metadata/android/en-US/images/featureGraphic.png ADDED

Git LFS Details

  • SHA256: e6d8c6806831f08c6f05243505c277a15601ff4b492f7bfeef0e2afd64a7ab83
  • Pointer size: 131 Bytes
  • Size of remote file: 141 kB
fastlane/metadata/android/en-US/images/icon.png ADDED
fastlane/metadata/android/en-US/images/phoneScreenshots/1.png ADDED

Git LFS Details

  • SHA256: 8913fce1c6983d65dca9f5b83c4894115daeb5505726f87933aa5d48e90791cf
  • Pointer size: 131 Bytes
  • Size of remote file: 294 kB
fastlane/metadata/android/en-US/images/phoneScreenshots/2.png ADDED

Git LFS Details

  • SHA256: 1d05327186fd61b2907512332ac911bd26efb2466893845a9f14196b53afd59b
  • Pointer size: 131 Bytes
  • Size of remote file: 262 kB
fastlane/metadata/android/en-US/images/phoneScreenshots/3.png ADDED

Git LFS Details

  • SHA256: 932b9e9fcd78fbde98ffea884f9654e055dca124b31dd54e830ae6caf6f02d6a
  • Pointer size: 131 Bytes
  • Size of remote file: 458 kB
fastlane/metadata/android/en-US/images/phoneScreenshots/4.png ADDED

Git LFS Details

  • SHA256: 9bae9b3ba852b22b011f687ec00100e63b2dd7cd0474f01d0494cc223c1efce0
  • Pointer size: 131 Bytes
  • Size of remote file: 177 kB
fastlane/metadata/android/en-US/images/phoneScreenshots/5.png ADDED

Git LFS Details

  • SHA256: 11c06858382dfd798cfff4ef9830f19815928839319def53b30106276c3286a3
  • Pointer size: 131 Bytes
  • Size of remote file: 220 kB
fastlane/metadata/android/en-US/short_description.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ ⚡ Fast encrypted chats for the family 🎉
fastlane/metadata/android/en-US/title.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ ArcaneChat
fastlane/metadata/android/ru-RU/full_description.txt ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ArcaneChat — децентрализованный и защищённый мессенджер, удобный для друзей и семьи.
2
+
3
+ • Анонимность. Мгновенный вход без номера телефона, e-mail или других личных данных.
4
+
5
+ • Гибкость. Поддерживает несколько профилей чатов и легко настраивается на нескольких устройствах.
6
+
7
+ • Расширяемость. В чатах можно использовать мини-приложения: списки покупок, календари или игры.
8
+
9
+ • Надёжность. Работает даже при плохом соединении и в сложных сетевых условиях.
10
+
11
+ • Безопасность. Проверенное сквозное шифрование, защищённое от сетевых и серверных атак.
12
+
13
+ • Самостоятельность. Может работать с вашим собственным e-mail-адресом или сервером.
14
+
15
+ ArcaneChat — клиент Delta Chat, разработанный с акцентом на удобство, качественный UX и экономию трафика. Также приложение часто экспериментирует с новыми функциями, которые со временем могут быть добавлены в официальный клиент Delta Chat.
16
+
17
+ <b>Основные отличия от официального клиента Delta Chat:</b>
18
+
19
+ <ul>
20
+ <li>Поддержка некоторых стилей markdown в текстовых сообщениях (жирный, курсив, зачёркнутый и т.д.)</li>
21
+ <li>Поддержка отображения анимированных стикеров Telegram (.tgs-файлы)</li>
22
+ <li>Поддержка предпросмотра SVG-изображений</li>
23
+ <li>Несколько цветовых тем/скинов</li>
24
+ <li>Возможность отключать профили, полностью отключая им доступ в сеть для экономии трафика</li>
25
+ <li>На панели переключения профилей видно состояние подключения каждого профиля</li>
26
+ <li>Дополнительная опция для обмена местоположением на 12 часов</li>
27
+ <li>Нажатие на сообщение с POI открывает его на карте</li>
28
+ <li>Статус «был(а) в сети» отображается в списке контактов, как в WhatsApp, Telegram и т.д.</li>
29
+ <li>Видео воспроизводятся по кругу — удобно для коротких GIF-видео</li>
30
+ <li>У чата «Device Messages» в списке чатов отображается значок подтверждения</li>
31
+ <li>В режиме «низкое качество» голосовые сообщения сжимаются сильнее для экономии трафика</li>
32
+ <li>Автоматическая загрузка сообщений по умолчанию ограничена 640KB</li>
33
+ <li>Отображаемое имя профиля всегда видно в заголовке приложения вместо названия приложения</li>
34
+ <li>Для разработчиков мини-приложений: доступны дополнительные возможности WebXDC API, см. https://github.com/ArcaneChat/android/#webxdc</li>
35
+ <li>Более удобная организация настроек с дополнительным разделом «Privacy»</li>
36
+ </ul>
fastlane/metadata/android/ru-RU/short_description.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ ⚡ Быстрые зашифрованные чаты для семьи 🎉
fastlane/metadata/android/ru-RU/title.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ ArcaneChat
flake.lock ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nodes": {
3
+ "android": {
4
+ "inputs": {
5
+ "devshell": "devshell",
6
+ "flake-utils": "flake-utils",
7
+ "nixpkgs": "nixpkgs"
8
+ },
9
+ "locked": {
10
+ "lastModified": 1756239746,
11
+ "narHash": "sha256-0ibN685tT+u/Nbmbrrq9G3mRUzct2Votyv/a7Wwv26s=",
12
+ "owner": "tadfisher",
13
+ "repo": "android-nixpkgs",
14
+ "rev": "256631d162ec883b2341ee59621516e1f65f0f6b",
15
+ "type": "github"
16
+ },
17
+ "original": {
18
+ "owner": "tadfisher",
19
+ "repo": "android-nixpkgs",
20
+ "type": "github"
21
+ }
22
+ },
23
+ "devshell": {
24
+ "inputs": {
25
+ "nixpkgs": [
26
+ "android",
27
+ "nixpkgs"
28
+ ]
29
+ },
30
+ "locked": {
31
+ "lastModified": 1741473158,
32
+ "narHash": "sha256-kWNaq6wQUbUMlPgw8Y+9/9wP0F8SHkjy24/mN3UAppg=",
33
+ "owner": "numtide",
34
+ "repo": "devshell",
35
+ "rev": "7c9e793ebe66bcba8292989a68c0419b737a22a0",
36
+ "type": "github"
37
+ },
38
+ "original": {
39
+ "owner": "numtide",
40
+ "repo": "devshell",
41
+ "type": "github"
42
+ }
43
+ },
44
+ "flake-utils": {
45
+ "inputs": {
46
+ "systems": "systems"
47
+ },
48
+ "locked": {
49
+ "lastModified": 1731533236,
50
+ "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
51
+ "owner": "numtide",
52
+ "repo": "flake-utils",
53
+ "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
54
+ "type": "github"
55
+ },
56
+ "original": {
57
+ "owner": "numtide",
58
+ "repo": "flake-utils",
59
+ "type": "github"
60
+ }
61
+ },
62
+ "flake-utils_2": {
63
+ "inputs": {
64
+ "systems": "systems_2"
65
+ },
66
+ "locked": {
67
+ "lastModified": 1731533236,
68
+ "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
69
+ "owner": "numtide",
70
+ "repo": "flake-utils",
71
+ "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
72
+ "type": "github"
73
+ },
74
+ "original": {
75
+ "owner": "numtide",
76
+ "repo": "flake-utils",
77
+ "type": "github"
78
+ }
79
+ },
80
+ "nixpkgs": {
81
+ "locked": {
82
+ "lastModified": 1756125398,
83
+ "narHash": "sha256-XexyKZpf46cMiO5Vbj+dWSAXOnr285GHsMch8FBoHbc=",
84
+ "owner": "NixOS",
85
+ "repo": "nixpkgs",
86
+ "rev": "3b9f00d7a7bf68acd4c4abb9d43695afb04e03a5",
87
+ "type": "github"
88
+ },
89
+ "original": {
90
+ "owner": "NixOS",
91
+ "ref": "nixos-unstable",
92
+ "repo": "nixpkgs",
93
+ "type": "github"
94
+ }
95
+ },
96
+ "nixpkgs_2": {
97
+ "locked": {
98
+ "lastModified": 1756159630,
99
+ "narHash": "sha256-ohMvsjtSVdT/bruXf5ClBh8ZYXRmD4krmjKrXhEvwMg=",
100
+ "owner": "NixOS",
101
+ "repo": "nixpkgs",
102
+ "rev": "84c256e42600cb0fdf25763b48d28df2f25a0c8b",
103
+ "type": "github"
104
+ },
105
+ "original": {
106
+ "owner": "NixOS",
107
+ "ref": "nixpkgs-unstable",
108
+ "repo": "nixpkgs",
109
+ "type": "github"
110
+ }
111
+ },
112
+ "nixpkgs_3": {
113
+ "locked": {
114
+ "lastModified": 1744536153,
115
+ "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
116
+ "owner": "NixOS",
117
+ "repo": "nixpkgs",
118
+ "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
119
+ "type": "github"
120
+ },
121
+ "original": {
122
+ "owner": "NixOS",
123
+ "ref": "nixpkgs-unstable",
124
+ "repo": "nixpkgs",
125
+ "type": "github"
126
+ }
127
+ },
128
+ "root": {
129
+ "inputs": {
130
+ "android": "android",
131
+ "flake-utils": "flake-utils_2",
132
+ "nixpkgs": "nixpkgs_2",
133
+ "rust-overlay": "rust-overlay"
134
+ }
135
+ },
136
+ "rust-overlay": {
137
+ "inputs": {
138
+ "nixpkgs": "nixpkgs_3"
139
+ },
140
+ "locked": {
141
+ "lastModified": 1763347184,
142
+ "narHash": "sha256-6QH8hpCYJxifvyHEYg+Da0BotUn03BwLIvYo3JAxuqQ=",
143
+ "owner": "oxalica",
144
+ "repo": "rust-overlay",
145
+ "rev": "08895cce80433978d5bfd668efa41c5e24578cbd",
146
+ "type": "github"
147
+ },
148
+ "original": {
149
+ "owner": "oxalica",
150
+ "repo": "rust-overlay",
151
+ "type": "github"
152
+ }
153
+ },
154
+ "systems": {
155
+ "locked": {
156
+ "lastModified": 1681028828,
157
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
158
+ "owner": "nix-systems",
159
+ "repo": "default",
160
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
161
+ "type": "github"
162
+ },
163
+ "original": {
164
+ "owner": "nix-systems",
165
+ "repo": "default",
166
+ "type": "github"
167
+ }
168
+ },
169
+ "systems_2": {
170
+ "locked": {
171
+ "lastModified": 1681028828,
172
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
173
+ "owner": "nix-systems",
174
+ "repo": "default",
175
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
176
+ "type": "github"
177
+ },
178
+ "original": {
179
+ "owner": "nix-systems",
180
+ "repo": "default",
181
+ "type": "github"
182
+ }
183
+ }
184
+ },
185
+ "root": "root",
186
+ "version": 7
187
+ }
flake.nix ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ description = "Delta Chat for Android";
3
+
4
+ inputs = {
5
+ nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6
+ rust-overlay.url = "github:oxalica/rust-overlay";
7
+ flake-utils.url = "github:numtide/flake-utils";
8
+ android.url = "github:tadfisher/android-nixpkgs";
9
+ };
10
+
11
+ outputs = { self, nixpkgs, rust-overlay, flake-utils, android }:
12
+ flake-utils.lib.eachDefaultSystem (system:
13
+ let
14
+ overlays = [ (import rust-overlay) ];
15
+ pkgs = import nixpkgs { inherit system overlays; };
16
+ android-sdk = android.sdk.${system} (sdkPkgs:
17
+ with sdkPkgs; [
18
+ build-tools-35-0-0
19
+ cmdline-tools-latest
20
+ platform-tools
21
+ platforms-android-36
22
+ ndk-27-2-12479018
23
+ ]);
24
+ rust-version = pkgs.lib.removeSuffix "\n"
25
+ (builtins.readFile ./scripts/rust-toolchain);
26
+ in
27
+ {
28
+ formatter = pkgs.nixpkgs-fmt;
29
+
30
+ devShells.default = pkgs.mkShell rec {
31
+ ANDROID_SDK_ROOT = "${android-sdk}/share/android-sdk";
32
+ ANDROID_NDK_ROOT =
33
+ "${android-sdk}/share/android-sdk/ndk/27.2.12479018";
34
+ GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${ANDROID_SDK_ROOT}/build-tools/35.0.0/aapt2";
35
+ buildInputs = [
36
+ android-sdk
37
+ pkgs.openjdk17
38
+ (pkgs.buildPackages.rust-bin.stable."${rust-version}".minimal.override {
39
+ targets = [
40
+ "armv7-linux-androideabi"
41
+ "aarch64-linux-android"
42
+ "i686-linux-android"
43
+ "x86_64-linux-android"
44
+ ];
45
+ })
46
+ ];
47
+ };
48
+ });
49
+ }
google-services.json ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "project_info": {
3
+ "project_number": "922391085500",
4
+ "project_id": "delta-chat-fcm",
5
+ "storage_bucket": "delta-chat-fcm.appspot.com"
6
+ },
7
+ "client": [
8
+ {
9
+ "client_info": {
10
+ "mobilesdk_app_id": "1:922391085500:android:938fa7a685ce74ba3e2bb9",
11
+ "android_client_info": {
12
+ "package_name": "chat.delta"
13
+ }
14
+ },
15
+ "oauth_client": [],
16
+ "api_key": [
17
+ {
18
+ "current_key": "AIzaSyBYH8Iznh8btYX7g_udv_bu68VH30zzxho"
19
+ }
20
+ ],
21
+ "services": {
22
+ "appinvite_service": {
23
+ "other_platform_oauth_client": []
24
+ }
25
+ }
26
+ },
27
+ {
28
+ "client_info": {
29
+ "mobilesdk_app_id": "1:922391085500:android:6f54e2c4e49405673e2bb9",
30
+ "android_client_info": {
31
+ "package_name": "com.github.arcanechat.beta"
32
+ }
33
+ },
34
+ "oauth_client": [],
35
+ "api_key": [
36
+ {
37
+ "current_key": "AIzaSyBYH8Iznh8btYX7g_udv_bu68VH30zzxho"
38
+ }
39
+ ],
40
+ "services": {
41
+ "appinvite_service": {
42
+ "other_platform_oauth_client": []
43
+ }
44
+ }
45
+ },
46
+ {
47
+ "client_info": {
48
+ "mobilesdk_app_id": "1:922391085500:android:aff82fbc40c8172e3e2bb9",
49
+ "android_client_info": {
50
+ "package_name": "com.github.arcanechat"
51
+ }
52
+ },
53
+ "oauth_client": [],
54
+ "api_key": [
55
+ {
56
+ "current_key": "AIzaSyBYH8Iznh8btYX7g_udv_bu68VH30zzxho"
57
+ }
58
+ ],
59
+ "services": {
60
+ "appinvite_service": {
61
+ "other_platform_oauth_client": []
62
+ }
63
+ }
64
+ },
65
+ {
66
+ "client_info": {
67
+ "mobilesdk_app_id": "1:922391085500:android:92b4cf12669cc2083e2bb9",
68
+ "android_client_info": {
69
+ "package_name": "chat.delta.lite"
70
+ }
71
+ },
72
+ "oauth_client": [],
73
+ "api_key": [
74
+ {
75
+ "current_key": "AIzaSyBYH8Iznh8btYX7g_udv_bu68VH30zzxho"
76
+ }
77
+ ],
78
+ "services": {
79
+ "appinvite_service": {
80
+ "other_platform_oauth_client": []
81
+ }
82
+ }
83
+ },
84
+ {
85
+ "client_info": {
86
+ "mobilesdk_app_id": "1:922391085500:android:228a205b8aa2bacc3e2bb9",
87
+ "android_client_info": {
88
+ "package_name": "chat.delta.lite.beta"
89
+ }
90
+ },
91
+ "oauth_client": [],
92
+ "api_key": [
93
+ {
94
+ "current_key": "AIzaSyBYH8Iznh8btYX7g_udv_bu68VH30zzxho"
95
+ }
96
+ ],
97
+ "services": {
98
+ "appinvite_service": {
99
+ "other_platform_oauth_client": []
100
+ }
101
+ }
102
+ }
103
+ ],
104
+ "configuration_version": "1"
105
+ }
gradle.properties ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ android.defaults.buildfeatures.buildconfig=true
2
+ android.enableJetifier=true
3
+ android.nonTransitiveRClass=false
4
+ android.useAndroidX=true
5
+ org.gradle.jvmargs=-Xmx4608m
gradle/wrapper/gradle-wrapper.jar ADDED
Binary file (61.6 kB). View file
 
gradle/wrapper/gradle-wrapper.properties ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ distributionBase=GRADLE_USER_HOME
2
+ distributionPath=wrapper/dists
3
+ distributionSha256Sum=20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78
4
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
5
+ networkTimeout=10000
6
+ zipStoreBase=GRADLE_USER_HOME
7
+ zipStorePath=wrapper/dists
gradlew ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+
3
+ #
4
+ # Copyright © 2015-2021 the original authors.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ ##############################################################################
20
+ #
21
+ # Gradle start up script for POSIX generated by Gradle.
22
+ #
23
+ # Important for running:
24
+ #
25
+ # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26
+ # noncompliant, but you have some other compliant shell such as ksh or
27
+ # bash, then to run this script, type that shell name before the whole
28
+ # command line, like:
29
+ #
30
+ # ksh Gradle
31
+ #
32
+ # Busybox and similar reduced shells will NOT work, because this script
33
+ # requires all of these POSIX shell features:
34
+ # * functions;
35
+ # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36
+ # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37
+ # * compound commands having a testable exit status, especially «case»;
38
+ # * various built-in commands including «command», «set», and «ulimit».
39
+ #
40
+ # Important for patching:
41
+ #
42
+ # (2) This script targets any POSIX shell, so it avoids extensions provided
43
+ # by Bash, Ksh, etc; in particular arrays are avoided.
44
+ #
45
+ # The "traditional" practice of packing multiple parameters into a
46
+ # space-separated string is a well documented source of bugs and security
47
+ # problems, so this is (mostly) avoided, by progressively accumulating
48
+ # options in "$@", and eventually passing that to Java.
49
+ #
50
+ # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51
+ # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52
+ # see the in-line comments for details.
53
+ #
54
+ # There are tweaks for specific operating systems such as AIX, CygWin,
55
+ # Darwin, MinGW, and NonStop.
56
+ #
57
+ # (3) This script is generated from the Groovy template
58
+ # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59
+ # within the Gradle project.
60
+ #
61
+ # You can find Gradle at https://github.com/gradle/gradle/.
62
+ #
63
+ ##############################################################################
64
+
65
+ # Attempt to set APP_HOME
66
+
67
+ # Resolve links: $0 may be a link
68
+ app_path=$0
69
+
70
+ # Need this for daisy-chained symlinks.
71
+ while
72
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73
+ [ -h "$app_path" ]
74
+ do
75
+ ls=$( ls -ld "$app_path" )
76
+ link=${ls#*' -> '}
77
+ case $link in #(
78
+ /*) app_path=$link ;; #(
79
+ *) app_path=$APP_HOME$link ;;
80
+ esac
81
+ done
82
+
83
+ # This is normally unused
84
+ # shellcheck disable=SC2034
85
+ APP_BASE_NAME=${0##*/}
86
+ APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
87
+
88
+ # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89
+ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90
+
91
+ # Use the maximum available, or set MAX_FD != -1 to use that value.
92
+ MAX_FD=maximum
93
+
94
+ warn () {
95
+ echo "$*"
96
+ } >&2
97
+
98
+ die () {
99
+ echo
100
+ echo "$*"
101
+ echo
102
+ exit 1
103
+ } >&2
104
+
105
+ # OS specific support (must be 'true' or 'false').
106
+ cygwin=false
107
+ msys=false
108
+ darwin=false
109
+ nonstop=false
110
+ case "$( uname )" in #(
111
+ CYGWIN* ) cygwin=true ;; #(
112
+ Darwin* ) darwin=true ;; #(
113
+ MSYS* | MINGW* ) msys=true ;; #(
114
+ NONSTOP* ) nonstop=true ;;
115
+ esac
116
+
117
+ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
118
+
119
+
120
+ # Determine the Java command to use to start the JVM.
121
+ if [ -n "$JAVA_HOME" ] ; then
122
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
123
+ # IBM's JDK on AIX uses strange locations for the executables
124
+ JAVACMD=$JAVA_HOME/jre/sh/java
125
+ else
126
+ JAVACMD=$JAVA_HOME/bin/java
127
+ fi
128
+ if [ ! -x "$JAVACMD" ] ; then
129
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
130
+
131
+ Please set the JAVA_HOME variable in your environment to match the
132
+ location of your Java installation."
133
+ fi
134
+ else
135
+ JAVACMD=java
136
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137
+
138
+ Please set the JAVA_HOME variable in your environment to match the
139
+ location of your Java installation."
140
+ fi
141
+
142
+ # Increase the maximum file descriptors if we can.
143
+ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144
+ case $MAX_FD in #(
145
+ max*)
146
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147
+ # shellcheck disable=SC3045
148
+ MAX_FD=$( ulimit -H -n ) ||
149
+ warn "Could not query maximum file descriptor limit"
150
+ esac
151
+ case $MAX_FD in #(
152
+ '' | soft) :;; #(
153
+ *)
154
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155
+ # shellcheck disable=SC3045
156
+ ulimit -n "$MAX_FD" ||
157
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
158
+ esac
159
+ fi
160
+
161
+ # Collect all arguments for the java command, stacking in reverse order:
162
+ # * args from the command line
163
+ # * the main class name
164
+ # * -classpath
165
+ # * -D...appname settings
166
+ # * --module-path (only if needed)
167
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
168
+
169
+ # For Cygwin or MSYS, switch paths to Windows format before running java
170
+ if "$cygwin" || "$msys" ; then
171
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
172
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
173
+
174
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
175
+
176
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
177
+ for arg do
178
+ if
179
+ case $arg in #(
180
+ -*) false ;; # don't mess with options #(
181
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
182
+ [ -e "$t" ] ;; #(
183
+ *) false ;;
184
+ esac
185
+ then
186
+ arg=$( cygpath --path --ignore --mixed "$arg" )
187
+ fi
188
+ # Roll the args list around exactly as many times as the number of
189
+ # args, so each arg winds up back in the position where it started, but
190
+ # possibly modified.
191
+ #
192
+ # NB: a `for` loop captures its iteration list before it begins, so
193
+ # changing the positional parameters here affects neither the number of
194
+ # iterations, nor the values presented in `arg`.
195
+ shift # remove old arg
196
+ set -- "$@" "$arg" # push replacement arg
197
+ done
198
+ fi
199
+
200
+ # Collect all arguments for the java command;
201
+ # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202
+ # shell script including quotes and variable substitutions, so put them in
203
+ # double quotes to make sure that they get re-expanded; and
204
+ # * put everything else in single quotes, so that it's not re-expanded.
205
+
206
+ set -- \
207
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
208
+ -classpath "$CLASSPATH" \
209
+ org.gradle.wrapper.GradleWrapperMain \
210
+ "$@"
211
+
212
+ # Stop when "xargs" is not available.
213
+ if ! command -v xargs >/dev/null 2>&1
214
+ then
215
+ die "xargs is not available"
216
+ fi
217
+
218
+ # Use "xargs" to parse quoted args.
219
+ #
220
+ # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
221
+ #
222
+ # In Bash we could simply go:
223
+ #
224
+ # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
225
+ # set -- "${ARGS[@]}" "$@"
226
+ #
227
+ # but POSIX shell has neither arrays nor command substitution, so instead we
228
+ # post-process each arg (as a line of input to sed) to backslash-escape any
229
+ # character that might be a shell metacharacter, then use eval to reverse
230
+ # that process (while maintaining the separation between arguments), and wrap
231
+ # the whole thing up as a single "set" statement.
232
+ #
233
+ # This will of course break if any of these variables contains a newline or
234
+ # an unmatched quote.
235
+ #
236
+
237
+ eval "set -- $(
238
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
239
+ xargs -n1 |
240
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
241
+ tr '\n' ' '
242
+ )" '"$@"'
243
+
244
+ exec "$JAVACMD" "$@"
gradlew.bat ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @rem
2
+ @rem Copyright 2015 the original author or authors.
3
+ @rem
4
+ @rem Licensed under the Apache License, Version 2.0 (the "License");
5
+ @rem you may not use this file except in compliance with the License.
6
+ @rem You may obtain a copy of the License at
7
+ @rem
8
+ @rem https://www.apache.org/licenses/LICENSE-2.0
9
+ @rem
10
+ @rem Unless required by applicable law or agreed to in writing, software
11
+ @rem distributed under the License is distributed on an "AS IS" BASIS,
12
+ @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ @rem See the License for the specific language governing permissions and
14
+ @rem limitations under the License.
15
+ @rem
16
+
17
+ @if "%DEBUG%"=="" @echo off
18
+ @rem ##########################################################################
19
+ @rem
20
+ @rem Gradle startup script for Windows
21
+ @rem
22
+ @rem ##########################################################################
23
+
24
+ @rem Set local scope for the variables with windows NT shell
25
+ if "%OS%"=="Windows_NT" setlocal
26
+
27
+ set DIRNAME=%~dp0
28
+ if "%DIRNAME%"=="" set DIRNAME=.
29
+ @rem This is normally unused
30
+ set APP_BASE_NAME=%~n0
31
+ set APP_HOME=%DIRNAME%
32
+
33
+ @rem Resolve any "." and ".." in APP_HOME to make it shorter.
34
+ for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
35
+
36
+ @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
37
+ set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
38
+
39
+ @rem Find java.exe
40
+ if defined JAVA_HOME goto findJavaFromJavaHome
41
+
42
+ set JAVA_EXE=java.exe
43
+ %JAVA_EXE% -version >NUL 2>&1
44
+ if %ERRORLEVEL% equ 0 goto execute
45
+
46
+ echo.
47
+ echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48
+ echo.
49
+ echo Please set the JAVA_HOME variable in your environment to match the
50
+ echo location of your Java installation.
51
+
52
+ goto fail
53
+
54
+ :findJavaFromJavaHome
55
+ set JAVA_HOME=%JAVA_HOME:"=%
56
+ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
57
+
58
+ if exist "%JAVA_EXE%" goto execute
59
+
60
+ echo.
61
+ echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62
+ echo.
63
+ echo Please set the JAVA_HOME variable in your environment to match the
64
+ echo location of your Java installation.
65
+
66
+ goto fail
67
+
68
+ :execute
69
+ @rem Setup the command line
70
+
71
+ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
72
+
73
+
74
+ @rem Execute Gradle
75
+ "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
76
+
77
+ :end
78
+ @rem End local scope for the variables with windows NT shell
79
+ if %ERRORLEVEL% equ 0 goto mainEnd
80
+
81
+ :fail
82
+ rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83
+ rem the _cmd.exe /c_ return code!
84
+ set EXIT_CODE=%ERRORLEVEL%
85
+ if %EXIT_CODE% equ 0 set EXIT_CODE=1
86
+ if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87
+ exit /b %EXIT_CODE%
88
+
89
+ :mainEnd
90
+ if "%OS%"=="Windows_NT" endlocal
91
+
92
+ :omega
jni/Android.mk ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ JNI_DIR := $(call my-dir)
2
+ LOCAL_PATH := $(call my-dir)
3
+
4
+ # Include prebuilt rust
5
+
6
+ include $(CLEAR_VARS)
7
+ LOCAL_MODULE := deltachat-core
8
+ LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libdeltachat.a
9
+ # The header files should be located in the following dir relative to jni/ dir
10
+ LOCAL_EXPORT_C_INCLUDES := include/
11
+ include $(PREBUILT_STATIC_LIBRARY)
12
+
13
+
14
+ ################################################################################
15
+ # main shared library as used from Java (includes the static ones)
16
+ ################################################################################
17
+
18
+ include $(CLEAR_VARS)
19
+
20
+ LOCAL_MODULE := native-utils
21
+
22
+ LOCAL_C_INCLUDES := $(JNI_DIR)/utils/
23
+ LOCAL_LDLIBS := -llog
24
+ LOCAL_STATIC_LIBRARIES := deltachat-core
25
+
26
+ # -Werror flag is important to catch incompatibilities between the JNI bindings and the core.
27
+ # Otherwise passing a variable of different type such as char * instead of int
28
+ # causes only a -Wint-conversion warning.
29
+ LOCAL_CFLAGS := -Werror -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -DNULL=0 -DSOCKLEN_T=socklen_t -DLOCALE_NOT_USED -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
30
+ LOCAL_CFLAGS += -Drestrict='' -D__EMX__ -DFIXED_POINT -DUSE_ALLOCA -DHAVE_LRINT -DHAVE_LRINTF -fno-math-errno
31
+ LOCAL_CFLAGS += -DANDROID_NDK -DDISABLE_IMPORTGL -fno-strict-aliasing -DAVOID_TABLES -DANDROID_TILE_BASED_DECODE -DANDROID_ARMV6_IDCT -ffast-math -D__STDC_CONSTANT_MACROS
32
+
33
+ LOCAL_SRC_FILES := dc_wrapper.c
34
+ LOCAL_LDFLAGS += -Wl,--build-id=none
35
+
36
+ include $(BUILD_SHARED_LIBRARY)
jni/Application.mk ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ APP_PLATFORM := android-21
2
+ APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
3
+ APP_STL := none
4
+
5
+ ifneq ($(NDK_DEBUG),1)
6
+ APP_CFLAGS += -Oz -flto=full -fno-unwind-tables -fno-exceptions -fno-asynchronous-unwind-tables -fomit-frame-pointer
7
+ APP_LDFLAGS += -flto=full
8
+ endif