Click to expand / 展开查看
83 |
84 | (Paste problem log here / 此处粘贴问题 Log)
85 |
86 |
87 |
88 |
89 | validations:
90 | required: true
91 | - type: checkboxes
92 | attributes:
93 | label: Confirm the contents you submitted / 确认一下你提交的信息
94 | description: |
95 | In order to ensure the quality of issues and avoid wasting unnecessary time, issues that do not check the options below will be closed directly.
96 | Please make sure you have **checked the option below** before submitting.
97 | 为了确保 issues 的质量和避免浪费不必要的时间,未勾选下方选项的 issues 将直接被关闭。
98 | 请一定确保你已经**勾选下方的选项**后再提交。
99 | options:
100 | - label: I certify that the above contents is correct / 我确保上述信息准确无误
101 | required: false
102 |
--------------------------------------------------------------------------------
/.github/workflows/commit_ci.yml:
--------------------------------------------------------------------------------
1 | name: Automatic Build on Commit
2 |
3 | on:
4 | workflow_dispatch:
5 | push:
6 | branches: [ master ]
7 | paths-ignore:
8 | - '**.md'
9 | - '**.txt'
10 | - '.github/**'
11 | - '!.github/workflows/**'
12 |
13 | jobs:
14 | build:
15 | name: Build CI
16 | if: ${{ success() }}
17 | runs-on: ubuntu-latest
18 | env:
19 | MODULE_APK_OUTPUT_PATH: 'module-app/build/outputs/apk'
20 | DEMO_APK_OUTPUT_PATH: 'demo-app/build/outputs/apk'
21 | APP_CENTER_SECRET: ${{ secrets.APP_CENTER_SECRET }}
22 | TG_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
23 | TG_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
24 | COMMIT_MESSAGE: |+
25 | New push to GitHub\!
26 | ```
27 | ${{ github.event.head_commit.message }}
28 | ```by `${{ github.event.head_commit.author.name }}`
29 | See commit detail [here](${{ github.event.head_commit.url }})
30 | COMMIT_URL: ${{ github.event.head_commit.url }}
31 | steps:
32 | - uses: actions/checkout@v4
33 | - name: Prepare GitHub Env
34 | run: |
35 | GITHUB_SHA=${{ github.sha }}
36 | GITHUB_CI_COMMIT_ID=${GITHUB_SHA:0:7}
37 | echo "GITHUB_CI_COMMIT_ID=$GITHUB_CI_COMMIT_ID" >> $GITHUB_ENV
38 | - name: Setup cmake
39 | uses: jwlawson/actions-setup-cmake@v1
40 | with:
41 | cmake-version: '3.22.1'
42 | - name: Prepare Java 17
43 | uses: actions/setup-java@v4
44 | with:
45 | java-version: 17
46 | java-package: jdk
47 | distribution: 'temurin'
48 | cache: 'gradle'
49 | - name: Cache Gradle Dependencies
50 | uses: actions/cache@v3
51 | with:
52 | path: |
53 | ~/.gradle/caches
54 | ~/.gradle/wrapper
55 | !~/.gradle/caches/build-cache-*
56 | key: gradle-deps-core-${{ hashFiles('**/build.gradle.kts') }}
57 | restore-keys: |
58 | gradle-deps
59 | - name: Cache Gradle Build
60 | uses: actions/cache@v3
61 | with:
62 | path: |
63 | ~/.gradle/caches/build-cache-*
64 | key: gradle-builds-core-${{ github.sha }}
65 | restore-keys: |
66 | gradle-builds
67 | - name: Build with Gradle
68 | run: |
69 | ./gradlew :module-app:assembleDebug
70 | ./gradlew :module-app:assembleRelease
71 | ./gradlew :demo-app:assembleDebug
72 | ./gradlew :demo-app:assembleRelease
73 | echo "MODULE_DEBUG_APK_PATH=$(find ${{ env.MODULE_APK_OUTPUT_PATH }}/debug -name '*.apk')" >> $GITHUB_ENV
74 | echo "MODULE_RELEASE_APK_PATH=$(find ${{ env.MODULE_APK_OUTPUT_PATH }}/release -name '*.apk')" >> $GITHUB_ENV
75 | echo "DEMO_DEBUG_APK_PATH=$(find ${{ env.DEMO_APK_OUTPUT_PATH }}/debug -name '*.apk')" >> $GITHUB_ENV
76 | echo "DEMO_RELEASE_APK_PATH=$(find ${{ env.DEMO_APK_OUTPUT_PATH }}/release -name '*.apk')" >> $GITHUB_ENV
77 | - name: Upload Artifacts (Module-Debug)
78 | uses: actions/upload-artifact@v4
79 | with:
80 | path: ${{ env.MODULE_DEBUG_APK_PATH }}
81 | name: AppErrorsTracking-module-debug-${{ github.event.head_commit.id }}
82 | - name: Upload Artifacts (Module-Release)
83 | uses: actions/upload-artifact@v4
84 | with:
85 | path: ${{ env.MODULE_RELEASE_APK_PATH }}
86 | name: AppErrorsTracking-module-release-${{ github.event.head_commit.id }}
87 | - name: Upload Artifacts (Demo-Debug)
88 | uses: actions/upload-artifact@v4
89 | with:
90 | path: ${{ env.DEMO_DEBUG_APK_PATH }}
91 | name: AppErrorsTracking-demo-debug-${{ github.event.head_commit.id }}
92 | - name: Upload Artifacts (Demo-Release)
93 | uses: actions/upload-artifact@v4
94 | with:
95 | path: ${{ env.DEMO_RELEASE_APK_PATH }}
96 | name: AppErrorsTracking-demo-release-${{ github.event.head_commit.id }}
97 | - name: Post Artifacts to Telegram
98 | run: |
99 | export module_debug=$(find ${{ env.MODULE_APK_OUTPUT_PATH }}/debug -name "*.apk")
100 | export module_release=$(find ${{ env.MODULE_APK_OUTPUT_PATH }}/release -name "*.apk")
101 | export demo_debug=$(find ${{ env.DEMO_APK_OUTPUT_PATH }}/debug -name "*.apk")
102 | export demo_release=$(find ${{ env.DEMO_APK_OUTPUT_PATH }}/release -name "*.apk")
103 | ESCAPED=`python3 -c 'import json,os,urllib.parse; msg = json.dumps(os.environ["COMMIT_MESSAGE"]); print(urllib.parse.quote(msg if len(msg) <= 1024 else json.dumps(os.environ["COMMIT_URL"])))'`
104 | curl -v "https://api.telegram.org/bot${TG_BOT_TOKEN}/sendMediaGroup?chat_id=${TG_CHAT_ID}&media=%5B%7B%22type%22%3A%22document%22%2C%20%22media%22%3A%22attach%3A%2F%2Fmodule_debug%22%7D%2C%7B%22type%22%3A%22document%22%2C%20%22media%22%3A%22attach%3A%2F%2Fmodule_release%22%7D%2C%7B%22type%22%3A%22document%22%2C%20%22media%22%3A%22attach%3A%2F%2Fdemo_debug%22%7D%2C%7B%22type%22%3A%22document%22%2C%20%22media%22%3A%22attach%3A%2F%2Fdemo_release%22%2C%22parse_mode%22%3A%22MarkdownV2%22%2C%22caption%22:${ESCAPED}%7D%5D" \
105 | -F module_debug="@$module_debug" \
106 | -F module_release="@$module_release" \
107 | -F demo_debug="@$demo_debug" \
108 | -F demo_release="@$demo_release"
--------------------------------------------------------------------------------
/.github/workflows/pull_request_ci.yml:
--------------------------------------------------------------------------------
1 | name: Pull Request Checker
2 |
3 | on:
4 | pull_request:
5 | branches: [ master ]
6 | paths-ignore:
7 | - '**.md'
8 | - '**.txt'
9 | - '.github/**'
10 | - '!.github/workflows/**'
11 |
12 | jobs:
13 | build:
14 | name: Pull Request Check
15 | if: ${{ success() }}
16 | runs-on: ubuntu-latest
17 | env:
18 | MODULE_APK_OUTPUT_PATH: 'module-app/build/outputs/apk'
19 | DEMO_APK_OUTPUT_PATH: 'demo-app/build/outputs/apk'
20 | steps:
21 | - uses: actions/checkout@v4
22 | - name: Prepare GitHub Env
23 | run: |
24 | GITHUB_SHA=${{ github.sha }}
25 | GITHUB_CI_COMMIT_ID=${GITHUB_SHA:0:7}
26 | echo "GITHUB_CI_COMMIT_ID=$GITHUB_CI_COMMIT_ID" >> $GITHUB_ENV
27 | - name: Setup cmake
28 | uses: jwlawson/actions-setup-cmake@v1
29 | with:
30 | cmake-version: '3.22.1'
31 | - name: Prepare Java 17
32 | uses: actions/setup-java@v4
33 | with:
34 | java-version: 17
35 | java-package: jdk
36 | distribution: 'temurin'
37 | cache: 'gradle'
38 | - name: Cache Gradle Dependencies
39 | uses: actions/cache@v3
40 | with:
41 | path: |
42 | ~/.gradle/caches
43 | ~/.gradle/wrapper
44 | !~/.gradle/caches/build-cache-*
45 | key: gradle-deps-core-${{ hashFiles('**/build.gradle.kts') }}
46 | restore-keys: |
47 | gradle-deps
48 | - name: Cache Gradle Build
49 | uses: actions/cache@v3
50 | with:
51 | path: |
52 | ~/.gradle/caches/build-cache-*
53 | key: gradle-builds-core-${{ github.sha }}
54 | restore-keys: |
55 | gradle-builds
56 | - name: Build with Gradle
57 | run: |
58 | ./gradlew :module-app:assembleDebug
59 | ./gradlew :module-app:assembleRelease
60 | ./gradlew :demo-app:assembleDebug
61 | ./gradlew :demo-app:assembleRelease
62 | echo "MODULE_DEBUG_APK_PATH=$(find ${{ env.MODULE_APK_OUTPUT_PATH }}/debug -name '*.apk')" >> $GITHUB_ENV
63 | echo "MODULE_RELEASE_APK_PATH=$(find ${{ env.MODULE_APK_OUTPUT_PATH }}/release -name '*.apk')" >> $GITHUB_ENV
64 | echo "DEMO_DEBUG_APK_PATH=$(find ${{ env.DEMO_APK_OUTPUT_PATH }}/debug -name '*.apk')" >> $GITHUB_ENV
65 | echo "DEMO_RELEASE_APK_PATH=$(find ${{ env.DEMO_APK_OUTPUT_PATH }}/release -name '*.apk')" >> $GITHUB_ENV
66 | - name: Upload Artifacts (Module-Debug)
67 | uses: actions/upload-artifact@v4
68 | with:
69 | path: ${{ env.MODULE_DEBUG_APK_PATH }}
70 | name: AppErrorsTracking-module-debug-${{ github.event.head_commit.id }}
71 | - name: Upload Artifacts (Module-Release)
72 | uses: actions/upload-artifact@v4
73 | with:
74 | path: ${{ env.MODULE_RELEASE_APK_PATH }}
75 | name: AppErrorsTracking-module-release-${{ github.event.head_commit.id }}
76 | - name: Upload Artifacts (Demo-Debug)
77 | uses: actions/upload-artifact@v4
78 | with:
79 | path: ${{ env.DEMO_DEBUG_APK_PATH }}
80 | name: AppErrorsTracking-demo-debug-${{ github.event.head_commit.id }}
81 | - name: Upload Artifacts (Demo-Release)
82 | uses: actions/upload-artifact@v4
83 | with:
84 | path: ${{ env.DEMO_RELEASE_APK_PATH }}
85 | name: AppErrorsTracking-demo-release-${{ github.event.head_commit.id }}
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Fully .gtignore for IntelliJ, Android Studio and Gradle based Java projects
2 | ## References:
3 | ## - https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
4 | ## - https://github.com/android/platform-samples/blob/main/.gitignore
5 |
6 | # User-specific stuff
7 | .idea/**/workspace.xml
8 | .idea/**/tasks.xml
9 | .idea/**/usage.statistics.xml
10 | .idea/**/dictionaries
11 | .idea/**/shelf
12 |
13 | # AWS User-specific
14 | .idea/**/aws.xml
15 |
16 | # Generated files
17 | .idea/**/contentModel.xml
18 |
19 | # Sensitive or high-churn files
20 | .idea/**/dataSources/
21 | .idea/**/dataSources.ids
22 | .idea/**/dataSources.local.xml
23 | .idea/**/sqlDataSources.xml
24 | .idea/**/dynamic.xml
25 | .idea/**/uiDesigner.xml
26 | .idea/**/dbnavigator.xml
27 |
28 | # Gradle
29 | .idea/**/gradle.xml
30 | .idea/**/libraries
31 |
32 | # Gradle and Maven with auto-import
33 | .idea/.name
34 | .idea/artifacts
35 | .idea/compiler.xml
36 | .idea/jarRepositories.xml
37 | .idea/modules.xml
38 | .idea/*.iml
39 | .idea/modules
40 | .idea/caches
41 | .idea/material_theme**
42 | .idea/other.xml
43 | *.iml
44 | *.ipr
45 |
46 | # Kotlin
47 | .kotlin
48 |
49 | # Misc
50 | .idea/misc.xml
51 |
52 | # CMake
53 | cmake-build-*/
54 |
55 | # Mongo Explorer plugin
56 | .idea/**/mongoSettings.xml
57 |
58 | # File-based project format
59 | *.iws
60 |
61 | # IntelliJ
62 | out/
63 |
64 | # mpeltonen/sbt-idea plugin
65 | .idea_modules/
66 |
67 | # JIRA plugin
68 | atlassian-ide-plugin.xml
69 |
70 | # Cursive Clojure plugin
71 | .idea/replstate.xml
72 |
73 | # SonarLint plugin
74 | .idea/sonarlint/
75 |
76 | # Crashlytics plugin (for Android Studio and IntelliJ)
77 | com_crashlytics_export_strings.xml
78 | crashlytics.properties
79 | crashlytics-build.properties
80 | fabric.properties
81 |
82 | # Editor-based Rest Client
83 | .idea/httpRequests
84 |
85 | # Android studio 3.1+ serialized cache file
86 | .idea/caches/build_file_checksums.ser
87 |
88 | # Android studio 3.1+ additional
89 | .idea/deployment*.xml
90 | .idea/assetWizardSettings.xml
91 | .idea/androidTestResultsUserPreferences.xml
92 |
93 | # Android projects
94 | **/local.properties
95 | /captures
96 | .externalNativeBuild
97 | .cxx
98 |
99 | # Gradle projects
100 | .gradle
101 | build/
102 |
103 | # Mkdocs temporary serving folder
104 | docs-gen
105 | site
106 | *.bak
107 | .idea/appInsightsSettings.xml
108 |
109 | # Mac OS
110 | .DS_Store
--------------------------------------------------------------------------------
/.idea/AndroidProjectSystem.xml:
--------------------------------------------------------------------------------
1 |
2 |