Skip to content

Commit

Permalink
Extract macro into extra repo
Browse files Browse the repository at this point in the history
  • Loading branch information
r-dent committed Feb 28, 2024
1 parent 4e62cd3 commit d9b0837
Show file tree
Hide file tree
Showing 12 changed files with 64 additions and 436 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build-all-targets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ jobs:
- uses: actions/checkout@v4

- name: Build Simulator
run: set -o pipefail && xcodebuild -scheme StreamDeckSimulator -destination "platform=iOS Simulator,name=iPhone 15,OS=latest" | xcpretty
run: |
set -o pipefail && xcodebuild -scheme StreamDeckSimulator -destination "platform=iOS Simulator,name=iPad Air (5th generation),OS=latest" -skipMacroValidation | xcpretty
- name: Build Example
run: |
cd Example
set -o pipefail && xcodebuild -scheme "Example App" -destination "platform=iOS Simulator,name=iPhone 15,OS=latest" | xcpretty
set -o pipefail && xcodebuild -scheme "StreamDeckKitExample App" -destination "platform=iOS Simulator,name=iPad Air (5th generation),OS=latest" -skipMacroValidation | xcpretty
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Test StreamDeckKit
run: set -o pipefail && xcodebuild -scheme StreamDeckKit-Package test -destination "platform=iOS Simulator,name=iPhone 15,OS=latest" | xcpretty
run: set -o pipefail && xcodebuild -scheme StreamDeckKit-Package test -destination "platform=iOS Simulator,name=iPhone 15,OS=latest" -skipMacroValidation | xcpretty
32 changes: 30 additions & 2 deletions Example/StreamDeckKitExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
3073017E2B3DB96200C5F5B4 /* StreamDeckSimulator in Frameworks */ = {isa = PBXBuildFile; productRef = 3073017D2B3DB96200C5F5B4 /* StreamDeckSimulator */; };
307301822B3DBA7900C5F5B4 /* StreamDeckKit in Frameworks */ = {isa = PBXBuildFile; productRef = 307301812B3DBA7900C5F5B4 /* StreamDeckKit */; };
307301842B3DBA7900C5F5B4 /* StreamDeckSimulator in Frameworks */ = {isa = PBXBuildFile; productRef = 307301832B3DBA7900C5F5B4 /* StreamDeckSimulator */; };
30C0D5112B8DF55E0087E095 /* StreamDeckKit in Frameworks */ = {isa = PBXBuildFile; productRef = 30C0D5102B8DF55E0087E095 /* StreamDeckKit */; };
30C0D5132B8DF55E0087E095 /* StreamDeckSimulator in Frameworks */ = {isa = PBXBuildFile; productRef = 30C0D5122B8DF55E0087E095 /* StreamDeckSimulator */; };
30C0D5162B8E115F0087E095 /* StreamDeckKit in Frameworks */ = {isa = PBXBuildFile; productRef = 30C0D5152B8E115F0087E095 /* StreamDeckKit */; };
30C0D5182B8E115F0087E095 /* StreamDeckSimulator in Frameworks */ = {isa = PBXBuildFile; productRef = 30C0D5172B8E115F0087E095 /* StreamDeckSimulator */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -45,9 +49,13 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
30C0D5162B8E115F0087E095 /* StreamDeckKit in Frameworks */,
30C0D5132B8DF55E0087E095 /* StreamDeckSimulator in Frameworks */,
3073017E2B3DB96200C5F5B4 /* StreamDeckSimulator in Frameworks */,
30C0D5112B8DF55E0087E095 /* StreamDeckKit in Frameworks */,
307301822B3DBA7900C5F5B4 /* StreamDeckKit in Frameworks */,
307301842B3DBA7900C5F5B4 /* StreamDeckSimulator in Frameworks */,
30C0D5182B8E115F0087E095 /* StreamDeckSimulator in Frameworks */,
3073017C2B3DB96200C5F5B4 /* StreamDeckKit in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -137,6 +145,10 @@
3073017D2B3DB96200C5F5B4 /* StreamDeckSimulator */,
307301812B3DBA7900C5F5B4 /* StreamDeckKit */,
307301832B3DBA7900C5F5B4 /* StreamDeckSimulator */,
30C0D5102B8DF55E0087E095 /* StreamDeckKit */,
30C0D5122B8DF55E0087E095 /* StreamDeckSimulator */,
30C0D5152B8E115F0087E095 /* StreamDeckKit */,
30C0D5172B8E115F0087E095 /* StreamDeckSimulator */,
);
productName = "StreamDeckKit Example";
productReference = 307301692B3DB70000C5F5B4 /* StreamDeckKit StreamDeckKitExample.app */;
Expand Down Expand Up @@ -167,7 +179,7 @@
);
mainGroup = 307301602B3DB70000C5F5B4;
packageReferences = (
307301802B3DBA7900C5F5B4 /* XCLocalSwiftPackageReference ".." */,
30C0D5142B8E115F0087E095 /* XCLocalSwiftPackageReference ".." */,
);
productRefGroup = 3073016A2B3DB70000C5F5B4 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -442,7 +454,7 @@
/* End XCConfigurationList section */

/* Begin XCLocalSwiftPackageReference section */
307301802B3DBA7900C5F5B4 /* XCLocalSwiftPackageReference ".." */ = {
30C0D5142B8E115F0087E095 /* XCLocalSwiftPackageReference ".." */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ..;
};
Expand All @@ -465,6 +477,22 @@
isa = XCSwiftPackageProductDependency;
productName = StreamDeckSimulator;
};
30C0D5102B8DF55E0087E095 /* StreamDeckKit */ = {
isa = XCSwiftPackageProductDependency;
productName = StreamDeckKit;
};
30C0D5122B8DF55E0087E095 /* StreamDeckSimulator */ = {
isa = XCSwiftPackageProductDependency;
productName = StreamDeckSimulator;
};
30C0D5152B8E115F0087E095 /* StreamDeckKit */ = {
isa = XCSwiftPackageProductDependency;
productName = StreamDeckKit;
};
30C0D5172B8E115F0087E095 /* StreamDeckSimulator */ = {
isa = XCSwiftPackageProductDependency;
productName = StreamDeckSimulator;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 307301612B3DB70000C5F5B4 /* Project object */;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{
"pins" : [
{
"identity" : "streamdeck-kit-macros",
"kind" : "remoteSourceControl",
"location" : "https://github.com/elgatosf/streamdeck-kit-macros",
"state" : {
"branch" : "main",
"revision" : "0805b3efa7adfc8c88b59e9a1d8c4a90015a2460"
}
},
{
"identity" : "swift-syntax",
"kind" : "remoteSourceControl",
Expand Down
9 changes: 9 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{
"pins" : [
{
"identity" : "streamdeck-kit-macros",
"kind" : "remoteSourceControl",
"location" : "https://github.com/elgatosf/streamdeck-kit-macros",
"state" : {
"branch" : "main",
"revision" : "0805b3efa7adfc8c88b59e9a1d8c4a90015a2460"
}
},
{
"identity" : "swift-snapshot-testing",
"kind" : "remoteSourceControl",
Expand Down
22 changes: 8 additions & 14 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import CompilerPluginSupport

let package = Package(
name: "StreamDeckKit",
platforms: [.iOS(.v17), .macOS(.v10_15)],
platforms: [.iOS(.v17)],
products: [
.library(
name: "StreamDeckKit",
Expand All @@ -23,8 +23,8 @@ let package = Package(
from: "1.12.0"
),
.package(
url: "https://github.com/apple/swift-syntax.git",
from: "509.0.0"
url: "https://github.com/elgatosf/streamdeck-kit-macros",
branch: "main"
)
],
targets: [
Expand All @@ -35,27 +35,21 @@ let package = Package(
),
.target(
name: "StreamDeckKit",
dependencies: ["StreamDeckCApi", "StreamDeckMacros"]
dependencies: [
"StreamDeckCApi",
.product(name: "StreamDeckKitMacros", package: "streamdeck-kit-macros")
]
),
.target(
name: "StreamDeckCApi",
linkerSettings: [.linkedFramework("IOKit")]
),
.macro(
name: "StreamDeckMacros",
dependencies: [
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
.product(name: "SwiftCompilerPlugin", package: "swift-syntax")
]
),
.testTarget(
name: "StreamDeckSDKTests",
dependencies: [
"StreamDeckKit",
"StreamDeckMacros",
"StreamDeckSimulator",
.product(name: "SnapshotTesting", package: "swift-snapshot-testing"),
.product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax")
.product(name: "SnapshotTesting", package: "swift-snapshot-testing")
]
)
]
Expand Down
2 changes: 2 additions & 0 deletions Sources/StreamDeckKit/Layout/StreamDeckLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import Combine
import Foundation
import SwiftUI

@_exported import StreamDeckKitMacros

/// The basic view to build a layout for Stream Deck from.
///
/// Provide this to the `content` parameter of ``StreamDeckSession/setUp(stateHandler:newDeviceHandler:content:)`` or ``StreamDeck/render(_:)``
Expand Down
75 changes: 0 additions & 75 deletions Sources/StreamDeckKit/Layout/StreamDeckView.swift

This file was deleted.

Loading

0 comments on commit d9b0837

Please sign in to comment.