Skip to content

Commit

Permalink
lib updates, version bump (#185)
Browse files Browse the repository at this point in the history
* lib updates, version bump

* submodule

Co-authored-by: DerBot7214 <lengwenath1@gmail.com>
  • Loading branch information
DerBot7214 and DerTyp7214 authored Dec 11, 2022
1 parent fe9d535 commit 1e73212
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 133 deletions.
121 changes: 1 addition & 120 deletions .github/workflows/buildCi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
app/build/outputs/apk/debug/output-metadata.json
- name: Send Telegram message
run: "curl --location --request POST 'https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage' --header 'Content-Type:application/json' --data-raw '{\"chat_id\":\"${{ secrets.TELEGRAM_TO_MAIN }}\",\"message_thread_id\":${{ secrets.TELEGRAM_MAIN_TOPIC_ID_DEBUG }},\"text\":\"**${{ steps.extract_branch.outputs.BRANCH_NAME }}**\\n\\ncommit: `${{ github.event.head_commit.message }}` [${{ github.event.head_commit.id }}](${{ github.event.head_commit.url }})\",\"parse_mode\":\"markdown\",\"reply_markup\":{\"inline_keyboard\":[[{\"text\":\"Download A12+\",\"url\":\"https://github.com/DerTyp7214/RboardThemeManagerV3/releases/download/${{ fromJson(steps.metadataJson.outputs.json).elements[0].versionName }}-debug/app-debug.apk\"}]]}}'"
run: "curl --location --request POST 'https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage' --header 'Content-Type:application/json' --data-raw '{\"chat_id\":\"${{ secrets.TELEGRAM_TO_MAIN }}\",\"message_thread_id\":${{ secrets.TELEGRAM_MAIN_TOPIC_ID_DEBUG }},\"text\":\"#A12\\n**${{ steps.extract_branch.outputs.BRANCH_NAME }}**\\n\\ncommit: `${{ github.event.head_commit.message }}` [${{ github.event.head_commit.id }}](${{ github.event.head_commit.url }})\",\"parse_mode\":\"markdown\",\"reply_markup\":{\"inline_keyboard\":[[{\"text\":\"Download A12+\",\"url\":\"https://github.com/DerTyp7214/RboardThemeManagerV3/releases/download/${{ fromJson(steps.metadataJson.outputs.json).elements[0].versionName }}-debug/app-debug.apk\"}]]}}'"

- name: Send Notification
uses: fjogeleit/http-request-action@master
Expand All @@ -136,122 +136,3 @@ jobs:
method: 'POST'
customHeaders: '{"Authorization":"key=${{ secrets.FCM_KEY }}"}'
data: '{"to": "/topics/update-v3-debug","data": {"version": ${{ fromJson(steps.metadataJson.outputs.json).elements[0].versionCode }},"type": "update","notification": {"body": "Update available. ${{ steps.commitMessage.outputs.message }}","title": "Update"}}}'
buildRCompatible:
name: Build Ci APK from rCompatible
if: startsWith(github.ref, 'refs/heads/rCompatible')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Get Commit Message
id: commitMessage
run: IN="${{ github.event.head_commit.message }}" && echo "::set-output name=message::${IN%%$'\n'*}"

- name: Setup JDK
uses: actions/setup-java@v1
with:
java-version: 17

- name: Cache Gradle dependencies
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
!~/.gradle/caches/build-cache-*
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: ${{ runner.os }}-gradle-

- name: Cache build cache
uses: actions/cache@v2
with:
path: |
${{ github.workspace }}/.ccache
~/.gradle/caches/build-cache-*
key: ${{ runner.os }}-build-cache-${{ github.sha }}
restore-keys: ${{ runner.os }}-build-cache-

- name: Extract branch name
shell: bash
run: echo "::set-output name=BRANCH_NAME::$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//_/g')"
id: extract_branch

- name: File Permissions
run: chmod +x gradlew

- name: Build apk
id: buildAllApks
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
arguments: assembleRelease

- name: Get JSON
id: metadataJson
run: |
content=`cat app/build/outputs/apk/release/output-metadata.json`
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
echo "::set-output name=json::$content"
- name: Sign artifact
id: signArtifact
uses: ilharp/sign-android-release@v1
with:
releaseDir: app/build/outputs/apk/release
keyAlias: ${{ secrets.KEYALIAS }}
signingKey: ${{ secrets.SIGNING_KEY }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
buildToolsVersion: 33.0.0

- name: Rename APK
run: mv app/build/outputs/apk/release/app-release-unsigned-signed.apk app/build/outputs/apk/release/app-release.apk

- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: Debug Artifact
path: app/build/outputs/apk/release/app-release.apk

- name: Create new Release
if: steps.extract_branch.outputs.BRANCH_NAME == 'rCompatible'
id: create_release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: ${{ fromJson(steps.metadataJson.outputs.json).elements[0].versionName }}-rCompatible
prerelease: true
title: Rboard Manager Development ${{ fromJson(steps.metadataJson.outputs.json).elements[0].versionName }}
files: |
app/build/outputs/apk/release/app-release.apk
app/build/outputs/apk/release/output-metadata.json
- name: Create new Release
if: steps.extract_branch.outputs.BRANCH_NAME == 'rCompatible'
id: create_latest_release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: latest-rCompatible
prerelease: true
title: Rboard Manager Development ${{ fromJson(steps.metadataJson.outputs.json).elements[0].versionName }}
files: |
app/build/outputs/apk/release/app-release.apk
app/build/outputs/apk/release/output-metadata.json
- name: Send Telegram message
run: "curl --location --request POST 'https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage' --header 'Content-Type:application/json' --data-raw '{\"chat_id\":\"${{ secrets.TELEGRAM_CHANNEL_ID }}\",\"text\":\"**${{ steps.extract_branch.outputs.BRANCH_NAME }}**\\n\\ncommit: `${{ github.event.head_commit.message }}` [${{ github.event.head_commit.id }}](${{ github.event.head_commit.url }})\",\"parse_mode\":\"markdown\",\"reply_markup\":{\"inline_keyboard\":[[{\"text\":\"Download A6+\",\"url\":\"https://github.com/DerTyp7214/RboardThemeManagerV3/releases/download/latest-rCompatible/app-release.apk\"}]]}}'"

- name: Send Notification
if: steps.extract_branch.outputs.BRANCH_NAME == 'rCompatible'
uses: fjogeleit/http-request-action@master
with:
url: 'https://fcm.googleapis.com/fcm/send'
method: 'POST'
customHeaders: '{"Authorization":"key=${{ secrets.FCM_KEY }}"}'
data: '{"to": "/topics/update-v3-r-release","data": {"version": ${{ fromJson(steps.metadataJson.outputs.json).elements[0].versionCode }},"type": "update","notification": {"body": "Update available. ${{ steps.commitMessage.outputs.message }}","title": "Update"}}}'
4 changes: 2 additions & 2 deletions .github/workflows/buildRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ jobs:
data: '{"to": "/topics/update-v3-release","data": {"version": ${{ fromJson(steps.metadataJson.outputs.json).elements[0].versionCode }},"type": "update","notification": {"body": "Update available. ${{ steps.commitMessage.outputs.message }}","title": "Update"}}}'

- name: Send Telegram message
run: "curl --location --request POST 'https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage' --header 'Content-Type:application/json' --data-raw '{\"chat_id\":\"${{ secrets.TELEGRAM_TO_MAIN }}\",\"message_thread_id\":${{ secrets.TELEGRAM_MAIN_TOPIC_ID }},\"text\":\"commit: `${{ github.event.head_commit.message }}` [${{ github.event.head_commit.id }}](${{ github.event.head_commit.url }})\",\"parse_mode\":\"markdown\",\"reply_markup\":{\"inline_keyboard\":[[{\"text\":\"Latest Android 12 Only\",\"url\":\"https://github.com/DerTyp7214/RboardThemeManagerV3/releases/download/${{ fromJson(steps.metadataJson.outputs.json).elements[0].versionName }}/app-release.apk\"}]}}'"
run: "curl --location --request POST 'https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage' --header 'Content-Type:application/json' --data-raw '{\"chat_id\":\"${{ secrets.TELEGRAM_TO_MAIN }}\",\"message_thread_id\":${{ secrets.TELEGRAM_MAIN_TOPIC_ID }},\"text\":\"#A12\\n**staging**\\n\\ncommit: `${{ github.event.head_commit.message }}` [${{ github.event.head_commit.id }}](${{ github.event.head_commit.url }})\",\"parse_mode\":\"markdown\",\"reply_markup\":{\"inline_keyboard\":[[{\"text\":\"Latest Android 12 Only\",\"url\":\"https://github.com/DerTyp7214/RboardThemeManagerV3/releases/download/${{ fromJson(steps.metadataJson.outputs.json).elements[0].versionName }}/app-release.apk\"}]]}}'"

- name: Send Telegram message
run: "curl --location --request POST 'https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage' --header 'Content-Type:application/json' --data-raw '{\"chat_id\":\"${{ secrets.TELEGRAM_TO_MAIN }}\",\"message_thread_id\":${{ secrets.TELEGRAM_MAIN_TOPIC_ID_DEBUG }},\"text\":\"**staging**\\n\\ncommit: `${{ github.event.head_commit.message }}` [${{ github.event.head_commit.id }}](${{ github.event.head_commit.url }})\",\"parse_mode\":\"markdown\",\"reply_markup\":{\"inline_keyboard\":[[{\"text\":\"Download A12+\",\"url\":\"https://github.com/DerTyp7214/RboardThemeManagerV3/releases/download/${{ fromJson(steps.metadataJson.outputs.json).elements[0].versionName }}/app-release.apk\"}]]}}'"
run: "curl --location --request POST 'https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage' --header 'Content-Type:application/json' --data-raw '{\"chat_id\":\"${{ secrets.TELEGRAM_TO_MAIN }}\",\"message_thread_id\":${{ secrets.TELEGRAM_MAIN_TOPIC_ID_DEBUG }},\"text\":\"#A12\\n**staging**\\n\\ncommit: `${{ github.event.head_commit.message }}` [${{ github.event.head_commit.id }}](${{ github.event.head_commit.url }})\",\"parse_mode\":\"markdown\",\"reply_markup\":{\"inline_keyboard\":[[{\"text\":\"Download A12+\",\"url\":\"https://github.com/DerTyp7214/RboardThemeManagerV3/releases/download/${{ fromJson(steps.metadataJson.outputs.json).elements[0].versionName }}/app-release.apk\"}]]}}'"

- name: Upload Assets
id: upload_assets
Expand Down
20 changes: 10 additions & 10 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ android {
applicationId = "de.dertyp7214.rboardthememanager"
minSdk = 31
targetSdk = 33
versionCode = 372000
versionName = "3.7.2"
versionCode = 373000
versionName = "3.7.3"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

Expand Down Expand Up @@ -73,13 +73,13 @@ dependencies {
implementation(project(":colorutilsc"))
implementation(project(":rboardcomponents"))

implementation(platform("com.google.firebase:firebase-bom:31.1.0"))
implementation("com.google.firebase:firebase-messaging-ktx:23.1.0")
implementation(platform("com.google.firebase:firebase-bom:31.1.1"))
implementation("com.google.firebase:firebase-messaging-ktx:23.1.1")
implementation("com.google.firebase:firebase-analytics-ktx:21.2.0")

implementation("com.github.DerTyp7214:PreferencesPlus:1.0")

implementation("com.google.protobuf:protobuf-kotlin:3.21.10")
implementation("com.google.protobuf:protobuf-kotlin:3.21.11")

implementation("androidx.legacy:legacy-support-v4:1.0.0")
implementation("androidx.navigation:navigation-fragment-ktx:2.5.3")
Expand All @@ -96,14 +96,14 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21")
implementation("androidx.core:core:1.9.0")

implementation("com.google.android.material:material:1.8.0-alpha03")
implementation("androidx.constraintlayout:constraintlayout:2.2.0-alpha04")
implementation("com.google.android.material:material:1.8.0-beta01")
implementation("androidx.constraintlayout:constraintlayout:2.2.0-alpha05")
implementation("androidx.preference:preference-ktx:1.2.0")
implementation("androidx.activity:activity-ktx:1.7.0-alpha02")
implementation("androidx.fragment:fragment-ktx:1.5.4")
implementation("androidx.fragment:fragment-ktx:1.5.5")
implementation("com.jaredrummler:android-shell:1.0.0")
implementation("com.google.firebase:firebase-analytics:21.2.0")
implementation("com.google.firebase:firebase-messaging:23.1.0")
implementation("com.google.firebase:firebase-messaging:23.1.1")
implementation("com.google.code.gson:gson:2.10")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.0-alpha03")
implementation("com.bignerdranch.android:simple-item-decoration:1.0.0")
Expand All @@ -119,7 +119,7 @@ dependencies {
implementation("com.github.murgupluoglu:flagkit-android:1.0.2")
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar", "*.aar"))))

debugImplementation("androidx.compose.ui:ui-tooling:1.4.0-alpha02")
debugImplementation("androidx.compose.ui:ui-tooling:1.4.0-alpha03")
implementation("org.jetbrains.kotlin:kotlin-reflect:1.7.21")

implementation("com.google.android.play:core:1.10.3")
Expand Down
2 changes: 1 addition & 1 deletion rboardcomponents

0 comments on commit 1e73212

Please sign in to comment.