Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add XCLocalSwiftPackageReference Support #799

Merged
merged 21 commits into from
Oct 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased

## 8.15.1

### Added

- Added XCLocalSwiftPackageReference Support (#799)[https:/tuist/XcodeProj/pull/799] by [@art-divin](https:/art-divin).

## 8.15.0

### Added
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
/.build
/Packages
/*.xcodeproj
31 changes: 31 additions & 0 deletions Fixtures/iOS/MyOtherLocalPackage/MyOtherLocalPackage/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "MyOtherLocalPackage",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "MyOtherLocalPackage",
targets: ["MyOtherLocalPackage"]
),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "MyOtherLocalPackage",
dependencies: []
),
.testTarget(
name: "MyOtherLocalPackageTests",
dependencies: ["MyOtherLocalPackage"]
),
]
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# MyLocalPackage

A description of this package.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
struct MyOtherLocalPackage {
var text = "Hello, World!"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import XCTest

import MyLocalPackageTests

var tests = [XCTestCaseEntry]()
tests += MyLocalPackageTests.allTests()
XCTMain(tests)
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import XCTest
@testable import MyOtherLocalPackage

final class MyLocalPackageTests: XCTestCase {
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct
// results.
XCTAssertEqual(MyOtherLocalPackage().text, "Hello, World!")
}

static var allTests = [
("testExample", testExample),
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import XCTest

#if !canImport(ObjectiveC)
public func allTests() -> [XCTestCaseEntry] {
[
testCase(MyLocalPackageTests.allTests),
]
}
#endif
Loading
Loading