diff --git a/Armadillo/build.gradle b/Armadillo/build.gradle index eea16dc..feb4971 100644 --- a/Armadillo/build.gradle +++ b/Armadillo/build.gradle @@ -17,6 +17,12 @@ plugins { id 'org.jetbrains.kotlin.plugin.serialization' version "${kotlin_version}" } +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(17)) + } +} + android { compileSdk 34 @@ -28,8 +34,6 @@ android { defaultConfig { minSdkVersion 21 targetSdkVersion 34 - versionCode 1 - versionName project.LIBRARY_VERSION testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" consumerProguardFiles 'proguard-rules.pro' buildConfigField("String", "VERSION_NAME", "\"${project.LIBRARY_VERSION}\"") @@ -47,6 +51,7 @@ android { buildFeatures { buildConfig true } + namespace 'com.scribd.armadillo' } dependencies { @@ -68,8 +73,8 @@ dependencies { testImplementation "org.robolectric:robolectric:4.5.1" testImplementation 'junit:junit:4.13.2' testImplementation("org.assertj:assertj-core:3.10.0") - testImplementation "org.mockito:mockito-core:2.28.2" - testImplementation("org.mockito.kotlin:mockito-kotlin:3.2.0") { + testImplementation "org.mockito:mockito-core:5.6.0" + testImplementation("org.mockito.kotlin:mockito-kotlin:4.1.0") { exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib' exclude group: 'org.jetbrains.kotlin', module: 'kotlin-reflect' } diff --git a/Armadillo/src/main/AndroidManifest.xml b/Armadillo/src/main/AndroidManifest.xml index 2c01010..7beb28c 100644 --- a/Armadillo/src/main/AndroidManifest.xml +++ b/Armadillo/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools"> diff --git a/Armadillo/src/test/java/com/scribd/armadillo/ExoplayerPlaybackEngineTest.kt b/Armadillo/src/test/java/com/scribd/armadillo/ExoplayerPlaybackEngineTest.kt index b5e56d5..6e3d8d9 100644 --- a/Armadillo/src/test/java/com/scribd/armadillo/ExoplayerPlaybackEngineTest.kt +++ b/Armadillo/src/test/java/com/scribd/armadillo/ExoplayerPlaybackEngineTest.kt @@ -13,11 +13,11 @@ import org.assertj.core.api.Assertions.assertThat import org.junit.Before import org.junit.Rule import org.junit.Test +import org.mockito.Mockito.times import org.mockito.kotlin.any import org.mockito.kotlin.mock import org.mockito.kotlin.never import org.mockito.kotlin.verify -import org.mockito.kotlin.verifyZeroInteractions import org.mockito.kotlin.whenever class ExoplayerPlaybackEngineTest { @@ -197,7 +197,7 @@ class ExoplayerPlaybackEngineTest { playbackEngine.updateProgress() - verifyZeroInteractions(stateModifier) + verify(stateModifier, times(0)).dispatch(any()) } @Test @@ -208,7 +208,7 @@ class ExoplayerPlaybackEngineTest { playbackEngine.updateProgress() - verifyZeroInteractions(stateModifier) + verify(stateModifier, times(0)).dispatch(any()) } @Test @@ -219,7 +219,7 @@ class ExoplayerPlaybackEngineTest { playbackEngine.updateProgress() - verifyZeroInteractions(stateModifier) + verify(stateModifier, times(0)).dispatch(any()) } @Test diff --git a/Armadillo/src/test/java/com/scribd/armadillo/playback/MediaSessionCallbackTest.kt b/Armadillo/src/test/java/com/scribd/armadillo/playback/MediaSessionCallbackTest.kt index f85ab01..3eaf452 100644 --- a/Armadillo/src/test/java/com/scribd/armadillo/playback/MediaSessionCallbackTest.kt +++ b/Armadillo/src/test/java/com/scribd/armadillo/playback/MediaSessionCallbackTest.kt @@ -23,10 +23,10 @@ import org.junit.Before import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith +import org.mockito.Mockito import org.mockito.kotlin.mock import org.mockito.kotlin.times import org.mockito.kotlin.verify -import org.mockito.kotlin.verifyZeroInteractions import org.mockito.kotlin.whenever import org.robolectric.RobolectricTestRunner import org.robolectric.Shadows @@ -128,7 +128,7 @@ class MediaSessionCallbackTest { mediaSessionCallback.isPlaying = true whenever(playbackInfo.audioPlayable).thenReturn(audiobookOne) mediaSessionCallback.onPlayFromUri(URL.toUri(), bundleOne) - verifyZeroInteractions(mediaSessionCallback.playbackEngine!!) + verify(mediaSessionCallback, Mockito.times(0)).playbackEngine!! } @Test diff --git a/TestApp/build.gradle b/TestApp/build.gradle index 940fea2..49598e6 100644 --- a/TestApp/build.gradle +++ b/TestApp/build.gradle @@ -6,8 +6,14 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(17)) + } +} + android { - compileSdkVersion 32 + compileSdk 34 compileOptions { targetCompatibility JavaVersion.VERSION_1_8 @@ -16,7 +22,7 @@ android { defaultConfig { applicationId "com.scribd.armadillotestapp" minSdkVersion 21 - targetSdkVersion 32 + targetSdkVersion 34 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -49,6 +55,7 @@ android { dimension "ARMADILLO_SOURCE" } } + namespace 'com.scribd.armadillotestapp' } dependencies { diff --git a/TestApp/src/main/AndroidManifest.xml b/TestApp/src/main/AndroidManifest.xml index fd0f356..68d3893 100644 --- a/TestApp/src/main/AndroidManifest.xml +++ b/TestApp/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools"> diff --git a/gradle.properties b/gradle.properties index c26840d..8f0efb4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,8 +20,8 @@ DAGGER_VERSION=2.16 MAVEN_PUBLISH_VERSION=3.6.2 DOKKA_VERSION=1.6.10 SERIALIZATON_VERSION=1.4.1 -# Update package-list when updating build tools version -BUILD_TOOLS_VERSION=29.0.3 +BUILD_TOOLS_VERSION=34.0.0 android.useAndroidX=true android.enableJetifier=true -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true +android.suppressUnsupportedCompileSdk=34 \ No newline at end of file