Skip to content

Commit 5d84d88

Browse files
Update to Kotlin 1.9 (#7)
* Prepared update to Kotlin 1.9.0 * Dependency updates * Dependency updates * Use androidTarget
1 parent cca179c commit 5d84d88

6 files changed

Lines changed: 62 additions & 31 deletions

File tree

.idea/runConfigurations/Build.xml

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/Check_dependency_updates.xml

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# XMP Core for Kotlin Multiplatform
22

3-
[![Kotlin](https://img.shields.io/badge/kotlin-1.8.20-blue.svg?logo=kotlin)](httpw://kotlinlang.org)
3+
[![Kotlin](https://img.shields.io/badge/kotlin-1.9.0-blue.svg?logo=kotlin)](httpw://kotlinlang.org)
44
![JVM](https://img.shields.io/badge/-JVM-gray.svg?style=flat)
55
![Android](https://img.shields.io/badge/-Android-gray.svg?style=flat)
66
![macOS](https://img.shields.io/badge/-macOS-gray.svg?style=flat)
@@ -15,7 +15,7 @@ It's part of [Ashampoo Photos](https://ashampoo.com/photos).
1515
## Installation
1616

1717
```
18-
implementation("com.ashampoo:xmpcore:0.1.0")
18+
implementation("com.ashampoo:xmpcore:0.1.5")
1919
```
2020

2121
## How to use
@@ -61,7 +61,7 @@ please feel free to submit a pull request.
6161

6262
* JetBrains for making [Kotlin](https://kotlinlang.org).
6363
* Adobe for making the XMP Core Java SDK.
64-
* Paul de Vrieze for making [XmlUtil](https://github.com/pdvrieze/xmlutil)
64+
* Paul de Vrieze for making [XmlUtil](https://github.com/pdvrieze/xmlutil).
6565

6666
## License
6767

build.gradle.kts

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.NativeBuildType
22
import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
33

44
plugins {
5-
kotlin("multiplatform") version "1.8.20"
5+
kotlin("multiplatform") version "1.9.0"
66
id("com.android.library") version "7.4.2"
77
id("maven-publish")
88
id("signing")
99
id("io.gitlab.arturbosch.detekt") version "1.22.0"
10-
id("org.sonarqube") version "4.0.0.2929"
10+
id("org.sonarqube") version "4.3.0.3225"
1111
id("org.jetbrains.kotlinx.kover") version "0.6.1"
1212
id("com.asarkar.gradle.build-time-tracker") version "4.3.0"
1313
id("me.qoomon.git-versioning") version "6.4.1"
14-
id("com.goncalossilva.resources") version "0.3.2"
14+
id("com.goncalossilva.resources") version "0.4.0"
15+
id("com.github.ben-manes.versions") version "0.47.0"
1516
}
1617

1718
repositories {
@@ -21,7 +22,7 @@ repositories {
2122

2223
val productName = "Ashampoo XMP Core"
2324

24-
val ktorVersion: String = "2.3.2"
25+
val ktorVersion: String = "2.3.3"
2526
val xmlUtilVersion: String = "0.86.1"
2627

2728
description = productName
@@ -115,7 +116,7 @@ dependencies {
115116

116117
kotlin {
117118

118-
android {
119+
androidTarget {
119120

120121
compilations.all {
121122
kotlinOptions {
@@ -165,10 +166,10 @@ kotlin {
165166
implementation(kotlin("test"))
166167

167168
/* Multiplatform test resources */
168-
implementation("com.goncalossilva:resources:0.3.2")
169+
implementation("com.goncalossilva:resources:0.4.0")
169170

170171
/* Multiplatform file access */
171-
implementation("org.jetbrains.kotlinx:kotlinx-io-core:0.2.0")
172+
implementation("org.jetbrains.kotlinx:kotlinx-io-core:0.2.1")
172173
}
173174
}
174175

@@ -203,25 +204,6 @@ kotlin {
203204
}
204205
}
205206

206-
// See https://youtrack.jetbrains.com/issue/KT-55751
207-
val myAttribute = Attribute.of("KT-55751", String::class.java)
208-
209-
// replace releaseFrameworkIosFat by the name of the first configuration that conflicts
210-
configurations.named("releaseFrameworkIosFat").configure {
211-
attributes {
212-
// put a unique attribute
213-
attribute(myAttribute, "release-all")
214-
}
215-
}
216-
217-
// replace releaseFrameworkOsxFat by the name of the first configuration that conflicts
218-
configurations.named("releaseFrameworkOsxFat").configure {
219-
attributes {
220-
// put a unique attribute
221-
attribute(myAttribute, "release-all")
222-
}
223-
}
224-
225207
val jvmMain by sourceSets.getting
226208

227209
@Suppress("UnusedPrivateMember", "UNUSED_VARIABLE") // False positive
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

src/posixMain/kotlin/com/ashampoo/xmp/PosixByteArrayReader.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.ashampoo.xmp
22

33
import kotlinx.cinterop.CPointer
4+
import kotlinx.cinterop.ExperimentalForeignApi
45
import kotlinx.cinterop.UnsafeNumber
56
import kotlinx.cinterop.memScoped
67
import kotlinx.cinterop.refTo
@@ -14,7 +15,7 @@ import platform.posix.ftell
1415
import platform.posix.perror
1516
import platform.posix.rewind
1617

17-
@OptIn(UnsafeNumber::class)
18+
@OptIn(UnsafeNumber::class, ExperimentalForeignApi::class)
1819
internal fun readFileAsByteArray(filePath: String): ByteArray? = memScoped {
1920

2021
/* Note: Mode "rb" is for reading binary files. */

0 commit comments

Comments
 (0)