Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
smitdol authored Sep 27, 2023
2 parents dda3d70 + 4639e12 commit 8f7fd23
Show file tree
Hide file tree
Showing 53 changed files with 1,667 additions and 615 deletions.
17 changes: 12 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@ updates:
schedule:
interval: daily
time: '04:00'
ignore:
ignore: # we neeed to ignore these updates while we still support API 16
- dependency-name: "com.squareup.okhttp3:okhttp"
versions: ["3.13.+", "3.14.+", "4.+"]
versions: ">= 3.13"
- dependency-name: "com.squareup.okhttp3:mockwebserver"
versions: ">= 3.13"
- dependency-name: "com.mikepenz:iconics-core"
versions: ["5.+"]
versions: ">= 5"
- dependency-name: "com.mikepenz:iconics-views"
versions: ["5.+"]
open-pull-requests-limit: 10
versions: ">= 5"
- dependency-name: 'com.github.zawadz88.materialpopupmenu:material-popup-menu'
versions: ">= 3.5"
- dependency-name: 'com.squareup.picasso:picasso'
versions: "2.71828"
- dependency-name: 'jp.wasabeef:picasso-transformations'
versions: ">= 2.4"

11 changes: 6 additions & 5 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.3.4
- name: set up JDK 1.8
uses: actions/setup-java@v1
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 1.8
distribution: 'zulu'
java-version: 11
- name: Tests
run: bash ./gradlew test --stacktrace
run: bash ./gradlew build --stacktrace
72 changes: 42 additions & 30 deletions .github/workflows/android-instrumented-tests-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,56 @@ name: RadioDroid Instrumented Tests CI

on:
push:
branches:
- '*'
pull_request:
branches:
- master
# pull_request:
# branches:
# - master

jobs:
integration-test:
runs-on: macOS-10.15
test:
runs-on: macos-latest
strategy:
matrix:
api: [16, 21, 27, 29]
api-level: [16, 27, 33]
steps:
- uses: actions/[email protected]
- name: Set up JDK 1.8
uses: actions/setup-java@v1
- name: checkout
uses: actions/checkout@v3

- name: Restore Android virtual device
uses: actions/cache@v3
id: avd-cache
with:
java-version: 1.8
- uses: malinskiy/action-android/install-sdk@release/0.1.0
- name: Instrumented tests
uses: malinskiy/action-android/emulator-run-cmd@release/0.1.0
timeout-minutes: 35
path: |
~/.android/avd/*
~/.android/adb*
key: RadioDroid-${{ runner.os }}-avd-api${{ matrix.api-level }}

- name: set up JDK 11
uses: actions/setup-java@v3
with:
cmd: ./gradlew connectedFreeDebugAndroidTest
api: ${{ matrix.api }}
tag: default
abi: x86
disableAnimations: true
hardwareProfile: Nexus 6
- name: Save instrumented tests output
uses: actions/upload-artifact@master
if: failure()
java-version: '11'
distribution: 'zulu'

- name: Set up Android virtual device if not cached
uses: reactivecircus/android-emulator-runner@v2
if: steps.avd-cache.outputs.cache-hit != 'true'
with:
name: instrumented-tests-result
path: build/reports/tests/instrumentedTests
- name: Save logcat output
uses: actions/upload-artifact@master
if: failure()
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.api-level < 21 && 'x86' || 'x86_64' }}
target: ${{ matrix.api-level >= 30 && 'google_apis' || 'default' }}
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."

- name: Run instrumented tests on Android virtual device
uses: reactivecircus/android-emulator-runner@v2
with:
name: logcat
path: artifacts/logcat.log
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.api-level < 21 && 'x86' || 'x86_64' }}
target: ${{ matrix.api-level >= 30 && 'google_apis' || 'default' }}
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: /Users/runner/Library/Android/sdk/platform-tools/adb uninstall net.programmierecke.radiodroid2.test; ./gradlew ${{ matrix.api-level < 26 && 'connectedFreeDebugAndroidTest' || matrix.api-level > 29 && 'installPlayDebugAndroidTest' || 'connectedCheck' }}
65 changes: 0 additions & 65 deletions .github/workflows/re-run-pull-request-github-actions.yml

This file was deleted.

115 changes: 64 additions & 51 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

def getAvailableLocales() {
def tree = fileTree(dir: 'src/main/res', include: '**/strings.xml')
Expand All @@ -26,22 +25,28 @@ android {

flavorDimensions "one"

compileSdkVersion 29
buildToolsVersion '29.0.3'
compileSdkVersion 33

lintOptions {
abortOnError true
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of("11"))
}
}

buildFeatures {
viewBinding true
}

defaultConfig {
applicationId "net.programmierecke.radiodroid2"
minSdkVersion 16
targetSdkVersion 29
targetSdkVersion 33

versionCode 94
versionName "0.84"
Expand Down Expand Up @@ -75,6 +80,8 @@ android {
buildConfigField "java.util.concurrent.atomic.AtomicBoolean", "IS_TESTING", "new java.util.concurrent.atomic.AtomicBoolean(false)"

multiDexKeepProguard file('multidex-config.pro')

vectorDrawables.useSupportLibrary = true
}

testOptions {
Expand Down Expand Up @@ -109,6 +116,10 @@ android {
dimension "one"
}
}
lint {
abortOnError true
}
namespace 'net.programmierecke.radiodroid2'

testOptions {
unitTests.all {
Expand All @@ -120,29 +131,31 @@ android {
}

ext {
exoplayerVersion = '2.11.7'
exoplayerVersion = '2.18.2'
iconicsVersion = '4.0.2'
}

dependencies {
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.google.android.material:material:1.3.0-alpha04'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.mediarouter:mediarouter:1.2.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.8.0-beta01'
implementation 'androidx.preference:preference:1.2.0'
implementation 'androidx.mediarouter:mediarouter:1.3.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.tvprovider:tvprovider:1.0.0'

// Keep OkHttp 3.12.X to support Android 4.X, see https://developer.squareup.com/blog/okhttp-3-13-requires-android-5
//noinspection GradleDependency
implementation 'com.squareup.okhttp3:okhttp:3.12.12'
implementation 'com.squareup.okhttp3:okhttp:3.12.13'

implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.google.code.gson:gson:2.9.1'
//noinspection GradleDependency 2.8 is newer than 2.71828'
implementation 'com.squareup.picasso:picasso:2.8'
//noinspection GradleDependency
implementation 'jp.wasabeef:picasso-transformations:2.3.1'
implementation "com.google.android.exoplayer:exoplayer-core:$exoplayerVersion"
implementation "com.google.android.exoplayer:exoplayer-hls:$exoplayerVersion"
Expand All @@ -152,43 +165,43 @@ dependencies {
implementation 'com.mikepenz:community-material-typeface:3.7.95.4-kotlin@aar'
implementation 'com.github.rustamg:file-dialogs:1.0'
implementation 'info.debatty:java-string-similarity:2.0.0'
implementation 'me.xdrop:fuzzywuzzy:1.2.0'
implementation 'me.xdrop:fuzzywuzzy:1.4.0'
//noinspection GradleDependency
implementation 'com.github.zawadz88.materialpopupmenu:material-popup-menu:3.4.0'
implementation 'com.github.ByteHamster:SearchPreference:v2.0.0'
implementation 'com.github.ByteHamster:SearchPreference:v2.3.0'

implementation 'androidx.room:room-runtime:2.2.5'
annotationProcessor 'androidx.room:room-compiler:2.2.5'
implementation 'androidx.room:room-runtime:2.4.3'
androidTestImplementation("androidx.test.espresso:espresso-contrib:3.4.0") {
exclude group: 'org.checkerframework', module: 'checker'
}
annotationProcessor 'androidx.room:room-compiler:2.4.3'

implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation "androidx.lifecycle:lifecycle-common-java8:2.2.0"

implementation 'androidx.paging:paging-runtime:2.1.2'

playImplementation 'com.google.android.gms:play-services-cast:19.0.0'
playImplementation 'com.google.android.gms:play-services-cast-framework:19.0.0'
playImplementation 'com.google.android.gms:play-services-safetynet:17.0.0'

testImplementation 'junit:junit:4.13.1'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.7.0'

androidTestImplementation 'androidx.test:core:1.3.1-alpha02'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.3.0'
// Keep this versions 1.3.0 until bumping it won't break building of AndroidTest
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test:rules:1.3.0'
implementation "androidx.lifecycle:lifecycle-common-java8:2.5.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"

implementation 'androidx.paging:paging-runtime:3.1.1'

playImplementation 'com.google.android.gms:play-services-cast:21.2.0'
playImplementation 'com.google.android.gms:play-services-cast-framework:21.2.0'
playImplementation 'com.google.android.gms:play-services-safetynet:18.0.1'

testImplementation 'junit:junit:4.13.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.1'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.9.1'

androidTestImplementation 'androidx.test:core:1.5.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test:rules:1.4.0'
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'

//noinspection GradleDependency
androidTestImplementation("com.squareup.okhttp3:mockwebserver:3.12.6")
androidTestImplementation("com.github.YarikSOffice:lingver:1.2.1") {
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk7'
}

androidTestUtil 'androidx.test:orchestrator:1.3.0'
androidTestImplementation("com.squareup.okhttp3:mockwebserver:3.12.13")
androidTestImplementation("com.github.YarikSOffice:lingver:1.3.0")
androidTestUtil 'androidx.test:orchestrator:1.4.1'
}


Expand All @@ -204,7 +217,7 @@ android.applicationVariants.all { variant ->
variant.outputs.all { output ->

// get app_name field from defaultConfig
def appName = variant.mergedFlavor.resValues.get('app_name_untranslated').getValue()
def appName = variant.mergedFlavor.resValues.get('string/app_name_untranslated').getValue()
appName = "${appName}"

// concat new App name with each flavor's name
Expand Down
3 changes: 1 addition & 2 deletions app/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:tools="http://schemas.android.com/tools"
package="${applicationId}.test">
<manifest xmlns:tools="http://schemas.android.com/tools">

<uses-sdk tools:overrideLibrary="android_libs.ub_uiautomator" />
</manifest>
Loading

0 comments on commit 8f7fd23

Please sign in to comment.