Skip to content

Commit

Permalink
actions: bump lifecycle_version to 2.8.0-alpha01 (fixes #1872) (#1841)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dogi <[email protected]>
Co-authored-by: Gideon Okuro <[email protected]>
  • Loading branch information
3 people authored Feb 13, 2024
1 parent 7f9f670 commit 363387f
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 36 deletions.
36 changes: 17 additions & 19 deletions .github/workflows/android-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,16 @@ jobs:
ANDROID_NDK_VERSION: "21.3.6528147"
BUILD_TOOLS_VERSION: "34.0.0"
steps:
- name: run number with offset
id: version
- name: set more env
env:
NUM: ${{ github.run_number }}
run: echo "::set-output name=id::$(($NUM+6050))"
run: |
echo "VERSION="$(($NUM+6050)) >> $GITHUB_ENV
echo "BRANCH="${GITHUB_REF##*/} >> $GITHUB_ENV
- name: checkout repository code
uses: actions/checkout@v4

- name: set more env
run: echo "BRANCHNAME="${GITHUB_REF##*/} >> $GITHUB_ENV

- name: setup JDK 17
uses: actions/setup-java@v4
with:
Expand Down Expand Up @@ -53,11 +51,11 @@ jobs:
ls -alR app/build/outputs
mkdir -p sign
cp app/build/outputs/bundle/release/app-release.aab sign/.
cp app/build/outputs/apk/release/remote-${{ steps.version.outputs.id }}.apk sign/app-release-unsigned.apk
cp app/build/outputs/apk/release/remote-${{ env.VERSION }}.apk sign/app-release-unsigned.apk
ls -al sign
- name: sign release APK and AAB
uses: dogi/sign-android-release@v4.0.1
uses: dogi/sign-android-release@v5
with:
releaseDirectory: sign
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
Expand All @@ -82,7 +80,7 @@ jobs:
packageName: io.treehouses.remote
releaseFiles: output/remote.aab
track: internal
releaseName: "${{ steps.version.outputs.id }}"
releaseName: "${{ env.VERSION }}"
status: completed

# - name: mobile security framework
Expand All @@ -107,29 +105,29 @@ jobs:
- name: rename APK and AAB with version and branch for artifact
if: github.ref != 'refs/heads/master'
run: |
mv output/remote.apk output/remote-${{ steps.version.outputs.id }}-${{ env.BRANCHNAME }}.apk
mv output/remote.apk.sha256 output/remote-${{ steps.version.outputs.id }}-${{ env.BRANCHNAME }}.apk.sha256
mv output/remote.aab output/remote-${{ steps.version.outputs.id }}-${{ env.BRANCHNAME }}.aab
mv output/remote.aab.sha256 output/remote-${{ steps.version.outputs.id }}-${{ env.BRANCHNAME }}.aab.sha256
#mv output/remote-${{ steps.version.outputs.id }}.pdf output/remote-${{ steps.version.outputs.id }}-${{ env.BRANCHNAME }}.pdf
mv output/remote.apk output/remote-${{ env.VERSION }}-${{ env.BRANCH }}.apk
mv output/remote.apk.sha256 output/remote-${{ env.VERSION }}-${{ env.BRANCH }}.apk.sha256
mv output/remote.aab output/remote-${{ env.VERSION }}-${{ env.BRANCH }}.aab
mv output/remote.aab.sha256 output/remote-${{ env.VERSION }}-${{ env.BRANCH }}.aab.sha256
#mv output/remote-${{ env.VERSION }}.pdf output/remote-${{ env.VERSION }}-${{ env.BRANCH }}.pdf
#cp app/build/outputs/mapping/release/mapping.txt output/mapping.txt
ls -alR output
- name: upload APK and AAB as build artifact
if: github.ref != 'refs/heads/master'
uses: actions/upload-artifact@v4
with:
name: remote-${{ steps.version.outputs.id }}-${{ env.BRANCHNAME }}
name: remote-${{ env.VERSION }}-${{ env.BRANCH }}
path: output/*
retention-days: 9

- name: release APK and AAB on GitHub
if: github.ref == 'refs/heads/master'
uses: svenstaro/upload-release-action@v2
uses: dogi/upload-release-action@v2.7.1
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: output/*
tag: v${{ steps.version.outputs.id }}
tag: v${{ env.VERSION }}
overwrite: true
file_glob: true

Expand All @@ -138,5 +136,5 @@ jobs:
run: |
sudo npm install -g @treehouses/cli
export discord_channel="${{ secrets.CHANNEL }}"
echo "https://github.com/treehouses/remote/releases/tag/v${{ steps.version.outputs.id }}"
treehouses feedback "new remote app: https://github.com/treehouses/remote/releases/tag/v${{ steps.version.outputs.id }}"
echo "https://github.com/treehouses/remote/releases/tag/v${{ env.VERSION }}"
treehouses feedback "new remote app: https://github.com/treehouses/remote/releases/tag/v${{ env.VERSION }}"
15 changes: 8 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,22 @@ android {
compileSdkVersion 34
defaultConfig {
applicationId "io.treehouses.remote"
minSdkVersion 15
minSdkVersion 19
targetSdkVersion 34
ndkVersion '21.3.6528147'
multiDexEnabled true
versionCode appVersionCode
versionName appVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
applicationVariants.all { variant ->
applicationVariants.configureEach { variant ->
variant.outputs.all { output ->
outputFileName = new File("remote-" + android.defaultConfig.versionCode + ".apk")
}
}
}
buildFeatures {
viewBinding = true
buildConfig true
}
buildTypes {
release {
Expand Down Expand Up @@ -55,7 +56,7 @@ android.defaultConfig.vectorDrawables.useSupportLibrary = true
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
androidTestImplementation('androidx.test.espresso:espresso-core:3.5.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'androidx.appcompat:appcompat:1.2.0'
Expand All @@ -82,22 +83,22 @@ dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation "androidx.preference:preference:1.1.1"
testImplementation 'junit:junit:4.13'
implementation 'com.github.parse-community:ParseLiveQuery-Android:1.1.0'
implementation 'com.github.parse-community:ParseLiveQuery-Android:1.2.2'
implementation 'com.github.parse-community.Parse-SDK-Android:parse:1.26.0'
implementation 'com.google.code.gson:gson:2.8.6'
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test:runner:1.5.2'
implementation 'me.aflak.libraries:bluetooth:1.3.4'
implementation 'com.caverock:androidsvg-aar:1.4'
implementation "androidx.core:core-ktx:1.3.1"
implementation 'com.android.support:multidex:1.0.3'
implementation 'me.toptas.fancyshowcase:fancyshowcaseview:1.1.5'
implementation 'me.toptas.fancyshowcase:fancyshowcaseview:1.3.3'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.0-alpha07'


implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'org.connectbot:sshlib:2.2.9'

def lifecycle_version = "2.3.0-alpha07"
def lifecycle_version = "2.8.0-alpha01"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package io.treehouses.remote.ui.services

import android.app.Application
import android.util.Log
import androidx.lifecycle.LiveData
import androidx.lifecycle.MediatorLiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import androidx.lifecycle.map
import androidx.preference.PreferenceManager
import com.google.gson.Gson
import com.google.gson.JsonParseException
Expand All @@ -16,8 +15,14 @@ import io.treehouses.remote.pojo.ServicesData
import io.treehouses.remote.pojo.enum.Resource
import io.treehouses.remote.pojo.enum.Status.LOADING
import io.treehouses.remote.pojo.enum.Status.SUCCESS
import io.treehouses.remote.utils.*
import io.treehouses.remote.utils.RESULTS
import io.treehouses.remote.utils.Utils.convertToObject
import io.treehouses.remote.utils.constructServiceListFromData
import io.treehouses.remote.utils.containsServiceAction
import io.treehouses.remote.utils.formatServices
import io.treehouses.remote.utils.isURL
import io.treehouses.remote.utils.logE
import io.treehouses.remote.utils.match

class ServicesViewModel(application: Application) : FragmentViewModel(application) {

Expand Down Expand Up @@ -55,7 +60,7 @@ class ServicesViewModel(application: Application) : FragmentViewModel(applicatio
/**
* Format for fast retrieval of a services info; Publicly observable
*/
val servicesData : LiveData<Resource<HashMap<String, ServiceInfo>>> = Transformations.map(rawServicesData) {
val servicesData : LiveData<Resource<HashMap<String, ServiceInfo>>> = rawServicesData.map {
return@map when (it.status) {
SUCCESS -> {
val services = constructServiceListFromData(it.data)
Expand Down Expand Up @@ -112,7 +117,7 @@ class ServicesViewModel(application: Application) : FragmentViewModel(applicatio
val rawData = data?.convertToObject(ServicesData::class.java)
if (rawData?.available != null) {
logE("SUCCESSFUL R CACHE GOT:$rawData")
cacheServiceData.value = rawData!!
cacheServiceData.value = rawData
}
}

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.1'
classpath 'com.android.tools.build:gradle:8.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -29,6 +29,6 @@ allprojects {
}
}

task clean(type: Delete) {
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ org.gradle.parallel=true

android.useAndroidX=true
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 363387f

Please sign in to comment.