File tree Expand file tree Collapse file tree 3 files changed +19
-9
lines changed
src/commonTest/kotlin/com.adamratzman/spotify Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -45,12 +45,13 @@ version = libraryVersion
45
45
46
46
47
47
android {
48
+ namespace = " com.adamratzman.spotify"
48
49
compileSdk = 30
49
50
compileOptions {
50
- sourceCompatibility = JavaVersion .VERSION_1_8
51
- targetCompatibility = JavaVersion .VERSION_1_8
51
+ sourceCompatibility = JavaVersion .VERSION_11
52
+ targetCompatibility = JavaVersion .VERSION_11
52
53
}
53
- packagingOptions {
54
+ packaging {
54
55
resources.excludes.add(" META-INF/*.md" ) // needed to prevent android compilation errors
55
56
}
56
57
defaultConfig {
@@ -82,9 +83,10 @@ val dokkaJar: TaskProvider<Jar> by tasks.registering(Jar::class) {
82
83
83
84
kotlin {
84
85
explicitApiWarning()
86
+ jvmToolchain(17 )
85
87
86
88
androidTarget {
87
- compilations.all { kotlinOptions.jvmTarget = " 1.8 " }
89
+ compilations.all { kotlinOptions.jvmTarget = " 17 " }
88
90
89
91
mavenPublication { setupPom(artifactId) }
90
92
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ org.gradle.jvmargs=-Xmx8000m
6
6
# android target settings
7
7
android.useAndroidX =true
8
8
android.enableJetifier =true
9
- android.disableAutomaticComponentCreation =false
10
9
11
10
# language dependencies
12
11
kotlinVersion =1.9.10
@@ -18,9 +17,9 @@ ktorVersion=2.3.4
18
17
korlibsVersion =3.4.0
19
18
kotlinxCoroutinesVersion =1.7.3
20
19
21
- androidBuildToolsVersion =7.2 .0
22
- androidSpotifyAuthVersion =1.2.5
20
+ androidBuildToolsVersion =8.1 .0
21
+ androidSpotifyAuthVersion =2.1.0
23
22
androidCryptoVersion =1.0.0
24
- androidxCompatVersion =1.5 .1
23
+ androidxCompatVersion =1.6 .1
25
24
26
25
sparkVersion =2.9.4
Original file line number Diff line number Diff line change @@ -44,7 +44,16 @@ suspend inline fun <reified T : Throwable> assertFailsWithSuspend(crossinline bl
44
44
45
45
fun <T > runTestOnDefaultDispatcher (block : suspend CoroutineScope .() -> T ): TestResult = runTest(timeout = 60 .seconds) {
46
46
withContext(Dispatchers .Default ) {
47
- block()
47
+ try {
48
+ block()
49
+ } catch (e: SpotifyException .BadRequestException ) {
50
+ // we shouldn't fail just because we received a 5xx from spotify
51
+ if (e.statusCode !in 500 .. 599 ) {
52
+ throw e;
53
+ }
54
+
55
+ println (" Received 5xx for block." )
56
+ }
48
57
}
49
58
}
50
59
You can’t perform that action at this time.
0 commit comments