Skip to content

Commit

Permalink
Build Gestalt variant
Browse files Browse the repository at this point in the history
  • Loading branch information
hufman committed Jan 27, 2024
1 parent 3ece093 commit 2763eec
Show file tree
Hide file tree
Showing 7 changed files with 129 additions and 11 deletions.
7 changes: 7 additions & 0 deletions .github/actions/download-externals-action/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: "Download Build Dependencies"
description: "Downloads external dependencies to build AndroidAutoIdrive"
runs:
using: "composite"
steps:
- run: ${{ github.action_path }}/download.sh
shell: bash
7 changes: 7 additions & 0 deletions .github/actions/download-externals-action/download.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -x

[ -e 'external/BMW_Connected_Classic_v1.8_(usa_160214_1142)_apkpure.com.apk' ] ||
wget --quiet -P external 'https://bimmergestalt.s3.amazonaws.com/aaidrive/external/BMW_Connected_Classic_v1.8_(usa_160214_1142)_apkpure.com.apk'
[ -e 'external/MINI_Connected_Classic_v1.1.3_(usa_160214_448)_apkpure.com.apk' ] ||
wget --quiet -P external 'https://bimmergestalt.s3.amazonaws.com/aaidrive/external/MINI_Connected_Classic_v1.1.3_(usa_160214_448)_apkpure.com.apk'
76 changes: 73 additions & 3 deletions .github/workflows/build_commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@ name: "Build Commit"
on: push

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.3.0
- uses: actions/setup-java@v3.10.0
with:
distribution: temurin
java-version: 17

- name: Prepare cached external dependencies
uses: actions/cache@v3
with:
key: readyougestalt_external_${{ hashFiles('.github/actions/download-externals-action/download.sh') }}
path: |
external
- name: Download build dependencies
uses: ./.github/actions/download-externals-action

- uses: gradle/gradle-build-action@v2.4.2
- run: gradle testGestaltReleaseUnitTest

build:
runs-on: ubuntu-latest
steps:
Expand All @@ -11,10 +32,59 @@ jobs:
distribution: temurin
java-version: 17

- name: Prepare cached external dependencies
uses: actions/cache@v3
with:
key: readyougestalt_external_${{ hashFiles('.github/actions/download-externals-action/download.sh') }}
path: |
external
- name: Download build dependencies
uses: ./.github/actions/download-externals-action

- uses: gradle/gradle-build-action@v2.4.2
- run: gradle assembleRelease
- run: gradle assembleGestaltRelease

- uses: actions/upload-artifact@v3.1.1
with:
name: ReadYou-GitHub-Build-${{ github.sha }}
path: app/build/outputs/apk/github/release/*.apk
name: gestalt-${{ github.sha }}
path: app/build/outputs/apk/gestalt/release/*.apk

release:
if: github.ref == 'refs/heads/gestalt'
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout the project
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Delete previous release
uses: dev-drprasad/delete-older-releases@v0.2.1
with:
keep_latest: 0
delete_tag_pattern: latest_build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update the latest_build tag
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git tag -f -m "Latest Build" latest_build
git push -f origin latest_build
- name: Download project artifacts
uses: actions/download-artifact@v3
with:
name: gestalt-${{ github.sha }}
- name: Stage upload directory
run: |
mkdir dist
cp *apk dist/
- name: Upload to Github releases
uses: svenstaro/upload-release-action@v2
with:
tag: latest_build
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
file: dist/*
overwrite: true
38 changes: 32 additions & 6 deletions .github/workflows/build_pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@ name: "Build Pull Request"
on: pull_request

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.3.0
- uses: actions/setup-java@v3.10.0
with:
distribution: temurin
java-version: 17

- name: Prepare cached external dependencies
uses: actions/cache@v3
with:
key: readyougestalt_external_${{ hashFiles('.github/actions/download-externals-action/download.sh') }}
path: |
external
- name: Download build dependencies
uses: ./.github/actions/download-externals-action

- uses: gradle/gradle-build-action@v2.4.2
- run: gradle testGestaltReleaseUnitTest

build:
runs-on: ubuntu-latest
steps:
Expand All @@ -11,14 +32,19 @@ jobs:
distribution: temurin
java-version: 17

- name: Prepare cached external dependencies
uses: actions/cache@v3
with:
key: readyougestalt_external_${{ hashFiles('.github/actions/download-externals-action/download.sh') }}
path: |
external
- name: Download build dependencies
uses: ./.github/actions/download-externals-action

- uses: gradle/gradle-build-action@v2.4.2
- run: gradle assembleRelease

- uses: actions/upload-artifact@v3.1.1
with:
name: github-${{ github.sha }}
path: app/build/outputs/apk/github/release/*.apk
- uses: actions/upload-artifact@v3
with:
name: fdroid-${{ github.sha }}
path: app/build/outputs/apk/fdroid/release/*.apk
name: gestalt-${{ github.sha }}
path: app/build/outputs/apk/gestalt/release/*.apk
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<div align="center">
<h1>Read You</h1>
<p>An Android RSS reader presented in <a target="_blank" href="https://m3.material.io/">Material You</a> style.</p>
<p>An Android RSS reader presented in <a target="_blank" href="https://m3.material.io/">Material You</a> style, with BMW/Mini app support.</p>
<p>English&nbsp;&nbsp;|&nbsp;&nbsp;
<a target="_blank" href="https://github.com/Ashinch/ReadYou/blob/main/README-de.md">Deutsch</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a target="_blank" href="https://github.com/Ashinch/ReadYou/blob/main/README-zh-CN.md">简体中文</a>&nbsp;&nbsp;|&nbsp;&nbsp;
Expand Down Expand Up @@ -73,6 +73,8 @@ The following are the progress made so far and the goals to be worked on in the
- [ ] Feedbin
- [ ] ...

If an [AAIdrive](https://github.com/BimmerGestalt/AAIdrive)-compatible car is connected, then ReadYou will be added as a News icon to the ConnectedDrive interface in the car.

## Download

[<img src="https://s1.ax1x.com/2023/01/12/pSu1a36.png" alt="Get it on GitHub" height="80">](https://github.com/Ashinch/ReadYou/releases)
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ android {
}
applicationVariants.all { variant ->
variant.outputs.each { output ->
output.outputFileName = "ReadYou-${defaultConfig.versionName}-${gitCommitHash}.apk"
output.outputFileName = "ReadYou-${variant.flavorName}-${defaultConfig.versionName}-${gitCommitHash}.apk"
}
}
kotlinOptions {
Expand Down
6 changes: 6 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,9 @@

# Provider API
-keep class me.ash.reader.infrastructure.** { *; }

# Apache Etch and Gestalt
-keep class io.bimmergestalt.idriveconnectkit.rhmi.* { *; }
-keep class io.bimmergestalt.idriveconnectkit.android.security.* { *; }
-keep public class * extends org.apache.etch.bindings.java.transport.FormatFactory
-keep class io.bimmergestalt.reader.carapp.* { *; }

0 comments on commit 2763eec

Please sign in to comment.