Skip to content

Commit

Permalink
Update to Kotlin 1.9 (#7)
Browse files Browse the repository at this point in the history
* Prepared update to Kotlin 1.9.0

* Dependency updates

* Dependency updates

* Use androidTarget
  • Loading branch information
StefanOltmann authored Aug 2, 2023
1 parent cca179c commit 5d84d88
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 31 deletions.
24 changes: 24 additions & 0 deletions .idea/runConfigurations/Build.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions .idea/runConfigurations/Check_dependency_updates.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# XMP Core for Kotlin Multiplatform

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

```
implementation("com.ashampoo:xmpcore:0.1.0")
implementation("com.ashampoo:xmpcore:0.1.5")
```

## How to use
Expand Down Expand Up @@ -61,7 +61,7 @@ please feel free to submit a pull request.

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

## License

Expand Down
34 changes: 8 additions & 26 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.NativeBuildType
import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework

plugins {
kotlin("multiplatform") version "1.8.20"
kotlin("multiplatform") version "1.9.0"
id("com.android.library") version "7.4.2"
id("maven-publish")
id("signing")
id("io.gitlab.arturbosch.detekt") version "1.22.0"
id("org.sonarqube") version "4.0.0.2929"
id("org.sonarqube") version "4.3.0.3225"
id("org.jetbrains.kotlinx.kover") version "0.6.1"
id("com.asarkar.gradle.build-time-tracker") version "4.3.0"
id("me.qoomon.git-versioning") version "6.4.1"
id("com.goncalossilva.resources") version "0.3.2"
id("com.goncalossilva.resources") version "0.4.0"
id("com.github.ben-manes.versions") version "0.47.0"
}

repositories {
Expand All @@ -21,7 +22,7 @@ repositories {

val productName = "Ashampoo XMP Core"

val ktorVersion: String = "2.3.2"
val ktorVersion: String = "2.3.3"
val xmlUtilVersion: String = "0.86.1"

description = productName
Expand Down Expand Up @@ -115,7 +116,7 @@ dependencies {

kotlin {

android {
androidTarget {

compilations.all {
kotlinOptions {
Expand Down Expand Up @@ -165,10 +166,10 @@ kotlin {
implementation(kotlin("test"))

/* Multiplatform test resources */
implementation("com.goncalossilva:resources:0.3.2")
implementation("com.goncalossilva:resources:0.4.0")

/* Multiplatform file access */
implementation("org.jetbrains.kotlinx:kotlinx-io-core:0.2.0")
implementation("org.jetbrains.kotlinx:kotlinx-io-core:0.2.1")
}
}

Expand Down Expand Up @@ -203,25 +204,6 @@ kotlin {
}
}

// See https://youtrack.jetbrains.com/issue/KT-55751
val myAttribute = Attribute.of("KT-55751", String::class.java)

// replace releaseFrameworkIosFat by the name of the first configuration that conflicts
configurations.named("releaseFrameworkIosFat").configure {
attributes {
// put a unique attribute
attribute(myAttribute, "release-all")
}
}

// replace releaseFrameworkOsxFat by the name of the first configuration that conflicts
configurations.named("releaseFrameworkOsxFat").configure {
attributes {
// put a unique attribute
attribute(myAttribute, "release-all")
}
}

val jvmMain by sourceSets.getting

@Suppress("UnusedPrivateMember", "UNUSED_VARIABLE") // False positive
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.ashampoo.xmp

import kotlinx.cinterop.CPointer
import kotlinx.cinterop.ExperimentalForeignApi
import kotlinx.cinterop.UnsafeNumber
import kotlinx.cinterop.memScoped
import kotlinx.cinterop.refTo
Expand All @@ -14,7 +15,7 @@ import platform.posix.ftell
import platform.posix.perror
import platform.posix.rewind

@OptIn(UnsafeNumber::class)
@OptIn(UnsafeNumber::class, ExperimentalForeignApi::class)
internal fun readFileAsByteArray(filePath: String): ByteArray? = memScoped {

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

0 comments on commit 5d84d88

Please sign in to comment.