Skip to content

Commit

Permalink
Update project
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbel committed Nov 17, 2024
1 parent c9d9bde commit 8263a8b
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 72 deletions.
96 changes: 85 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,17 @@ jobs:
- name: assemble android foss debug artifact
run: ./gradlew androidApp:assembleFossDebug

# - name: assemble gms release artifact
# run: ./gradlew androidApp:assembleGmsRelease
- name: assemble android gms release artifact
run: ./gradlew androidApp:assembleGmsRelease

# - name: assemble hms release artifact
# run: ./gradlew androidApp:assembleHmsRelease
- name: assemble android hms release artifact
run: ./gradlew androidApp:assembleHmsRelease

# - name: assemble foss release artifact
# run: ./gradlew androidApp:assembleFossRelease
- name: assemble android foss release artifact
run: ./gradlew androidApp:assembleFossRelease

- name: assemble gms release artifact
run: ./gradlew androidApp:bundleGmsRelease

- name: upload artifacts to outputs
uses: actions/upload-artifact@v4
Expand All @@ -107,6 +110,10 @@ jobs:
androidApp/build/outputs/apk/gms/debug
androidApp/build/outputs/apk/hms/debug
androidApp/build/outputs/apk/foss/debug
androidApp/build/outputs/apk/gms/release
androidApp/build/outputs/apk/hms/release
androidApp/build/outputs/apk/foss/release
androidApp/build/outputs/bundle/gmsRelease
- name: expose version name
id: version_name
Expand All @@ -120,16 +127,15 @@ jobs:
VERSION_CODE=$(./gradlew androidApp:printVersionCode -q)
echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV
- name: list all artifacts
run: |
echo "APKs:"
find androidApp/build/outputs/apk -name '*.apk'
- name: expose android apk paths
run: |
echo "GMS_DEBUG_APK_PATH=$(find androidApp/build/outputs/apk/gms/debug -name '*.apk' -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -d' ' -f2)" >> $GITHUB_ENV
echo "HMS_DEBUG_APK_PATH=$(find androidApp/build/outputs/apk/hms/debug -name '*.apk' -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -d' ' -f2)" >> $GITHUB_ENV
echo "FOSS_DEBUG_APK_PATH=$(find androidApp/build/outputs/apk/foss/debug -name '*.apk' -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -d' ' -f2)" >> $GITHUB_ENV
echo "GMS_RELEASE_APK_PATH=$(find androidApp/build/outputs/apk/gms/release -name '*.apk' -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -d' ' -f2)" >> $GITHUB_ENV
echo "HMS_RELEASE_APK_PATH=$(find androidApp/build/outputs/apk/hms/release -name '*.apk' -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -d' ' -f2)" >> $GITHUB_ENV
echo "FOSS_RELEASE_APK_PATH=$(find androidApp/build/outputs/apk/foss/release -name '*.apk' -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -d' ' -f2)" >> $GITHUB_ENV
echo "GMS_RELEASE_AAB_PATH=$(find androidApp/build/outputs/bundle/gmsRelease -name '*.aab' -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -d' ' -f2)" >> $GITHUB_ENV
- name: send android telegram message gms debug
env:
Expand Down Expand Up @@ -182,6 +188,74 @@ jobs:
-F message_thread_id="${THREAD_ID}" \
-F parse_mode="HTML"
- name: send android telegram message gms release
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
THREAD_ID: ${{ secrets.TELEGRAM_THREAD_ID }}
MESSAGE: |
✅ <b>${{ env.VERSION_NAME }} (${{ env.VERSION_CODE }})</b>
<b>Ветка:</b> ${{ github.ref_name }}
<b>Коммит:</b> <code>${{ env.SHORT_SHA }}</code>
run: |
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendDocument" \
-F chat_id="${CHAT_ID}" \
-F document="@${{ env.GMS_RELEASE_APK_PATH }}" \
-F caption="${{ env.MESSAGE }}" \
-F message_thread_id="${THREAD_ID}" \
-F parse_mode="HTML"
- name: send android telegram message hms release
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
THREAD_ID: ${{ secrets.TELEGRAM_THREAD_ID }}
MESSAGE: |
✅ <b>${{ env.VERSION_NAME }} (${{ env.VERSION_CODE }})</b>
<b>Ветка:</b> ${{ github.ref_name }}
<b>Коммит:</b> <code>${{ env.SHORT_SHA }}</code>
run: |
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendDocument" \
-F chat_id="${CHAT_ID}" \
-F document="@${{ env.HMS_RELEASE_APK_PATH }}" \
-F caption="${{ env.MESSAGE }}" \
-F message_thread_id="${THREAD_ID}" \
-F parse_mode="HTML"
- name: send android telegram message foss release
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
THREAD_ID: ${{ secrets.TELEGRAM_THREAD_ID }}
MESSAGE: |
✅ <b>${{ env.VERSION_NAME }} (${{ env.VERSION_CODE }})</b>
<b>Ветка:</b> ${{ github.ref_name }}
<b>Коммит:</b> <code>${{ env.SHORT_SHA }}</code>
run: |
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendDocument" \
-F chat_id="${CHAT_ID}" \
-F document="@${{ env.FOSS_RELEASE_APK_PATH }}" \
-F caption="${{ env.MESSAGE }}" \
-F message_thread_id="${THREAD_ID}" \
-F parse_mode="HTML"
- name: send android telegram message gms release bundle
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
THREAD_ID: ${{ secrets.TELEGRAM_THREAD_ID }}
MESSAGE: |
✅ <b>${{ env.VERSION_NAME }} (${{ env.VERSION_CODE }})</b>
<b>Ветка:</b> ${{ github.ref_name }}
<b>Коммит:</b> <code>${{ env.SHORT_SHA }}</code>
run: |
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendDocument" \
-F chat_id="${CHAT_ID}" \
-F document="@${{ env.GMS_RELEASE_AAB_PATH }}" \
-F caption="${{ env.MESSAGE }}" \
-F message_thread_id="${THREAD_ID}" \
-F parse_mode="HTML"
build-desktop:
needs: job-common
runs-on: ubuntu-latest
Expand Down
9 changes: 2 additions & 7 deletions androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,10 @@ android {
release {
manifestPlaceholders += mapOf("appName" to "@string/app_name")
isMinifyEnabled = true
isShrinkResources = false
isShrinkResources = true
signingConfig = signingConfigs.getByName("release")
applicationIdSuffix = MoviesBuildType.RELEASE.applicationIdSuffix
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
"okhttp3.pro",
"coroutines.pro"
)
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
debug {
manifestPlaceholders += mapOf("appName" to "@string/app_name_dev")
Expand Down
31 changes: 0 additions & 31 deletions androidApp/coroutines.pro

This file was deleted.

14 changes: 0 additions & 14 deletions androidApp/okhttp3.pro

This file was deleted.

6 changes: 1 addition & 5 deletions androidApp/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,4 @@
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault

-dontwarn org.slf4j.impl.StaticLoggerBinder

-keep class io.ktor.utils.io.jvm.nio.** { *; }
-keep class io.ktor.utils.io.** { *; }

-keep class coil3.network.ktor.internal.UtilsKt { *; }
-dontwarn io.ktor.utils.io.jvm.nio.WritingKt
4 changes: 0 additions & 4 deletions webApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,4 @@ kotlin {
compose.resources {
publicResClass = true
generateResClass = always
}

compose.experimental {
web.application {}
}

0 comments on commit 8263a8b

Please sign in to comment.