Skip to content

Commit

Permalink
Add SwiftGen plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
aromanov91 committed Oct 1, 2023
1 parent 736f1a1 commit 4c9b98d
Show file tree
Hide file tree
Showing 19 changed files with 145 additions and 1,042 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ env:
WATCHSCHEME: Example

jobs:

build-package:

runs-on: macOS-13

name: Package build

steps:
- uses: actions/checkout@v3
- name: Select Xcode
run: sudo xcode-select -switch /Applications/Xcode_15.0.app && /usr/bin/xcodebuild -version

- name: Build and run tests
run: xcodebuild clean build -scheme Example -destination 'platform=iOS Simulator,name=iPhone 14 Pro,OS=16.4' | xcpretty && exit ${PIPESTATUS[0]}

example:
name: Run examples
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ xcuserdata/
DerivedData/
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
/.idea/
/Package.resolved
10 changes: 7 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ let package = Package(
products: [
.library(name: "OversizeUI", targets: ["OversizeUI"]),
],
dependencies: [],
dependencies: [
.package(url: "https://github.com/SwiftGen/SwiftGenPlugin", from: "6.6.2"),
],
targets: [
.target(
name: "OversizeUI",
dependencies: [],
resources: [.process("Resources")]
// swiftSettings: [.define("ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS")]
resources: [.process("Resources")],
plugins: [
.plugin(name: "SwiftGenPlugin", package: "SwiftGenPlugin"),
]
),
.testTarget(name: "OversizeUITests", dependencies: ["OversizeUI"]),
]
Expand Down
31 changes: 0 additions & 31 deletions Scripts/swiftgen.yml

This file was deleted.

6 changes: 4 additions & 2 deletions Sources/OversizeUI/Controls/Avatar/Avatar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public struct Avatar: View {
return .subheadline
case .regular:
return .title3
case .large:
case .large, .extraLarge:
return .largeTitle
@unknown default:
return .title2
Expand All @@ -177,7 +177,7 @@ public struct Avatar: View {
return 1
case .regular:
return 2
case .large:
case .large, .extraLarge:
return 2
@unknown default:
return 0
Expand All @@ -195,6 +195,8 @@ public struct Avatar: View {
return Space.xLarge.rawValue
case .large:
return Space.xxxLarge.rawValue
case .extraLarge:
return 128
@unknown default:
return Space.xLarge.rawValue
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/OversizeUI/Controls/Button/Button.swift
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public struct OversizeButtonStyle: ButtonStyle {
return .small
case .regular:
return .small
case .large:
case .large, .extraLarge:
return .medium
@unknown default:
return .zero
Expand All @@ -164,7 +164,7 @@ public struct OversizeButtonStyle: ButtonStyle {
return .xxSmall
case .regular:
return .small
case .large:
case .large, .extraLarge:
return .medium
@unknown default:
return .zero
Expand Down
Loading

0 comments on commit 4c9b98d

Please sign in to comment.