Skip to content

Add useSwiftJavaJniCore option to control generated imports#43

Open
ybiletskyi wants to merge 1 commit into
masterfrom
dev/migrate-to-swift-java-jni-core
Open

Add useSwiftJavaJniCore option to control generated imports#43
ybiletskyi wants to merge 1 commit into
masterfrom
dev/migrate-to-swift-java-jni-core

Conversation

@ybiletskyi

@ybiletskyi ybiletskyi commented Jun 17, 2026

Copy link
Copy Markdown

Note

Medium Risk
Generated Swift import sets change compile-time behavior for consumers toggling the new flag; default (false) preserves legacy imports. Signing change is low risk for CI releases.

Overview
Adds useSwiftJavaJniCore on the module package JSON (SwiftModuleDescriptor) so codegen can pick between the legacy JNI stack (import Java plus java_swift) and a swiftlang jni-core path that drops Java while keeping java_swift, JavaCoder, and AnyCodable. SwiftWriter.emitImports and every generator (SwiftValue, SwiftReference, SwiftDelegate, SwiftBlock, and bootstrap SwiftJava.swift) pass the flag through.

JavaSwiftProcessor now fails fast if the module descriptor is missing before writing SwiftJava.swift, instead of only after starting annotation processing.

Release tooling: PUBLISH_VERSION 0.9.7, Readdle Swift Gradle plugin 6.2.1, and GPG signing only when signing.keyId is set so publishToMavenLocal works without keys.

Reviewed by Cursor Bugbot for commit 489d7ef. Bugbot is set up for automated code reviews on this repo. Configure here.

@ybiletskyi ybiletskyi requested a review from andriydruk June 17, 2026 07:29

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 77e1a0b. Configure here.

Comment thread compiler/src/main/java/com/readdle/codegen/JavaSwiftProcessor.java
@ybiletskyi ybiletskyi force-pushed the dev/migrate-to-swift-java-jni-core branch from 77e1a0b to 489d7ef Compare June 17, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant