Skip to content

Commit

Permalink
Prepare Gestalt fork
Browse files Browse the repository at this point in the history
  • Loading branch information
hufman committed Dec 5, 2024
1 parent 7eaa5e5 commit f7a290f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 106 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Breezy Weather Pull Request CI
on:
pull_request:
branches:
- main
- dev
- gestalt
paths-ignore:
- ".editorconfig"
- "docs/*"
Expand Down Expand Up @@ -36,10 +36,10 @@ jobs:
- name: Set up Gradle
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1

- name: Lint + Assemble basic flavor
run: ./gradlew spotlessCheck assembleBasicDebug
- name: Lint + Assemble gestalt flavor
run: ./gradlew spotlessCheck assembleGestaltDebug

- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: BreezyWeather_basicDebug.apk
path: app/build/outputs/apk/basic/debug/app-basic-universal-debug.apk
name: BreezyWeather_gestaltDebug.apk
path: app/build/outputs/apk/gestalt/debug/app-gestalt-universal-debug.apk
104 changes: 16 additions & 88 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Breezy Weather push CI
on:
push:
branches:
- main
- gestalt
tags:
- v*

Expand Down Expand Up @@ -31,97 +31,36 @@ jobs:
- name: Set up gradle
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1

- name: Lint + Assemble freenet flavor
run: ./gradlew spotlessCheck assembleFreenetRelease

- name: Add secrets to local.properties
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'breezy-weather/breezy-weather'
run: |
set -e
echo "breezy.accu.key=$ACCU_WEATHER_KEY" >> local.properties
echo "breezy.aemet.key=$AEMET_KEY" >> local.properties
echo "breezy.atmoaura.key=$ATMO_AURA_KEY" >> local.properties
echo "breezy.baiduip.key=$BAIDU_IP_LOCATION_AK" >> local.properties
echo "breezy.bmkg.key=$BMKG_KEY" >> local.properties
echo "breezy.cwa.key=$CWA_KEY" >> local.properties
echo "breezy.geonames.key=$GEO_NAMES_KEY" >> local.properties
echo "breezy.mf.jwtKey=$MF_WSFT_JWT_KEY" >> local.properties
echo "breezy.mf.key=$MF_WSFT_KEY" >> local.properties
echo "breezy.openweather.key=$OPEN_WEATHER_KEY" >> local.properties
env:
ACCU_WEATHER_KEY: ${{ secrets.ACCU_WEATHER_KEY }}
AEMET_KEY: ${{ secrets.AEMET_KEY }}
ATMO_AURA_KEY: ${{ secrets.ATMO_AURA_KEY }}
BAIDU_IP_LOCATION_AK: ${{ secrets.BAIDU_IP_LOCATION_AK }}
BMKG_KEY: ${{ secrets.BMKG_KEY }}
CWA_KEY: ${{ secrets.CWA_KEY }}
GEO_NAMES_KEY: ${{ secrets.GEO_NAMES_KEY }}
MF_WSFT_JWT_KEY: ${{ secrets.MF_WSFT_JWT_KEY }}
MF_WSFT_KEY: ${{ secrets.MF_WSFT_KEY }}
OPEN_WEATHER_KEY: ${{ secrets.OPEN_WEATHER_KEY }}

- name: Assemble basic flavor
run: ./gradlew assembleBasicRelease

- name: Delete local.properties
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'breezy-weather/breezy-weather'
run: |
set -e
rm local.properties
- name: Lint + Assemble gestalt flavor
run: ./gradlew spotlessCheck assembleGestaltRelease

- name: Save version tag in env
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'breezy-weather/breezy-weather'
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'BimmerGestalt/breezy-weather'
run: |
set -x
echo "VERSION_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Sign APK (free networks)
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'breezy-weather/breezy-weather'
uses: r0adkll/sign-android-release@349ebdef58775b1e0d8099458af0816dc79b6407 # v1
with:
releaseDirectory: app/build/outputs/apk/freenet/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}

- name: Sign APK (basic)
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'breezy-weather/breezy-weather'
- name: Sign APK (gestalt)
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'BimmerGestalt/breezy-weather'
uses: r0adkll/sign-android-release@349ebdef58775b1e0d8099458af0816dc79b6407 # v1
with:
releaseDirectory: app/build/outputs/apk/basic/release
releaseDirectory: app/build/outputs/apk/gestalt/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}

- name: Prepare APKs with checksums, archive mapping.txt file
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'breezy-weather/breezy-weather'
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'BimmerGestalt/breezy-weather'
run: |
set -e
mv app/build/outputs/apk/basic/release/app-basic-universal-release-unsigned-signed.apk breezy-weather-${{ env.VERSION_TAG }}_standard.apk
sha256=`sha256sum breezy-weather-${{ env.VERSION_TAG }}_standard.apk | awk '{ print $1 }'`
echo "APK_UNIVERSAL_SHA256=$sha256" >> $GITHUB_ENV
mv app/build/outputs/apk/basic/release/app-basic-arm64-v8a-release-unsigned-signed.apk breezy-weather-arm64-v8a-${{ env.VERSION_TAG }}_standard.apk
sha256=`sha256sum breezy-weather-arm64-v8a-${{ env.VERSION_TAG }}_standard.apk | awk '{ print $1 }'`
echo "APK_ARM64_V8A_SHA256=$sha256" >> $GITHUB_ENV
mv app/build/outputs/apk/basic/release/app-basic-armeabi-v7a-release-unsigned-signed.apk breezy-weather-armeabi-v7a-${{ env.VERSION_TAG }}_standard.apk
sha256=`sha256sum breezy-weather-armeabi-v7a-${{ env.VERSION_TAG }}_standard.apk | awk '{ print $1 }'`
echo "APK_ARMEABI_V7A_SHA256=$sha256" >> $GITHUB_ENV
mv app/build/outputs/apk/basic/release/app-basic-x86-release-unsigned-signed.apk breezy-weather-x86-${{ env.VERSION_TAG }}_standard.apk
sha256=`sha256sum breezy-weather-x86-${{ env.VERSION_TAG }}_standard.apk | awk '{ print $1 }'`
echo "APK_X86_SHA256=$sha256" >> $GITHUB_ENV
mv app/build/outputs/apk/basic/release/app-basic-x86_64-release-unsigned-signed.apk breezy-weather-x86_64-${{ env.VERSION_TAG }}_standard.apk
sha256=`sha256sum breezy-weather-x86_64-${{ env.VERSION_TAG }}_standard.apk | awk '{ print $1 }'`
echo "APK_X86_64_SHA256=$sha256" >> $GITHUB_ENV
mv app/build/outputs/apk/freenet/release/app-freenet-universal-release-unsigned-signed.apk breezy-weather-${{ env.VERSION_TAG }}_freenet.apk
sha256=`sha256sum breezy-weather-${{ env.VERSION_TAG }}_freenet.apk | awk '{ print $1 }'`
echo "APK_UNIVERSAL_FREENET_SHA256=$sha256" >> $GITHUB_ENV
tar -czvf mapping-${{ env.VERSION_TAG }}_standard.tar.gz --directory=app/build/outputs/mapping/basicRelease/ mapping.txt
tar -czvf mapping-${{ env.VERSION_TAG }}_freenet.tar.gz --directory=app/build/outputs/mapping/freenetRelease/ mapping.txt
mv app/build/outputs/apk/gestalt/release/app-gestalt-universal-release-unsigned-signed.apk breezy-weather-${{ env.VERSION_TAG }}_gestalt.apk
sha256=`sha256sum breezy-weather-${{ env.VERSION_TAG }}_gestalt.apk | awk '{ print $1 }'`
echo "APK_GESTALT_SHA256=$sha256" >> $GITHUB_ENV
tar -czvf mapping-${{ env.VERSION_TAG }}_gestalt.tar.gz --directory=app/build/outputs/mapping/gestaltRelease/ mapping.txt
- name: Create release
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'breezy-weather/breezy-weather'
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'BimmerGestalt/breezy-weather'
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0
with:
tag_name: ${{ env.VERSION_TAG }}
Expand All @@ -134,20 +73,9 @@ jobs:
### Checksums
| Flavor | Variant | SHA-256 |
|---------------|-------------|----------------------------------------|
| Standard | Universal | ${{ env.APK_UNIVERSAL_SHA256 }} |
| Standard | arm64-v8a | ${{ env.APK_ARM64_V8A_SHA256 }} |
| Standard | armeabi-v7a | ${{ env.APK_ARMEABI_V7A_SHA256 }} |
| Standard | x86 | ${{ env.APK_X86_SHA256 }} |
| Standard | x86_64 | ${{ env.APK_X86_64_SHA256 }} |
| Free networks | Universal | ${{ env.APK_UNIVERSAL_FREENET_SHA256 }} |
| Gestalt | Universal | ${{ env.APK_GESTALT_SHA256 }} |
files: |
breezy-weather-${{ env.VERSION_TAG }}_standard.apk
breezy-weather-arm64-v8a-${{ env.VERSION_TAG }}_standard.apk
breezy-weather-armeabi-v7a-${{ env.VERSION_TAG }}_standard.apk
breezy-weather-x86-${{ env.VERSION_TAG }}_standard.apk
breezy-weather-x86_64-${{ env.VERSION_TAG }}_standard.apk
mapping-${{ env.VERSION_TAG }}_standard.tar.gz
breezy-weather-${{ env.VERSION_TAG }}_freenet.apk
mapping-${{ env.VERSION_TAG }}_freenet.tar.gz
breezy-weather-${{ env.VERSION_TAG }}_gestalt.apk
mapping-${{ env.VERSION_TAG }}_gestalt.tar.gz
draft: true
prerelease: false
18 changes: 5 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,8 @@
<img alt="Jetpack Compose" src="https://img.shields.io/static/v1?style=for-the-badge&message=Jetpack+Compose&color=4285F4&logo=Jetpack+Compose&logoColor=FFFFFF&label="/>
<img alt="Material You" src="https://custom-icon-badges.demolab.com/badge/material%20you-lightblue?style=for-the-badge&logoColor=333&logo=material-you"/>
<br />
<img src="https://img.shields.io/github/license/breezy-weather/breezy-weather?style=for-the-badge" alt="License LGPL-3.0" />
<img src="https://img.shields.io/github/languages/code-size/breezy-weather/breezy-weather?style=for-the-badge" alt="GitHub code size in bytes" />
<br /><br />
<a href="https://github.com/breezy-weather/breezy-weather/releases/latest">
<img src="https://img.shields.io/github/v/release/breezy-weather/breezy-weather?color=purple&include_prereleases&logo=github&style=for-the-badge" alt="Download from GitHub" />
</a>
<a href="https://apt.izzysoft.de/fdroid/index/apk/org.breezyweather/">
<img src="https://img.shields.io/endpoint?url=https://apt.izzysoft.de/fdroid/api/v1/shield/org.breezyweather?color=purple&include_prereleases&logo=FDROID&style=for-the-badge" alt="Download from IzzyOnDroid repo" />
</a>
<a href="https://f-droid.org/packages/org.breezyweather/">
<img src="https://img.shields.io/f-droid/v/org.breezyweather?color=purple&include_prereleases&logo=FDROID&style=for-the-badge" alt="Download from F-Droid default repo" />
</a>
<img src="https://img.shields.io/github/license/BimmerGestalt/breezy-weather?style=for-the-badge" alt="License LGPL-3.0" />
<img src="https://img.shields.io/github/languages/code-size/BimmerGestalt/breezy-weather?style=for-the-badge" alt="GitHub code size in bytes" />
</div>


Expand All @@ -34,7 +24,9 @@

# Download

<a href="https://github.com/breezy-weather/breezy-weather/releases">
This is a fork adding BMW car app support. Please use the upstream if you don't need this feature:

<a href="https://github.com/BimmerGestalt/breezy-weather/releases">
<img src="https://user-images.githubusercontent.com/69304392/148696068-0cfea65d-b18f-4685-82b5-329a330b1c0d.png"
alt="Get it on GitHub" align="center" height="80" /></a>

Expand Down
8 changes: 8 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ android {
dimension = "default"
versionNameSuffix = "_freenet"
}
create("gestalt") {
dimension = "default"
versionNameSuffix = "_gestalt"
}
}

sourceSets {
Expand All @@ -172,6 +176,10 @@ android {
getByName("freenet") {
java.srcDirs("src/src_freenet")
}
getByName("gestalt") {
java.srcDirs("src/src_freenet")
java.srcDirs("src/src_gestalt")
}
}

packaging {
Expand Down

0 comments on commit f7a290f

Please sign in to comment.