Skip to content

Commit 4d8bf86

Browse files
committed
prep for android
1 parent 41b63c4 commit 4d8bf86

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

build.gradle.kts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ plugins {
77
signing
88
`java-library`
99
id("io.codearte.nexus-staging") version "0.21.2"
10-
kotlin("multiplatform") version "1.3.61"
11-
kotlin("plugin.serialization") version "1.3.61"
10+
kotlin("multiplatform") version "1.3.71"
11+
kotlin("plugin.serialization") version "1.3.71"
1212
id("com.diffplug.gradle.spotless") version "3.26.1"
1313
id("com.moowork.node") version "1.3.1"
1414
id("org.jetbrains.dokka") version "0.10.0"
@@ -44,6 +44,7 @@ kotlin {
4444
val serializationVersion = "0.14.0"
4545
val spekVersion = "2.0.9"
4646
val ktorVersion = "1.3.0-rc2"
47+
val kotlinVersion = "1.3.71"
4748

4849
val commonMain by getting {
4950
dependencies {
@@ -72,6 +73,7 @@ kotlin {
7273
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:$serializationVersion")
7374
implementation("io.ktor:ktor-client-okhttp:$ktorVersion")
7475
implementation(kotlin("stdlib-jdk8"))
76+
7577
}
7678
}
7779

@@ -102,6 +104,15 @@ kotlin {
102104
}
103105
}
104106

107+
108+
/* val androidMain by getting {
109+
dependsOn(commonJvmMain)
110+
}
111+
112+
val androidTest by getting {
113+
dependsOn(commonJvmTest)
114+
}*/
115+
105116
all {
106117
languageSettings.useExperimentalAnnotation("kotlin.Experimental")
107118
}

settings.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ pluginManagement {
1010
if (requested.id.id == "kotlinx-serialization") {
1111
useModule("org.jetbrains.kotlin:kotlin-serialization:$mainKotlinVersion")
1212
}
13+
if (requested.id.id == "com.android.library") {
14+
useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}")
15+
}
1316
}
1417
}
1518

1619
repositories {
1720
mavenCentral()
1821
jcenter()
22+
google()
1923
maven { url 'https://plugins.gradle.org/m2/' }
2024
}
2125
}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
/* Spotify Web API, Kotlin Wrapper; MIT License, 2017-2020; Original author: Adam Ratzman */
22
package com.adamratzman.spotify.annotations
33

4-
@Experimental
54
@Retention(AnnotationRetention.BINARY)
65
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
76
annotation class SpotifyExperimentalHttpApi
87

9-
@Experimental
108
@Retention(AnnotationRetention.BINARY)
119
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
1210
annotation class SpotifyExperimentalFunctionApi

src/jvmMain/kotlin/com/adamratzman/spotify/utils/IO.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ package com.adamratzman.spotify.utils
44
import java.io.ByteArrayOutputStream
55
import java.net.URL
66
import javax.imageio.ImageIO
7-
import javax.xml.bind.DatatypeConverter
87

98
internal actual fun encodeBufferedImageToBase64String(image: BufferedImage): String {
109
val bos = ByteArrayOutputStream()
1110
ImageIO.write(image, "jpg", bos)
1211
bos.close()
13-
return DatatypeConverter.printBase64Binary(bos.toByteArray())
12+
return javax.xml.bind.DatatypeConverter.printBase64Binary(bos.toByteArray())
1413
}
1514

1615
internal actual fun convertFileToBufferedImage(file: File): BufferedImage = ImageIO.read(file)

0 commit comments

Comments
 (0)