diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 801cb95..cb08958 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,24 +13,24 @@ on: jobs: build: name: Build & Test - runs-on: macos-13 + runs-on: macos-15 steps: - name: Checkout workspace - uses: actions/checkout@v3 + uses: actions/checkout@v4 timeout-minutes: 5 with: - fetch-depth: 0 # no shallow clones for SonarQube + fetch-depth: 0 - name: Set up Java JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '17.0.13+11' - - name: Select XCode 15.2 + java-version: '17.0.15+6' + - name: Select XCode 16.3 run: | - sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer + sudo xcode-select -s /Applications/Xcode_16.3.app/Contents/Developer xcodebuild -version - name: Gradle Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.gradle/caches @@ -39,36 +39,29 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle.kts') }} restore-keys: ${{ runner.os }}-gradle- - name: Kotlin Native Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.konan key: ${{ runner.os }}-konan-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle.kts') }} restore-keys: ${{ runner.os }}-konan- - name: Android Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.android key: ${{ runner.os }}-android-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle.kts') }} restore-keys: ${{ runner.os }}-android- - - name: Cache SonarCloud packages - uses: actions/cache@v3 - with: - path: ~/.sonar/cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - name: Build & Test env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | chmod +x ./gradlew - ./gradlew build test koverXmlReport detekt sonar assembleXCFramework --parallel + ./gradlew build test detekt assembleXCFramework --parallel - name: Set RELEASE_VERSION variable run: | echo "RELEASE_VERSION=$(cat build/version.txt)" >> $GITHUB_ENV echo ${{ env.RELEASE_VERSION }} - name: Upload reports - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: name: reports.zip @@ -77,49 +70,49 @@ jobs: run: | ls -lah build/bin/*/releaseExecutable build/libs/ build/outputs/aar/ build/XCFrameworks/release/ - name: Upload xmpcore.jar - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: if-no-files-found: error name: xmpcore.jar path: build/libs/xmpcore-jvm-${{ env.RELEASE_VERSION }}.jar - name: Upload xmpcore.aar - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: if-no-files-found: error name: xmpcore.aar path: build/outputs/aar/xmpcore-release.aar - name: Upload xmpcore.xcframework - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: if-no-files-found: error name: xmpcore.xcframework path: build/XCFrameworks/release/xmpcore.xcframework - name: Upload xmpcore.exe - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: if-no-files-found: error name: xmpcore.exe path: build/bin/win/releaseExecutable/xmpcore.exe - name: Upload xmpcore-macosX64.kexe - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: if-no-files-found: error name: xmpcore-macosX64.kexe path: build/bin/macosX64/releaseExecutable/xmpcore.kexe - name: Upload xmpcore-macosArm64.kexe - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: if-no-files-found: error name: xmpcore-macosArm64.kexe path: build/bin/macosArm64/releaseExecutable/xmpcore.kexe - name: Upload xmpcore-linuxArm64.kexe - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: if-no-files-found: error name: xmpcore-linuxArm64.kexe path: build/bin/linuxArm64/releaseExecutable/xmpcore.kexe - name: Upload xmpcore-linuxX64.kexe - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: if-no-files-found: error name: xmpcore-linuxX64.kexe diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml deleted file mode 100644 index 1db30fc..0000000 --- a/.github/workflows/pages.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Deploy to GitHub Pages - -on: - push: - branches: [ "main" ] - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Set up Java JDK 18 - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: '17.0.13+11' - - name: Gradle Cache - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - ~/.gradle/native - key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle.kts') }} - - name: Build & Test - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - chmod +x ./gradlew - ./gradlew dokkaHtml - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 - with: - path: 'build/dokka/html' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v3 diff --git a/.idea/AndroidProjectSystem.xml b/.idea/AndroidProjectSystem.xml new file mode 100644 index 0000000..4a53bee --- /dev/null +++ b/.idea/AndroidProjectSystem.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/Create_Kover_report.xml b/.idea/runConfigurations/Create_Kover_report.xml new file mode 100644 index 0000000..b3989a1 --- /dev/null +++ b/.idea/runConfigurations/Create_Kover_report.xml @@ -0,0 +1,24 @@ + + + + + + + true + true + false + false + + + \ No newline at end of file diff --git a/README.md b/README.md index a2ede93..6222425 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # XMP Core for Kotlin Multiplatform -[![Kotlin](https://img.shields.io/badge/kotlin-2.1.10-blue.svg?logo=kotlin)](httpw://kotlinlang.org) +[![Kotlin](https://img.shields.io/badge/kotlin-2.1.21-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) ![iOS](https://img.shields.io/badge/-iOS-gray.svg?style=flat) @@ -10,7 +10,6 @@ ![JS](https://img.shields.io/badge/-JS-gray.svg?style=flat) ![WASM](https://img.shields.io/badge/-WASM-gray.svg?style=flat) ![WASI](https://img.shields.io/badge/-WASI-gray.svg?style=flat) -[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=xmpcore&metric=coverage)](https://sonarcloud.io/summary/new_code?id=xmpcore) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.ashampoo/xmpcore/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.ashampoo/xmpcore) This library is a port of Adobe's XMP SDK to Kotlin Multiplatform by Ashampoo. @@ -20,7 +19,7 @@ It's part of [Ashampoo Photo Organizer](https://ashampoo.com/photo-organizer). ## Installation ``` -implementation("com.ashampoo:xmpcore:1.5.1") +implementation("com.ashampoo:xmpcore:1.5.2") ``` ## How to use diff --git a/build.gradle.kts b/build.gradle.kts index be23d86..46ae97b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,18 +3,16 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.NativeBuildType import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework plugins { - kotlin("multiplatform") version "2.1.10" - id("com.android.library") version "8.5.0" + kotlin("multiplatform") version "2.1.21" + id("com.android.library") version "8.9.2" id("maven-publish") id("signing") - id("io.gitlab.arturbosch.detekt") version "1.23.7" - id("org.sonarqube") version "4.3.1.3277" - id("org.jetbrains.kotlinx.kover") version "0.6.1" - id("com.asarkar.gradle.build-time-tracker") version "4.3.0" + id("io.gitlab.arturbosch.detekt") version "1.23.8" + id("org.jetbrains.kotlinx.kover") version "0.9.1" + id("com.asarkar.gradle.build-time-tracker") version "5.0.1" id("me.qoomon.git-versioning") version "6.4.4" id("com.goncalossilva.resources") version "0.10.0" - id("com.github.ben-manes.versions") version "0.51.0" - id("org.jetbrains.dokka") version "1.9.20" + id("com.github.ben-manes.versions") version "0.52.0" } repositories { @@ -24,8 +22,8 @@ repositories { val productName = "Ashampoo XMP Core" -val xmlUtilVersion: String = "0.90.3" -val kotlinIoVersion: String = "0.6.0" +val xmlUtilVersion: String = "0.91.1" +val kotlinxIoVersion: String = "0.7.0" description = productName group = "com.ashampoo" @@ -51,41 +49,11 @@ gitVersioning.apply { } apply(plugin = "io.gitlab.arturbosch.detekt") -apply(plugin = "org.sonarqube") -apply(plugin = "kover") buildTimeTracker { sortBy.set(com.asarkar.gradle.buildtimetracker.Sort.DESC) } -sonar { - properties { - - property("sonar.projectKey", "xmpcore") - property("sonar.projectName", productName) - property("sonar.organization", "ashampoo") - property("sonar.host.url", "https://sonarcloud.io") - - property( - "sonar.sources", - listOf( - "./src/commonMain/kotlin", - "./src/posixMain/kotlin" - ) - ) - property( - "sonar.tests", - listOf( - "./src/commonTest/kotlin" - ) - ) - - property("sonar.android.lint.report", "build/reports/lint-results.xml") - property("sonar.kotlin.detekt.reportPaths", "build/reports/detekt/detekt.xml") - property("sonar.coverage.jacoco.xmlReportPaths", "build/reports/kover/xml/report.xml") - } -} - detekt { source.from("src", "build.gradle.kts") allRules = true @@ -98,13 +66,8 @@ detekt { kover { } -koverMerged { - xmlReport { - } -} - dependencies { - detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.23.7") + detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.23.8") } kotlin { @@ -180,7 +143,7 @@ kotlin { implementation(kotlin("test")) /* Multiplatform file access */ - implementation("org.jetbrains.kotlinx:kotlinx-io-core:$kotlinIoVersion") + implementation("org.jetbrains.kotlinx:kotlinx-io-core:$kotlinxIoVersion") } } diff --git a/detekt.yml b/detekt.yml index 32bbb3d..75f8f71 100644 --- a/detekt.yml +++ b/detekt.yml @@ -96,7 +96,7 @@ comments: complexity: active: true CognitiveComplexMethod: - active: false # already checked by SonarQube + active: true threshold: 15 ComplexCondition: active: true @@ -108,7 +108,7 @@ complexity: includePrivateDeclarations: false ignoreOverloaded: false CyclomaticComplexMethod: - active: false # already checked by SonarQube + active: true threshold: 15 ignoreSingleWhenExpression: false ignoreSimpleWhenEntries: false @@ -133,8 +133,8 @@ complexity: active: true threshold: 60 LongParameterList: - active: false # already checked by SonarQube - functionThreshold: 7 # 7 is SonarQube default + active: true + functionThreshold: 7 constructorThreshold: 7 ignoreDefaultParameters: false ignoreDataClasses: true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9bf7bd3..3c44eb1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/commonMain/kotlin/com/ashampoo/xmp/XMPVersionInfo.kt b/src/commonMain/kotlin/com/ashampoo/xmp/XMPVersionInfo.kt index d144690..512d434 100644 --- a/src/commonMain/kotlin/com/ashampoo/xmp/XMPVersionInfo.kt +++ b/src/commonMain/kotlin/com/ashampoo/xmp/XMPVersionInfo.kt @@ -9,7 +9,7 @@ public object XMPVersionInfo { public const val MAJOR: Int = 1 public const val MINOR: Int = 5 - public const val PATCH: Int = 1 + public const val PATCH: Int = 2 public const val VERSION_MESSAGE: String = "Ashampoo XMP Core $MAJOR.$MINOR.$PATCH" diff --git a/src/commonTest/resources/com/ashampoo/xmp/sample_100_formatted_canonical.xmp b/src/commonTest/resources/com/ashampoo/xmp/sample_100_formatted_canonical.xmp index 1e592d1..dc0ede9 100644 --- a/src/commonTest/resources/com/ashampoo/xmp/sample_100_formatted_canonical.xmp +++ b/src/commonTest/resources/com/ashampoo/xmp/sample_100_formatted_canonical.xmp @@ -1,5 +1,5 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/commonTest/resources/com/ashampoo/xmp/sample_13_formatted_compact.xmp b/src/commonTest/resources/com/ashampoo/xmp/sample_13_formatted_compact.xmp index 5286494..c63ae80 100644 --- a/src/commonTest/resources/com/ashampoo/xmp/sample_13_formatted_compact.xmp +++ b/src/commonTest/resources/com/ashampoo/xmp/sample_13_formatted_compact.xmp @@ -1,5 +1,5 @@ - + - + diff --git a/src/commonTest/resources/com/ashampoo/xmp/sample_14_formatted_compact.xmp b/src/commonTest/resources/com/ashampoo/xmp/sample_14_formatted_compact.xmp index 4064bf8..9abdf72 100644 --- a/src/commonTest/resources/com/ashampoo/xmp/sample_14_formatted_compact.xmp +++ b/src/commonTest/resources/com/ashampoo/xmp/sample_14_formatted_compact.xmp @@ -1,5 +1,5 @@ - + - + diff --git a/src/commonTest/resources/com/ashampoo/xmp/sample_15_formatted_compact.xmp b/src/commonTest/resources/com/ashampoo/xmp/sample_15_formatted_compact.xmp index b5b88c2..9a22270 100644 --- a/src/commonTest/resources/com/ashampoo/xmp/sample_15_formatted_compact.xmp +++ b/src/commonTest/resources/com/ashampoo/xmp/sample_15_formatted_compact.xmp @@ -1,5 +1,5 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/commonTest/resources/com/ashampoo/xmp/sample_31_formatted_compact.xmp b/src/commonTest/resources/com/ashampoo/xmp/sample_31_formatted_compact.xmp index 4064bf8..9abdf72 100644 --- a/src/commonTest/resources/com/ashampoo/xmp/sample_31_formatted_compact.xmp +++ b/src/commonTest/resources/com/ashampoo/xmp/sample_31_formatted_compact.xmp @@ -1,5 +1,5 @@ - + - + - + - + - + - + diff --git a/src/commonTest/resources/com/ashampoo/xmp/sample_34_formatted_compact.xmp b/src/commonTest/resources/com/ashampoo/xmp/sample_34_formatted_compact.xmp index 4064bf8..9abdf72 100644 --- a/src/commonTest/resources/com/ashampoo/xmp/sample_34_formatted_compact.xmp +++ b/src/commonTest/resources/com/ashampoo/xmp/sample_34_formatted_compact.xmp @@ -1,5 +1,5 @@ - + - + - + - + - + - + - + - + - + - + diff --git a/src/commonTest/resources/com/ashampoo/xmp/sample_39_formatted_compact.xmp b/src/commonTest/resources/com/ashampoo/xmp/sample_39_formatted_compact.xmp index 5286494..c63ae80 100644 --- a/src/commonTest/resources/com/ashampoo/xmp/sample_39_formatted_compact.xmp +++ b/src/commonTest/resources/com/ashampoo/xmp/sample_39_formatted_compact.xmp @@ -1,5 +1,5 @@ - + - + - + - + - + - + diff --git a/src/commonTest/resources/com/ashampoo/xmp/sample_41_formatted_compact.xmp b/src/commonTest/resources/com/ashampoo/xmp/sample_41_formatted_compact.xmp index 5286494..c63ae80 100644 --- a/src/commonTest/resources/com/ashampoo/xmp/sample_41_formatted_compact.xmp +++ b/src/commonTest/resources/com/ashampoo/xmp/sample_41_formatted_compact.xmp @@ -1,5 +1,5 @@ - + - + - + - + diff --git a/src/commonTest/resources/com/ashampoo/xmp/sample_43_formatted_compact.xmp b/src/commonTest/resources/com/ashampoo/xmp/sample_43_formatted_compact.xmp index 2f937af..c5fe667 100644 --- a/src/commonTest/resources/com/ashampoo/xmp/sample_43_formatted_compact.xmp +++ b/src/commonTest/resources/com/ashampoo/xmp/sample_43_formatted_compact.xmp @@ -1,5 +1,5 @@ - + - + diff --git a/src/commonTest/resources/com/ashampoo/xmp/sample_44_formatted_compact.xmp b/src/commonTest/resources/com/ashampoo/xmp/sample_44_formatted_compact.xmp index 92b0ff6..67bc94c 100644 --- a/src/commonTest/resources/com/ashampoo/xmp/sample_44_formatted_compact.xmp +++ b/src/commonTest/resources/com/ashampoo/xmp/sample_44_formatted_compact.xmp @@ -1,5 +1,5 @@ - + - + - + - + - + - + - + - + - + - + diff --git a/src/commonTest/resources/com/ashampoo/xmp/sample_49_formatted_compact.xmp b/src/commonTest/resources/com/ashampoo/xmp/sample_49_formatted_compact.xmp index 4064bf8..9abdf72 100644 --- a/src/commonTest/resources/com/ashampoo/xmp/sample_49_formatted_compact.xmp +++ b/src/commonTest/resources/com/ashampoo/xmp/sample_49_formatted_compact.xmp @@ -1,5 +1,5 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +