Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Sources/SkipBuild/SkipProject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3848,6 +3848,7 @@ internal fun PresentationRootView(context: ComposeContext) {
-keep class skip.** { *; }
-keep class tools.skip.** { *; }
-keep class kotlin.jvm.functions.** {*;}
-keep interface kotlinx.coroutines.Job { void cancel(java.util.concurrent.CancellationException); }
-keep class com.sun.jna.** { *; }
-dontwarn java.awt.**
-keep class * implements com.sun.jna.** { *; }
Expand Down
3 changes: 3 additions & 0 deletions Tests/SkipBuildTests/SkipCommandTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1267,6 +1267,9 @@ final class SkipCommandTests: XCTestCase {
/// A single-module native app
func testLibInitAppNativeAppCommand() async throws {
let (projectURL, projectTree) = try await skipInit(projectName: "cool-app", zero: false, mode: [.nativeApp], tests: nil, fastlane: false, appid: "some.cool.app", swiftPackageVersion: "6.2", moduleNames: "AppModule")
let proguardRules = try String(contentsOf: projectURL.appendingPathComponent("Android/app/proguard-rules.pro"))
XCTAssertTrue(proguardRules.split(separator: "\n").contains("-keep interface kotlinx.coroutines.Job { void cancel(java.util.concurrent.CancellationException); }"),
"Native apps must preserve the Job return type used in async bridge JNI signatures and the Job.cancel method that bridged task cancellation calls")
XCTAssertEqual(projectTree ?? "", """
.
├─ Android
Expand Down
Loading