Skip to content

Add Kotlin bindings build config and CI publish workflow#1939

Open
crodas wants to merge 1 commit into
cashubtc:mainfrom
crodas:feature/kotlin-release
Open

Add Kotlin bindings build config and CI publish workflow#1939
crodas wants to merge 1 commit into
cashubtc:mainfrom
crodas:feature/kotlin-release

Conversation

@crodas
Copy link
Copy Markdown
Collaborator

@crodas crodas commented Apr 25, 2026

Description

Add Gradle build configuration for JVM, Android, and iOS targets, along with a GitHub Actions workflow for publishing Kotlin packages.


Notes to the reviewers


Suggested CHANGELOG Updates

CHANGED

ADDED

REMOVED

FIXED


Checklist

  • I followed the code style guidelines
  • I ran just quick-check before committing
  • If the Wallet API was modified (added/removed/changed), I have reflected those changes in the FFI bindings (crates/cdk-ffi)

@crodas crodas requested a review from thesimplekid April 25, 2026 19:48
@crodas crodas self-assigned this Apr 25, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in CDK Apr 25, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.16%. Comparing base (e06f337) to head (5358122).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1939   +/-   ##
=======================================
  Coverage   65.16%   65.16%           
=======================================
  Files         330      330           
  Lines       56742    56742           
=======================================
  Hits        36976    36976           
  Misses      19766    19766           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@crodas crodas force-pushed the feature/kotlin-release branch 6 times, most recently from fce2540 to 9856271 Compare April 26, 2026 16:37
Comment thread bindings/kotlin/README.md
Comment thread bindings/swift/generate-bindings.sh Outdated
@crodas crodas force-pushed the feature/kotlin-release branch from 9856271 to c439c33 Compare April 28, 2026 13:14
@crodas crodas marked this pull request as ready for review April 29, 2026 14:21
}
publishing {
singleVariant("release") {
withSourcesJar()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you verify this by publishing to Maven Central or running Central validation? I don't think all of these publications will pass without sources and javadoc artifacts.

cdk-jvm seems to have both sources and javadocs.

cdk-android has sources but is missing javadocs.

cdk-jvm-natives and cdk-ios appear to be missing both sources and javadocs.

Central requires every non-pom artifact to include matching -sources.jar and -javadoc.jar artifacts, though placeholder jars are allowed if real sources/docs are not available:

https://central.sonatype.org/publish/requirements/#supply-javadoc-and-sources

Copy link
Copy Markdown
Collaborator Author

@crodas crodas May 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will test with a throw-away maven central account or I will run the central validation

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What parts of this have been tested then if the publishing has not been?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR creates a git-release, similar to dart, that includes all generated UniFFI files and the compiled binaries for each platform. With the target repository, I pull locally and run the unit tests on Linux and OSX, ensuring no Rustc is available.

I will test now the maven publication

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future we should note on the PR if there is outstanding testing to be done.

Comment thread .github/workflows/kotlin-publish.yml Outdated
Comment thread .github/workflows/kotlin-publish.yml Outdated
Comment on lines +340 to +345
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
git diff --cached --quiet && echo "No changes to commit" && exit 0
git commit -m "release: ${{ inputs.release_tag }} — add bindings and prebuilt binaries"
Copy link
Copy Markdown
Collaborator

@thesimplekid thesimplekid May 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't the above step already committed all this so this is a duplicate?

Comment thread bindings/swift/generate-bindings.sh
Comment thread .github/workflows/kotlin-publish.yml Outdated
Comment thread .github/workflows/kotlin-publish.yml Outdated
Comment thread .github/workflows/kotlin-publish.yml Outdated
@github-project-automation github-project-automation Bot moved this from Backlog to In progress in CDK May 3, 2026
@crodas crodas force-pushed the feature/kotlin-release branch 2 times, most recently from 6d0b1f5 to 51b9aef Compare May 15, 2026 13:11
@crodas crodas force-pushed the feature/kotlin-release branch from 51b9aef to 5358122 Compare May 15, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants