Skip to content

Commit fb589e4

Browse files
committed
build sample app instead
1 parent 296370f commit fb589e4

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/pull_request.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ jobs:
196196
- name: Install Swift SDK for Android and build
197197
run: |
198198
apt-get -q update && apt-get -yq install curl
199+
cd Samples/SwiftJavaExtractJNISampleApp \
199200
curl -s --retry 3 https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/install-and-build-with-sdk.sh | \
200201
bash -s -- --android --build-command="swift build" --android-sdk-triple="${{ matrix.sdk_triple }}" --android-ndk-version="${{ matrix.ndk_version }}" ${{ matrix.swift_version }}
201202

Samples/SwiftJavaExtractJNISampleApp/build.gradle

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,19 @@ def jextract = tasks.register("jextract", Exec) {
100100
}
101101
}
102102

103+
// FIXME: disable prebuilts until swift-syntax isn't broken on 6.2 anymore: https://github.com/swiftlang/swift-java/issues/418
104+
def cmdArgs = ["build", "--disable-experimental-prebuilts"]
105+
106+
// Check if the 'swiftSdk' project property was passed
107+
if (project.hasProperty('swiftSdk')) {
108+
// If it was, add the --sdk argument and its value
109+
cmdArgs.add("--swift-sdk")
110+
cmdArgs.add(project.property('swiftSdk').toString())
111+
}
112+
103113
workingDir = layout.projectDirectory
104114
commandLine "swift"
105-
// FIXME: disable prebuilts until swift-syntax isn't broken on 6.2 anymore: https://github.com/swiftlang/swift-java/issues/418
106-
args("build", "--disable-experimental-prebuilts") // since Swift targets which need to be jextract-ed have the jextract build plugin, we just need to build
115+
args(cmdArgs) // since Swift targets which need to be jextract-ed have the jextract build plugin, we just need to build
107116
// If we wanted to execute a specific subcommand, we can like this:
108117
// args("run",/*
109118
// "swift-java", "jextract",

0 commit comments

Comments
 (0)