Moves swift package to root of repository so it can be used directly … (#7548)

* Moves swift package to root of repository so it can be used directly from the main repo

Fixing paths for swift directory

* Update swift readme
This commit is contained in:
mustiikhalil
2022-09-27 23:32:05 +02:00
committed by GitHub
parent 76ddae006f
commit dadbff5714
7 changed files with 9 additions and 11 deletions

View File

@@ -11,11 +11,11 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/google/flatbuffers' s.homepage = 'https://github.com/google/flatbuffers'
s.license = { :type => 'Apache2.0', :file => 'LICENSE' } s.license = { :type => 'Apache2.0', :file => 'LICENSE' }
s.author = { 'mustii' => 'mustii@mmk.one' } s.author = { 'mustii' => 'mustii@mmk.one' }
s.source = { :git => 'https://github.com/mustiikhalil/flatbuffers.git', :tag => s.version.to_s, :submodules => true } s.source = { :git => 'https://github.com/google/flatbuffers.git', :tag => s.version.to_s, :submodules => true }
s.ios.deployment_target = '11.0' s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.14' s.osx.deployment_target = '10.14'
s.swift_version = '5.0' s.swift_version = '5.0'
s.source_files = 'Sources/Flatbuffers/*.swift' s.source_files = 'swift/Sources/Flatbuffers/*.swift'
end end

View File

@@ -32,5 +32,6 @@ let package = Package(
.target( .target(
name: "FlatBuffers", name: "FlatBuffers",
dependencies: [], dependencies: [],
path: "swift/Sources",
exclude: ["Documentation.docc/Resources/code/swift"]), exclude: ["Documentation.docc/Resources/code/swift"]),
]) ])

View File

@@ -31,6 +31,7 @@ let package = Package(
targets: [ targets: [
.target( .target(
name: "FlatBuffers", name: "FlatBuffers",
dependencies: []), dependencies: [],
path: "swift/Sources")
]) ])

View File

@@ -1,15 +1,11 @@
FlatBuffers swift can be found in both SPM FlatBuffers swift can be found in both SPM
`.package(url: "https://github.com/mustiikhalil/flatbuffers.git", from: "X.Y.Z"),` `.package(url: "https://github.com/google/flatbuffers.git", from: "X.Y.Z"),`
and Cocoapods and Cocoapods
`pod 'FlatBuffers'` `pod 'FlatBuffers'`
### Notes
1- To report any error please use the main repository.
### Contribute ### Contribute
1- Always run `swift test --generate-linuxmain` whenever new test functions are added or removed 1- Always run `swift test --generate-linuxmain` whenever new test functions are added or removed

View File

@@ -23,7 +23,7 @@ let package = Package(
.macOS(.v10_14), .macOS(.v10_14),
], ],
dependencies: [ dependencies: [
.package(path: "../../../swift"), .package(path: "../../.."),
], ],
targets: [ targets: [
.target( .target(

View File

@@ -23,7 +23,7 @@ let package = Package(
.macOS(.v10_14), .macOS(.v10_14),
], ],
dependencies: [ dependencies: [
.package(path: "../../../swift"), .package(path: "../../.."),
.package(url: "https://github.com/google/swift-benchmark", from: "0.1.0"), .package(url: "https://github.com/google/swift-benchmark", from: "0.1.0"),
], ],
targets: [ targets: [

View File

@@ -24,7 +24,7 @@ let package = Package(
.macOS(.v10_14), .macOS(.v10_14),
], ],
dependencies: [ dependencies: [
.package(path: "../../../swift"), .package(path: "../../.."),
.package(url: "https://github.com/grpc/grpc-swift.git", from: "1.4.1"), .package(url: "https://github.com/grpc/grpc-swift.git", from: "1.4.1"),
], ],
targets: [ targets: [