From 610cf82a08add2e54241a75b8673b6b6a5c71570 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:03:27 +0200 Subject: [PATCH 1/3] chore(deps): update Cocoa SDK to v8.32.0 (#244) * chore: update scripts/update-cocoa.sh to 8.32.0 * Update --------- Co-authored-by: GitHub Co-authored-by: GIancarlo Buenaflor Co-authored-by: Giancarlo Buenaflor --- CHANGELOG.md | 3 +++ buildSrc/src/main/java/Config.kt | 2 +- .../sentry_kotlin_multiplatform.podspec | 4 ++-- sentry-samples/kmp-app-cocoapods/iosApp/Podfile.lock | 12 ++++++------ .../kmp-app-cocoapods/shared/shared.podspec | 2 +- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41a05801..4adc2002 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ - Bump Java SDK from v7.9.0 to v7.13.0 ([#236](https://github.com/getsentry/sentry-kotlin-multiplatform/pull/236), [#242](https://github.com/getsentry/sentry-kotlin-multiplatform/pull/242), [#248](https://github.com/getsentry/sentry-kotlin-multiplatform/pull/248)) - [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#7130) - [diff](https://github.com/getsentry/sentry-java/compare/7.9.0...7.13.0) +- Bump Cocoa SDK from v8.26.0 to v8.32.0 ([#244](https://github.com/getsentry/sentry-kotlin-multiplatform/pull/244)) + - [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8320) + - [diff](https://github.com/getsentry/sentry-cocoa/compare/8.26.0...8.32.0) ## 0.7.1 diff --git a/buildSrc/src/main/java/Config.kt b/buildSrc/src/main/java/Config.kt index 54f8e05f..c631bbbf 100644 --- a/buildSrc/src/main/java/Config.kt +++ b/buildSrc/src/main/java/Config.kt @@ -36,7 +36,7 @@ object Config { val sentryAndroid = "io.sentry:sentry-android:$sentryJavaVersion" val sentryJava = "io.sentry:sentry:$sentryJavaVersion" - val sentryCocoaVersion = "8.26.0" + val sentryCocoaVersion = "8.32.0" val sentryCocoa = "Sentry" object Samples { diff --git a/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec b/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec index 80f877cb..03a33a7e 100644 --- a/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec +++ b/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec @@ -12,7 +12,7 @@ Pod::Spec.new do |spec| spec.osx.deployment_target = '10.13' spec.tvos.deployment_target = '11.0' spec.watchos.deployment_target = '4.0' - spec.dependency 'Sentry', '8.26.0' + spec.dependency 'Sentry', '8.32.0' if !Dir.exist?('build/cocoapods/framework/sentry_kotlin_multiplatform.framework') || Dir.empty?('build/cocoapods/framework/sentry_kotlin_multiplatform.framework') raise " @@ -50,4 +50,4 @@ Pod::Spec.new do |spec| } ] -end \ No newline at end of file +end diff --git a/sentry-samples/kmp-app-cocoapods/iosApp/Podfile.lock b/sentry-samples/kmp-app-cocoapods/iosApp/Podfile.lock index 3e582d9f..ddaf43b5 100644 --- a/sentry-samples/kmp-app-cocoapods/iosApp/Podfile.lock +++ b/sentry-samples/kmp-app-cocoapods/iosApp/Podfile.lock @@ -1,9 +1,9 @@ PODS: - - Sentry (8.26.0): - - Sentry/Core (= 8.26.0) - - Sentry/Core (8.26.0) + - Sentry (8.32.0): + - Sentry/Core (= 8.32.0) + - Sentry/Core (8.32.0) - shared (1.0): - - Sentry (= 8.26.0) + - Sentry (= 8.32.0) DEPENDENCIES: - shared (from `../shared`) @@ -17,8 +17,8 @@ EXTERNAL SOURCES: :path: "../shared" SPEC CHECKSUMS: - Sentry: 74a073c71c998117edb08f56f443c83570a31bed - shared: ce00f3b03258dc0092e8d21b249e91f4d2fb1098 + Sentry: 96ae1dcdf01a644bc3a3b1dc279cecaf48a833fb + shared: c7fdde4876d54b572233b6be462d2e4214247e66 PODFILE CHECKSUM: f282da88f39e69507b0a255187c8a6b644477756 diff --git a/sentry-samples/kmp-app-cocoapods/shared/shared.podspec b/sentry-samples/kmp-app-cocoapods/shared/shared.podspec index 9ff1e81c..1412910c 100644 --- a/sentry-samples/kmp-app-cocoapods/shared/shared.podspec +++ b/sentry-samples/kmp-app-cocoapods/shared/shared.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |spec| spec.vendored_frameworks = 'build/cocoapods/framework/shared.framework' spec.libraries = 'c++' spec.ios.deployment_target = '14.1' - spec.dependency 'Sentry', '8.26.0' + spec.dependency 'Sentry', '8.32.0' if !Dir.exist?('build/cocoapods/framework/shared.framework') || Dir.empty?('build/cocoapods/framework/shared.framework') raise " From c36d0b421840fb06889c1821789b73ff3c467e38 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 08:22:40 +0000 Subject: [PATCH 2/3] chore(deps): update Cocoa SDK to v8.33.0 (#251) * chore: update scripts/update-cocoa.sh to 8.33.0 * Update sample --------- Co-authored-by: GitHub Co-authored-by: Roman Zavarnitsyn --- CHANGELOG.md | 6 +++--- buildSrc/src/main/java/Config.kt | 2 +- .../sentry_kotlin_multiplatform.podspec | 2 +- sentry-samples/kmp-app-cocoapods/iosApp/Podfile.lock | 12 ++++++------ .../kmp-app-cocoapods/shared/shared.podspec | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4adc2002..d2c13003 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,9 +17,9 @@ - Bump Java SDK from v7.9.0 to v7.13.0 ([#236](https://github.com/getsentry/sentry-kotlin-multiplatform/pull/236), [#242](https://github.com/getsentry/sentry-kotlin-multiplatform/pull/242), [#248](https://github.com/getsentry/sentry-kotlin-multiplatform/pull/248)) - [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#7130) - [diff](https://github.com/getsentry/sentry-java/compare/7.9.0...7.13.0) -- Bump Cocoa SDK from v8.26.0 to v8.32.0 ([#244](https://github.com/getsentry/sentry-kotlin-multiplatform/pull/244)) - - [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8320) - - [diff](https://github.com/getsentry/sentry-cocoa/compare/8.26.0...8.32.0) +- Bump Cocoa SDK from v8.26.0 to v8.33.0 ([#244](https://github.com/getsentry/sentry-kotlin-multiplatform/pull/244), [#251](https://github.com/getsentry/sentry-kotlin-multiplatform/pull/251)) + - [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8330) + - [diff](https://github.com/getsentry/sentry-cocoa/compare/8.26.0...8.33.0) ## 0.7.1 diff --git a/buildSrc/src/main/java/Config.kt b/buildSrc/src/main/java/Config.kt index c631bbbf..070d157f 100644 --- a/buildSrc/src/main/java/Config.kt +++ b/buildSrc/src/main/java/Config.kt @@ -36,7 +36,7 @@ object Config { val sentryAndroid = "io.sentry:sentry-android:$sentryJavaVersion" val sentryJava = "io.sentry:sentry:$sentryJavaVersion" - val sentryCocoaVersion = "8.32.0" + val sentryCocoaVersion = "8.33.0" val sentryCocoa = "Sentry" object Samples { diff --git a/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec b/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec index 03a33a7e..2545741f 100644 --- a/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec +++ b/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec @@ -12,7 +12,7 @@ Pod::Spec.new do |spec| spec.osx.deployment_target = '10.13' spec.tvos.deployment_target = '11.0' spec.watchos.deployment_target = '4.0' - spec.dependency 'Sentry', '8.32.0' + spec.dependency 'Sentry', '8.33.0' if !Dir.exist?('build/cocoapods/framework/sentry_kotlin_multiplatform.framework') || Dir.empty?('build/cocoapods/framework/sentry_kotlin_multiplatform.framework') raise " diff --git a/sentry-samples/kmp-app-cocoapods/iosApp/Podfile.lock b/sentry-samples/kmp-app-cocoapods/iosApp/Podfile.lock index ddaf43b5..b17a6234 100644 --- a/sentry-samples/kmp-app-cocoapods/iosApp/Podfile.lock +++ b/sentry-samples/kmp-app-cocoapods/iosApp/Podfile.lock @@ -1,9 +1,9 @@ PODS: - - Sentry (8.32.0): - - Sentry/Core (= 8.32.0) - - Sentry/Core (8.32.0) + - Sentry (8.33.0): + - Sentry/Core (= 8.33.0) + - Sentry/Core (8.33.0) - shared (1.0): - - Sentry (= 8.32.0) + - Sentry (= 8.33.0) DEPENDENCIES: - shared (from `../shared`) @@ -17,8 +17,8 @@ EXTERNAL SOURCES: :path: "../shared" SPEC CHECKSUMS: - Sentry: 96ae1dcdf01a644bc3a3b1dc279cecaf48a833fb - shared: c7fdde4876d54b572233b6be462d2e4214247e66 + Sentry: 8560050221424aef0bebc8e31eedf00af80f90a6 + shared: 1c9529e12292ea0370ccf66979993372af91b10e PODFILE CHECKSUM: f282da88f39e69507b0a255187c8a6b644477756 diff --git a/sentry-samples/kmp-app-cocoapods/shared/shared.podspec b/sentry-samples/kmp-app-cocoapods/shared/shared.podspec index 1412910c..3e4f457f 100644 --- a/sentry-samples/kmp-app-cocoapods/shared/shared.podspec +++ b/sentry-samples/kmp-app-cocoapods/shared/shared.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |spec| spec.vendored_frameworks = 'build/cocoapods/framework/shared.framework' spec.libraries = 'c++' spec.ios.deployment_target = '14.1' - spec.dependency 'Sentry', '8.32.0' + spec.dependency 'Sentry', '8.33.0' if !Dir.exist?('build/cocoapods/framework/shared.framework') || Dir.empty?('build/cocoapods/framework/shared.framework') raise " From 68ebe2c8e55dd77832526479ff73ce92b64dc842 Mon Sep 17 00:00:00 2001 From: Giancarlo Buenaflor Date: Fri, 9 Aug 2024 10:40:17 +0200 Subject: [PATCH 3/3] fix: plugin publication (#252) * Fix * Update * Update upload artifact to v4 * Update workflow name * update * Update * Remove previous archive distribution jobs * only do it for release branches * formatting --- .../kotlin-multiplatform-gradle-plugin.yml | 29 +------------ .github/workflows/kotlin-multiplatform.yml | 27 ------------ .github/workflows/upload-artifacts.yml | 42 +++++++++++++++++++ .../build.gradle.kts | 33 +++++++++------ .../gradle.properties | 15 +++++++ 5 files changed, 78 insertions(+), 68 deletions(-) create mode 100644 .github/workflows/upload-artifacts.yml diff --git a/.github/workflows/kotlin-multiplatform-gradle-plugin.yml b/.github/workflows/kotlin-multiplatform-gradle-plugin.yml index 719a3a58..646ecdd2 100644 --- a/.github/workflows/kotlin-multiplatform-gradle-plugin.yml +++ b/.github/workflows/kotlin-multiplatform-gradle-plugin.yml @@ -45,31 +45,4 @@ jobs: uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # pin@v4 with: name: sentry-kotlin-multiplatform-gradle-plugin - token: ${{ secrets.CODECOV_TOKEN }} - - archive-distribution: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: JDK setup - uses: actions/setup-java@v3 - with: - java-version: 17 - distribution: temurin - - - name: Cached Gradle - uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a - - - name: DistZip - run: | - cd sentry-kotlin-multiplatform-gradle-plugin && ./gradlew distZip - - - name: Archive packages - uses: actions/upload-artifact@v3 - with: - name: ${{ github.sha }} - if-no-files-found: error - path: | - ./*/build/distributions/*.zip + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/kotlin-multiplatform.yml b/.github/workflows/kotlin-multiplatform.yml index 6ed25778..2754d011 100644 --- a/.github/workflows/kotlin-multiplatform.yml +++ b/.github/workflows/kotlin-multiplatform.yml @@ -113,30 +113,3 @@ jobs: - name: Test samples run: | ./gradlew allTests -p sentry-samples - - archive-distribution: - runs-on: macos-latest-xlarge - - steps: - - uses: actions/checkout@v4 - - - name: JDK setup - uses: actions/setup-java@v3 - with: - java-version: 17 - distribution: temurin - - - name: Cached Gradle - uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a - - - name: DistZip - run: | - ./scripts/build-distribution.sh sentry-kotlin-multiplatform - - - name: Archive packages - uses: actions/upload-artifact@v4 - with: - name: ${{ github.sha }} - if-no-files-found: error - path: | - ./*/build/distributions/*.zip diff --git a/.github/workflows/upload-artifacts.yml b/.github/workflows/upload-artifacts.yml new file mode 100644 index 00000000..8cf701d1 --- /dev/null +++ b/.github/workflows/upload-artifacts.yml @@ -0,0 +1,42 @@ +name: "Generate and upload distributions" +on: + push: + branches: + - release/** + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + archive-distribution: + runs-on: macos-latest-xlarge + + steps: + - uses: actions/checkout@v4 + + - name: JDK setup + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: temurin + + - name: Cached Gradle + uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a + + - name: DistZip libraries + run: | + ./gradlew distZip + + - name: DistZip plugin + run: | + cd sentry-kotlin-multiplatform-gradle-plugin + ./gradlew distZip sentryPluginMarkerDistZip + + - name: Archive packages + uses: actions/upload-artifact@v4 + with: + name: ${{ github.sha }} + if-no-files-found: error + path: | + ./*/build/distributions/*.zip diff --git a/sentry-kotlin-multiplatform-gradle-plugin/build.gradle.kts b/sentry-kotlin-multiplatform-gradle-plugin/build.gradle.kts index 6789a439..f457018c 100644 --- a/sentry-kotlin-multiplatform-gradle-plugin/build.gradle.kts +++ b/sentry-kotlin-multiplatform-gradle-plugin/build.gradle.kts @@ -40,7 +40,7 @@ tasks.withType { kotlinOptions { jvmTarget = JavaVersion.VERSION_ gradlePlugin { plugins { - create(property("id").toString()) { + register("sentryPlugin") { id = property("id").toString() implementationClass = property("implementationClass").toString() } @@ -52,32 +52,39 @@ val publish = extensions.getByType(MavenPublishPluginExtension::class.java) // via gpg:sign-and-deploy-file (release.kts) publish.releaseSigningEnabled = false -tasks.named("distZip").configure { +tasks.named("distZip") { dependsOn("publishToMavenLocal") - this.doLast { - val distributionFilePath = - "${project.layout.buildDirectory.asFile.get().path}${sep}distributions${sep}${project.name}-${project.version}.zip" - val file = File(distributionFilePath) - if (!file.exists()) { - throw IllegalStateException("Distribution file: $distributionFilePath does not exist") - } - if (file.length() == 0L) { - throw IllegalStateException("Distribution file: $distributionFilePath is empty") + onlyIf { + inputs.sourceFiles.isEmpty.not().also { + require(it) { "No distribution to zip." } } } } -val sep = File.separator +val sep: String = File.separator distributions { main { contents { from("build${sep}libs") - from("build${sep}publications${sep}maven") + from("build${sep}publications${sep}pluginMaven") + } + } + create("sentryPluginMarker") { + contents { + from("build${sep}publications${sep}sentryPluginPluginMarkerMaven") } } } +tasks.named("sentryPluginMarkerDistTar") { + mustRunAfter("generatePomFileForSentryPluginPluginMarkerMavenPublication") +} + +tasks.named("sentryPluginMarkerDistZip") { + mustRunAfter("generatePomFileForSentryPluginPluginMarkerMavenPublication") +} + buildConfig { useKotlinOutput() packageName("io.sentry") diff --git a/sentry-kotlin-multiplatform-gradle-plugin/gradle.properties b/sentry-kotlin-multiplatform-gradle-plugin/gradle.properties index 73eb14b5..800c6051 100644 --- a/sentry-kotlin-multiplatform-gradle-plugin/gradle.properties +++ b/sentry-kotlin-multiplatform-gradle-plugin/gradle.properties @@ -4,3 +4,18 @@ versionName=0.7.1 group=io.sentry # TODO: Update update-cocoa.sh so the cocoa version is auto updated as well sentryCocoaVersion=8.26.0 + +# publication pom properties +POM_NAME=Sentry Kotlin Multiplatform Gradle Plugin +POM_DESCRIPTION=Sentry Kotlin Multiplatform Gradle Plugin +POM_URL=https://github.com/getsentry/sentry-kotlin-multiplatform +POM_SCM_URL=https://github.com/getsentry/sentry-kotlin-multiplatform +POM_SCM_CONNECTION=scm:git:git://github.com/getsentry/sentry-kotlin-multiplatform.git +POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/getsentry/sentry-kotlin-multiplatform.git + +POM_LICENCE_NAME=MIT +POM_LICENCE_URL=https://github.com/getsentry/sentry-kotlin-multiplatform/blob/main/LICENSE + +POM_DEVELOPER_ID=getsentry +POM_DEVELOPER_NAME=Sentry Team and Contributors +POM_DEVELOPER_URL=https://github.com/getsentry/ \ No newline at end of file