Skip to content

Commit 1e6c8ee

Browse files
committed
Enable --build-system native to work around swiftlang/swift-build#1363
1 parent 1f48004 commit 1e6c8ee

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

hello-cpp-swift/swift-lib/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ abis.each { abi, info ->
132132

133133
workingDir = layout.projectDirectory
134134
executable(getSwiftlyPath())
135-
args("run", "swift", "build", "+${swiftVersion}", "--swift-sdk", info.triple)
135+
args("run", "swift", "build", "+${swiftVersion}", "--swift-sdk", info.triple, "--build-system", "native")
136136
}
137137

138138
buildSwiftAll.configure { dependsOn(task) }

hello-swift-java/hashing-lib/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ abis.each { abi, info ->
145145

146146
workingDir = layout.projectDirectory
147147
executable(getSwiftlyPath())
148-
args("run", "swift", "build", "+${swiftVersion}", "--swift-sdk", info.triple)
148+
args("run", "swift", "build", "+${swiftVersion}", "--swift-sdk", info.triple, "--build-system", "native")
149149
}
150150

151151
buildSwiftAll.configure { dependsOn(task) }
@@ -197,4 +197,4 @@ android {
197197
}
198198

199199
// Make sure we run our tasks before build
200-
preBuild.dependsOn(copyJniLibs)
200+
preBuild.dependsOn(copyJniLibs)

swift-android.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ fun createSwiftBuildTask(
140140
val defaultArgs = listOf(
141141
"run", "+${swiftVersion}", "swift", "build",
142142
"--swift-sdk", sdkName,
143+
"--build-system", "native", // old build system until we can sort out the output paths
143144
"-Xswiftc", "-static-stdlib",
144145
"-Xswiftc", "-resource-dir",
145146
"-Xswiftc", resourcesPath

swift-java-weather-app/weather-lib/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ abis.each { abi, info ->
147147

148148
// We must disable sandbox, because we use the `enableJavaCallbacks` feature
149149
// of swift-java.
150-
args("run", "swift", "build", "+${swiftVersion}", "--swift-sdk", info.triple, "--disable-sandbox")
150+
args("run", "swift", "build", "+${swiftVersion}", "--swift-sdk", info.triple, "--build-system", "native", "--disable-sandbox")
151151
}
152152

153153
buildSwiftAll.configure { dependsOn(task) }
@@ -199,4 +199,4 @@ android {
199199
}
200200

201201
// Make sure we run our tasks before build
202-
preBuild.dependsOn(copyJniLibs)
202+
preBuild.dependsOn(copyJniLibs)

0 commit comments

Comments
 (0)