From 014620a6874895112ff603a0182c403a4fe3dcb7 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Fri, 15 Aug 2025 11:05:44 +0200 Subject: [PATCH 1/3] Update Swift files for v0.6.2 --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 68009d8cf..00f3eeb84 100644 --- a/Package.swift +++ b/Package.swift @@ -4,7 +4,7 @@ import PackageDescription let tag = "v0.6.2" -let checksum = "73f53b615d5bfdf76f2e7233bde17a2a62631292ce506763a7150344230859c8" +let checksum = "dee28eb2bc019eeb61cc28ca5c19fdada465a6eb2b5169d2dbaa369f0c63ba03" let url = "https://github.com/lightningdevkit/ldk-node/releases/download/\(tag)/LDKNodeFFI.xcframework.zip" let package = Package( From 22c823b28ab4fc04ad114bffc19d3a09945eee46 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Fri, 15 Aug 2025 11:08:48 +0200 Subject: [PATCH 2/3] Drop nexus publishing plugin Maven Central recently deprecated the Sonatype-style publishing, which means the nexus publishing gradle plugin we used didn't work anymore. As Maven Central has yet to release a replacement plugin for gradle, we simply drop nexus publishing support here and manually upload the archives in the meantime, which is simple enough. We also drop the publishing CI jobs that originally aimed to automate publishing to Maven Central, which we however never came around to use since we didn't want to fully trust Github CI with publishing binaries for us. --- .github/workflows/publish-android.yml | 43 ---------- .github/workflows/publish-jvm.yml | 86 ------------------- .../kotlin/ldk-node-android/build.gradle.kts | 20 +---- bindings/kotlin/ldk-node-jvm/build.gradle.kts | 21 +---- 4 files changed, 2 insertions(+), 168 deletions(-) delete mode 100644 .github/workflows/publish-android.yml delete mode 100644 .github/workflows/publish-jvm.yml diff --git a/.github/workflows/publish-android.yml b/.github/workflows/publish-android.yml deleted file mode 100644 index b6b24ac90..000000000 --- a/.github/workflows/publish-android.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Publish ldk-node-android to Maven Central -on: [workflow_dispatch] - -jobs: - build: - runs-on: ubuntu-20.04 - steps: - - name: "Check out PR branch" - uses: actions/checkout@v2 - - - name: "Cache" - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - ./target - key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} - - - name: "Set up JDK" - uses: actions/setup-java@v2 - with: - distribution: temurin - java-version: 11 - - - name: "Install Rust Android targets" - run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi - - - name: "Build ldk-node-android library" - run: | - export PATH=$PATH:$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin - ./scripts/uniffi_bindgen_generate_kotlin_android.sh - - - name: "Publish to Maven Local and Maven Central" - env: - ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.PGP_KEY_ID }} - ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PGP_SECRET_KEY }} - ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PGP_PASSPHRASE }} - ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.NEXUS_USERNAME }} - ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.NEXUS_PASSWORD }} - run: | - cd bindings/kotlin/ldk-node-android - ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository diff --git a/.github/workflows/publish-jvm.yml b/.github/workflows/publish-jvm.yml deleted file mode 100644 index 0ae40e0a1..000000000 --- a/.github/workflows/publish-jvm.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: Publish ldk-node-jvm to Maven Central -on: [workflow_dispatch] - -jobs: - build-jvm-macOS-M1-native-lib: - name: "Create M1 and x86_64 JVM native binaries" - runs-on: macos-12 - steps: - - name: "Checkout publishing branch" - uses: actions/checkout@v2 - - - name: Cache - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - ./target - key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} - - - name: Set up JDK - uses: actions/setup-java@v2 - with: - distribution: temurin - java-version: 11 - - - name: Install aarch64 Rust target - run: rustup target add aarch64-apple-darwin - - - name: Build ldk-node-jvm library - run: | - ./scripts/uniffi_bindgen_generate_kotlin.sh - - # build aarch64 + x86_64 native libraries and upload - - name: Upload macOS native libraries for reuse in publishing job - uses: actions/upload-artifact@v3 - with: - # name: no name is required because we upload the entire directory - # the default name "artifact" will be used - path: /Users/runner/work/ldk-node/ldk-node/bindings/kotlin/ldk-node-jvm/lib/src/main/resources/ - - build-jvm-full-library: - name: "Create full ldk-node-jvm library" - needs: [build-jvm-macOS-M1-native-lib] - runs-on: ubuntu-20.04 - steps: - - name: "Check out PR branch" - uses: actions/checkout@v2 - - - name: "Cache" - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - ./target - key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} - - - name: "Set up JDK" - uses: actions/setup-java@v2 - with: - distribution: temurin - java-version: 11 - - - name: "Build ldk-node-jvm library" - run: | - ./scripts/uniffi_bindgen_generate_kotlin.sh - - - name: Download macOS native libraries from previous job - uses: actions/download-artifact@v4.1.7 - id: download - with: - # download the artifact created in the prior job (named "artifact") - name: artifact - path: ./bindings/kotlin/ldk-node-jvm/lib/src/main/resources/ - - - name: "Publish to Maven Local and Maven Central" - env: - ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.PGP_KEY_ID }} - ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PGP_SECRET_KEY }} - ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PGP_PASSPHRASE }} - ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.NEXUS_USERNAME }} - ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.NEXUS_PASSWORD }} - run: | - cd bindings/kotlin/ldk-node-jvm - ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository diff --git a/bindings/kotlin/ldk-node-android/build.gradle.kts b/bindings/kotlin/ldk-node-android/build.gradle.kts index ab7262dd7..bb38991d3 100644 --- a/bindings/kotlin/ldk-node-android/build.gradle.kts +++ b/bindings/kotlin/ldk-node-android/build.gradle.kts @@ -1,6 +1,7 @@ buildscript { repositories { google() + mavenCentral() } dependencies { classpath("com.android.tools.build:gradle:7.1.2") @@ -8,29 +9,10 @@ buildscript { } plugins { - id("io.github.gradle-nexus.publish-plugin") version "1.1.0" } // library version is defined in gradle.properties val libraryVersion: String by project -// These properties are required here so that the nexus publish-plugin -// finds a staging profile with the correct group (group is otherwise set as "") -// and knows whether to publish to a SNAPSHOT repository or not -// https://github.com/gradle-nexus/publish-plugin#applying-the-plugin group = "org.lightningdevkit" version = libraryVersion - -nexusPublishing { - repositories { - create("sonatype") { - nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) - snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) - - val ossrhUsername: String? by project - val ossrhPassword: String? by project - username.set(ossrhUsername) - password.set(ossrhPassword) - } - } -} \ No newline at end of file diff --git a/bindings/kotlin/ldk-node-jvm/build.gradle.kts b/bindings/kotlin/ldk-node-jvm/build.gradle.kts index ab7262dd7..faf316ef0 100644 --- a/bindings/kotlin/ldk-node-jvm/build.gradle.kts +++ b/bindings/kotlin/ldk-node-jvm/build.gradle.kts @@ -1,36 +1,17 @@ buildscript { repositories { google() + mavenCentral() } dependencies { - classpath("com.android.tools.build:gradle:7.1.2") } } plugins { - id("io.github.gradle-nexus.publish-plugin") version "1.1.0" } // library version is defined in gradle.properties val libraryVersion: String by project -// These properties are required here so that the nexus publish-plugin -// finds a staging profile with the correct group (group is otherwise set as "") -// and knows whether to publish to a SNAPSHOT repository or not -// https://github.com/gradle-nexus/publish-plugin#applying-the-plugin group = "org.lightningdevkit" version = libraryVersion - -nexusPublishing { - repositories { - create("sonatype") { - nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) - snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) - - val ossrhUsername: String? by project - val ossrhPassword: String? by project - username.set(ossrhUsername) - password.set(ossrhPassword) - } - } -} \ No newline at end of file From f481f076dc0b9ea68ce48fe5251078e2344456cf Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Fri, 15 Aug 2025 11:12:09 +0200 Subject: [PATCH 3/3] Add simpler helper script to generate MD5 and SHA checksum files .. which we use before manually publishing to Maven Central. --- scripts/generate_checksum_files.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 scripts/generate_checksum_files.sh diff --git a/scripts/generate_checksum_files.sh b/scripts/generate_checksum_files.sh new file mode 100644 index 000000000..bbfa41a9a --- /dev/null +++ b/scripts/generate_checksum_files.sh @@ -0,0 +1,5 @@ +#!/bin/bash +md5sum $1 | cut -d ' ' -f 1 > $1.md5 +sha1sum $1 | cut -d ' ' -f 1 > $1.sha1 +sha256sum $1 | cut -d ' ' -f 1 > $1.sha256 +sha512sum $1 | cut -d ' ' -f 1 > $1.sha512