Skip to content

Commit 83b87aa

Browse files
committed
Fixes bazel breaking due to new project structure
1 parent 40708c5 commit 83b87aa

File tree

10 files changed

+18
-6
lines changed

10 files changed

+18
-6
lines changed

swift/BUILD.bazel

+14-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,20 @@ load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
22

33
swift_library(
44
name = "swift",
5-
srcs = glob(["Sources/FlatBuffers/*.swift"]),
5+
srcs = glob([
6+
"Sources/FlatBuffers/*.swift",
7+
"Sources/Common/*.swift"
8+
]),
69
module_name = "FlatBuffers",
710
visibility = ["//visibility:public"],
811
)
12+
13+
swift_library(
14+
name = "FlexBuffers",
15+
srcs = glob([
16+
"Sources/FlexBuffers/**/*.swift",
17+
"Sources/Common/*.swift"
18+
]),
19+
module_name = "FlexBuffers",
20+
visibility = ["//visibility:public"],
21+
)

swift/Sources/FlatBuffers/ByteBuffer.swift

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
import Common
1817
import Foundation
1918

2019
/// `ByteBuffer` is the interface that stores the data for a `Flatbuffers` object

swift/Sources/FlatBuffers/Constants.swift

+2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17+
#if canImport(Common)
1718
@_exported import Common
19+
#endif
1820
import Foundation
1921

2022
/// Type aliases

swift/Sources/FlatBuffers/FlatBufferBuilder.swift

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
import Common
1817
import Foundation
1918

2019
/// ``FlatBufferBuilder`` builds a `FlatBuffer` through manipulating its internal state.

swift/Sources/FlatBuffers/Table.swift

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
import Common
1817
import Foundation
1918

2019
/// `Table` is a Flatbuffers object that can read,

swift/Sources/FlexBuffers/Utils/Constants.swift

+2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17+
#if canImport(Common)
1718
@_exported import Common
19+
#endif
1820
import Foundation
1921

2022
extension UInt64 {

swift/Sources/FlexBuffers/Utils/Value.swift

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
import Common
1817
import Foundation
1918

2019
public struct Value: Equatable {

swift/Sources/FlexBuffers/_InternalByteBuffer.swift

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
import Common
1817
import Foundation
1918

2019
/// `ByteBuffer` is the interface that stores the data for a `Flatbuffers` object

0 commit comments

Comments
 (0)