Skip to content

Commit 4f6949d

Browse files
committed
Initial commit
0 parents  commit 4f6949d

File tree

26 files changed

+1476
-0
lines changed

26 files changed

+1476
-0
lines changed

.gitignore

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Xcode
2+
#
3+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4+
5+
## Build generated
6+
build/
7+
DerivedData/
8+
*.zip
9+
10+
# Release
11+
release/
12+
13+
## Various settings
14+
*.pbxuser
15+
!default.pbxuser
16+
*.mode1v3
17+
!default.mode1v3
18+
*.mode2v3
19+
!default.mode2v3
20+
*.perspectivev3
21+
!default.perspectivev3
22+
xcuserdata/
23+
24+
## Other
25+
*.moved-aside
26+
*.xccheckout
27+
*.xcscmblueprint
28+
29+
## Obj-C/Swift specific
30+
*.hmap
31+
*.ipa
32+
*.dSYM.zip
33+
*.dSYM
34+
35+
# CocoaPods
36+
#
37+
# We recommend against adding the Pods directory to your .gitignore. However
38+
# you should judge for yourself, the pros and cons are mentioned at:
39+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
40+
#
41+
Pods/
42+
43+
# Carthage
44+
#
45+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
46+
# Carthage/Checkouts
47+
48+
Carthage/Build
49+
50+
# fastlane
51+
#
52+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
53+
# screenshots whenever they are needed.
54+
# For more information about the recommended setup visit:
55+
# https://docs.fastlane.tools/best-practices/source-control/#source-control
56+
57+
fastlane/report.xml
58+
fastlane/Preview.html
59+
fastlane/screenshots
60+
fastlane/test_output
61+
62+
# Code Injection
63+
#
64+
# After new code Injection tools there's a generated folder /iOSInjectionProject
65+
# https://github.com/johnno1962/injectionforxcode
66+
67+
.DS_Store
68+
.swiftpm

InternalUtils/.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
xcuserdata/
5+
DerivedData/
6+
.swiftpm/configuration/registries.json
7+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
8+
.netrc

InternalUtils/Package.swift

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// swift-tools-version: 5.9
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "InternalUtils",
8+
products: [
9+
// Products define the executables and libraries a package produces, making them visible to other packages.
10+
.library(
11+
name: "InternalUtils",
12+
targets: ["InternalUtils"]),
13+
],
14+
targets: [
15+
// Targets are the basic building blocks of a package, defining a module or a test suite.
16+
// Targets can depend on other targets in this package and products from dependencies.
17+
.target(
18+
name: "InternalUtils"
19+
),
20+
]
21+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// The Swift Programming Language
2+
// https://docs.swift.org/swift-book
3+
4+
public struct Utils {
5+
6+
public static let code = "InternalUtils"
7+
}

PackageA/.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
xcuserdata/
5+
DerivedData/
6+
.swiftpm/configuration/registries.json
7+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
8+
.netrc

PackageA/Package.swift

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// swift-tools-version: 5.9
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "PackageA",
8+
products: [
9+
// Products define the executables and libraries a package produces, making them visible to other packages.
10+
.library(
11+
name: "PackageA",
12+
targets: ["PackageA"]
13+
),
14+
],
15+
dependencies: [
16+
.package(
17+
name: "InternalUtils",
18+
path: "../InternalUtils"
19+
)
20+
],
21+
targets: [
22+
// Targets are the basic building blocks of a package, defining a module or a test suite.
23+
// Targets can depend on other targets in this package and products from dependencies.
24+
.target(
25+
name: "PackageA",
26+
dependencies: ["InternalUtils"]
27+
),
28+
]
29+
)
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// The Swift Programming Language
2+
// https://docs.swift.org/swift-book
3+
4+
@_implementationOnly import InternalUtils
5+
6+
public class StructA {
7+
8+
public static let code = "PackageA with \(Utils.code)"
9+
}

PackageB/.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
xcuserdata/
5+
DerivedData/
6+
.swiftpm/configuration/registries.json
7+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
8+
.netrc

PackageB/Package.swift

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// swift-tools-version: 5.9
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "PackageB",
8+
products: [
9+
// Products define the executables and libraries a package produces, making them visible to other packages.
10+
.library(
11+
name: "PackageB",
12+
targets: ["PackageB"]),
13+
],
14+
dependencies: [
15+
.package(
16+
name: "InternalUtils",
17+
path: "../InternalUtils"
18+
),
19+
.package(
20+
url: "https://github.com/jzwc/external-package.git",
21+
branch: "main"
22+
)
23+
],
24+
targets: [
25+
// Targets are the basic building blocks of a package, defining a module or a test suite.
26+
// Targets can depend on other targets in this package and products from dependencies.
27+
.target(
28+
name: "PackageB",
29+
dependencies: [
30+
"InternalUtils",
31+
.product(name: "ExternalPackage", package: "external-package")
32+
]
33+
),
34+
]
35+
)
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// The Swift Programming Language
2+
// https://docs.swift.org/swift-book
3+
4+
@_implementationOnly import InternalUtils
5+
@_implementationOnly import ExternalPackage
6+
7+
public struct StructB {
8+
9+
public static let code = "PackageB with \(Utils.code) + \(ExternalLibrary.code)"
10+
}

0 commit comments

Comments
 (0)