Skip to content

Commit

Permalink
updated libraries to fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
LivingWithHippos committed Dec 7, 2023
1 parent e9c6c99 commit 6c8a793
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 24 deletions.
46 changes: 30 additions & 16 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- master
defaults:
run:
# github does not appreciate ~ as home indicator. Prefer the full path.
# github does not appreciate ~ as home indicator. Prefer the full path.
working-directory: /home/runner/work/unchained-android/unchained-android/app
jobs:
lint-release:
Expand All @@ -17,48 +17,62 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Run tests
run: ./gradlew ktfmtCheck
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Retrieve keystore for apk signing
env:
ENCODED_KEYSTORE: ${{ secrets.KEYSTORE }}
ENCODED_KEYSTORE: ${{ secrets.KEYSTORE }}
run: echo "$ENCODED_KEYSTORE" | base64 --decode > /home/runner/work/unchained-android/unchained-android/app/release.pfk
- name: Build the app
env:
KEYSTORE: /home/runner/work/unchained-android/unchained-android/app/release.pfk
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
KEYSTORE: /home/runner/work/unchained-android/unchained-android/app/release.pfk
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: ./gradlew clean assembleRelease --stacktrace
- name: Save apk
uses: actions/upload-artifact@v3
with:
name: apk
path: /home/runner/work/unchained-android/unchained-android/app/app/build/outputs/apk/release/*.apk
name: apk
path: /home/runner/work/unchained-android/unchained-android/app/app/build/outputs/apk/release/*.apk
build-debug:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Retrieve keystore for apk signing
env:
ENCODED_KEYSTORE: ${{ secrets.KEYSTORE }}
ENCODED_KEYSTORE: ${{ secrets.KEYSTORE }}
run: echo "$ENCODED_KEYSTORE" | base64 --decode > /home/runner/work/unchained-android/unchained-android/app/release.pfk
- name: Build the app
env:
KEYSTORE: /home/runner/work/unchained-android/unchained-android/app/release.pfk
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
KEYSTORE: /home/runner/work/unchained-android/unchained-android/app/release.pfk
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: ./gradlew clean assembleDebug --stacktrace
- name: Save apk
uses: actions/upload-artifact@v3
with:
name: apk-debug
path: /home/runner/work/unchained-android/unchained-android/app/app/build/outputs/apk/debug/*.apk

name: apk-debug
path: /home/runner/work/unchained-android/unchained-android/app/app/build/outputs/apk/debug/*.apk
2 changes: 2 additions & 0 deletions app/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ ktfmt {
}

android {
namespace "com.github.livingwithhippos.unchained"

compileSdk 34

Expand Down Expand Up @@ -158,6 +159,7 @@ android {

buildFeatures {
dataBinding true
buildConfig true
}

compileOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class AuthenticationFragment : UnchainedFragment(), ButtonListener {

val link = SpannableString(getString(R.string.this_link))
link.setSpan(UnderlineSpan(), 0, link.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
val colorSecondary = requireContext().getThemeColor(R.attr.colorSecondary)
val colorSecondary = requireContext().getThemeColor(com.google.android.material.R.attr.colorSecondary)
link.setSpan(
ForegroundColorSpan(colorSecondary),
0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,12 @@ fun SwipeRefreshLayout.setRefreshThemeColor(themed: Boolean) {
// get a reference to the current theme
val typedValue = TypedValue()
val theme: Resources.Theme = context.theme
theme.resolveAttribute(R.attr.colorSurface, typedValue, true)
theme.resolveAttribute(com.google.android.material.R.attr.colorSurface, typedValue, true)
// arrow color
val arrowColor = typedValue.data
// this function accept a number of colors, the refresh indicator will rotate between them.
setColorSchemeColors(arrowColor)
theme.resolveAttribute(R.attr.colorPrimary, typedValue, true)
theme.resolveAttribute(com.google.android.material.R.attr.colorPrimary, typedValue, true)
// background color
val backgroundColor = typedValue.data
setProgressBackgroundColorSchemeColor(backgroundColor)
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {

ext {
versions_plugin_version = '0.50.0'
kotlin_version = '1.8.22'
kotlin_version = '1.9.20'
}

repositories {
Expand All @@ -27,7 +27,7 @@ buildscript {

plugins {
id "com.github.ben-manes.versions" version "$versions_plugin_version"
id 'org.jetbrains.kotlin.android' version '1.8.22' apply false
id 'org.jetbrains.kotlin.android' version '1.9.20' apply false
}

allprojects {
Expand Down
2 changes: 1 addition & 1 deletion app/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Jun 05 12:13:53 CEST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
4 changes: 2 additions & 2 deletions app/versions.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
def versions = [:]
versions.aboutlibraries = "10.9.2"
versions.android_gradle_plugin = "7.4.1"
versions.android_gradle_plugin = "8.2.0"
versions.annotations = "1.3.0"
versions.appcompat = "1.6.0"
versions.arch_core = "2.1.0"
Expand All @@ -20,7 +20,7 @@ versions.fragment = "1.6.2"
versions.hilt_navigation = "1.1.0"
versions.jsoup = "1.17.1"
versions.junit = "4.13.2"
versions.kotlin = "1.8.22"
versions.kotlin = "1.9.20"
versions.ktlint = "11.0.0"
versions.lifecycle = "2.6.2"
versions.lottie = "5.2.0"
Expand Down

0 comments on commit 6c8a793

Please sign in to comment.