Skip to content

Commit

Permalink
Add OversizeModels
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/ci-push.yml
  • Loading branch information
aromanov91 committed Oct 17, 2023
1 parent a74808e commit 0743507
Show file tree
Hide file tree
Showing 35 changed files with 99 additions and 87 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
app: Example
secrets: inherit

tests:
name: Test
needs: build-example
uses: oversizedev/GithubWorkflows/.github/workflows/test.yml@main
secrets: inherit
# tests:
# name: Test
# needs: build-example
# uses: oversizedev/GithubWorkflows/.github/workflows/test.yml@main
# secrets: inherit
28 changes: 14 additions & 14 deletions .github/workflows/ci-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,34 @@ on:

jobs:

build-example:
name: Build Example
uses: oversizedev/GithubWorkflows/.github/workflows/build-ios-app.yml@main
with:
folder: AppExample
app: Example
secrets: inherit

build-swiftpm:
name: Build SwiftPM
needs: build-example
uses: oversizedev/GithubWorkflows/.github/workflows/build-swiftpm.yml@main
strategy:
matrix:
packages: [OversizeKit]
with:
package: ${{ matrix.packages }}
secrets: inherit
tests:
name: Test

build-example:
name: Build Example
needs: build-swiftpm
uses: oversizedev/GithubWorkflows/.github/workflows/test.yml@main
uses: oversizedev/GithubWorkflows/.github/workflows/build-ios-app.yml@main
with:
folder: AppExample
app: Example
secrets: inherit

# tests:
# name: Test
# needs: build-example
# uses: oversizedev/GithubWorkflows/.github/workflows/test.yml@main
# secrets: inherit

bump:
name: Bump version
needs: tests
needs: build-example
uses: oversizedev/GithubWorkflows/.github/workflows/bump.yml@main
secrets: inherit

5 changes: 2 additions & 3 deletions AppExample/Example/ExampleApp.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Copyright © 2023 Alexander Romanov
// ExampleApp.swift, created on 25.09.2023
//
//

import Factory
import OversizeKit
Expand All @@ -11,12 +11,11 @@ import SwiftUI

@main
struct ExampleApp: App {

@Injected(\.appStateService) var appStateService: AppStateService
@ObservedObject private var router = Router()
@StateObject private var appSettingsViewModel = AppSettingsViewModel()
let pub = NotificationCenter.default.publisher(for: NSNotification.Name("Deeplink"))

var body: some Scene {
WindowGroup {
TabView(selection: $router.tab) {
Expand Down
2 changes: 1 addition & 1 deletion AppExample/Example/Router/Alerts.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Copyright © 2023 Alexander Romanov
// Alerts.swift, created on 25.09.2023
//
//

import OversizeLocalizable
import OversizeServices
Expand Down
3 changes: 1 addition & 2 deletions AppExample/Example/Router/Router.swift
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
//
// Copyright © 2023 Alexander Romanov
// Router.swift, created on 25.09.2023
//
//

import SwiftUI

@MainActor
final class Router: ObservableObject {

// Route and Tabs
@Published var mainPath: [Screen] = []
@Published var secondaryPath: [Screen] = []
Expand Down
2 changes: 1 addition & 1 deletion AppExample/Example/Router/Screens.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Copyright © 2023 Alexander Romanov
// Screens.swift, created on 25.09.2023
//
//

import OversizeComponents
import OversizeKit
Expand Down
4 changes: 2 additions & 2 deletions AppExample/Example/Router/Tabs.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Copyright © 2023 Alexander Romanov
// Tabs.swift, created on 25.09.2023
//
//

import SwiftUI

Expand Down Expand Up @@ -41,7 +41,7 @@ public enum RootTab: String {
return "Settings"
}
}

var image: Image {
switch self {
case .main:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Copyright © 2023 Alexander Romanov
// AppSettingsPageView.swift, created on 25.09.2023
//
//

import OversizeUI
import SwiftUI
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Copyright © 2023 Alexander Romanov
// AppSettingsPageViewModel.swift, created on 25.09.2023
//
//

import SwiftUI

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Copyright © 2023 Alexander Romanov
// AppSettingsView.swift, created on 25.09.2023
//
//

import OversizeUI
import SwiftUI
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Copyright © 2023 Alexander Romanov
// AppSettingsViewModel.swift, created on 25.09.2023
//
//

import Foundation
import SwiftUI
Expand Down
4 changes: 1 addition & 3 deletions AppExample/Example/Screens/Main/MainView.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Copyright © 2023 Alexander Romanov
// MainView.swift, created on 25.09.2023
//
//

import Factory
import OversizeKit
Expand All @@ -11,7 +11,6 @@ import OversizeUI
import SwiftUI

struct MainView: View {

@Injected(\.appStateService) var appStateService: AppStateService
@Environment(\.screenSize) var screenSize
@EnvironmentObject var router: Router
Expand All @@ -25,7 +24,6 @@ struct MainView: View {
var body: some View {
Text("Hello, Oversize Kit!")
}

}

struct MainView_Previews: PreviewProvider {
Expand Down
6 changes: 2 additions & 4 deletions AppExample/Example/Screens/Main/MainViewModel.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
//
// Copyright © 2023 Alexander Romanov
// MainViewModel.swift, created on 25.09.2023
//
//

import SwiftUI

@MainActor
class MainViewModel: ObservableObject {

}
class MainViewModel: ObservableObject {}
4 changes: 2 additions & 2 deletions AppExample/Example/Screens/Onboarding/OnboardingView.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//
// Copyright © 2023 Alexander Romanov
// OnboardingView.swift, created on 25.09.2023
//
//

import Factory
import OversizeServices
import OversizeUI
import SwiftUI
import Factory

struct OnboardingView: View {
@Injected(\.appStateService) var appStateService: AppStateService
Expand Down
22 changes: 14 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,37 @@

import PackageDescription

let productionDependencies: [PackageDescription.Package.Dependency] = { [
let productionDependencies: [PackageDescription.Package.Dependency] = [
.package(url: "https://github.com/oversizedev/OversizeUI.git", .upToNextMajor(from: "3.0.2")),
.package(url: "https://github.com/oversizedev/OversizeCore.git", .upToNextMajor(from: "1.3.0")),
.package(url: "https://github.com/oversizedev/OversizeServices.git", .upToNextMajor(from: "1.4.0")),
.package(url: "https://github.com/oversizedev/OversizeLocalizable.git", .upToNextMajor(from: "1.4.0")),
.package(url: "https://github.com/oversizedev/OversizeComponents.git", .upToNextMajor(from: "1.2.0")),
.package(url: "https://github.com/oversizedev/OversizeResources.git", .upToNextMajor(from: "2.0.0")),
.package(url: "https://github.com/oversizedev/OversizeNetwork.git", .upToNextMajor(from: "0.4.0")),
.package(url: "https://github.com/oversizedev/OversizeModels.git", .upToNextMajor(from: "0.1.0")),
.package(url: "https://github.com/hmlongco/Factory.git", .upToNextMajor(from: "2.1.3")),
.package(url: "https://github.com/lorenzofiamingo/swiftui-cached-async-image.git", .upToNextMajor(from: "2.1.1")),
.package(url: "https://github.com/oversizedev/OversizeNetwork.git", .upToNextMajor(from: "0.4.0"))
] }()
]

let developmentDependencies: [PackageDescription.Package.Dependency] = { [
let developmentDependencies: [PackageDescription.Package.Dependency] = [
.package(name: "OversizeUI", path: "../OversizeUI"),
.package(name: "OversizeServices", path: "../OversizeServices"),
.package(name: "OversizeLocalizable", path: "../OversizeLocalizable"),
.package(name: "OversizeCore", path: "../OversizeCore"),
.package(name: "OversizeComponents", path: "../OversizeComponents"),
.package(name: "OversizeResources", path: "../OversizeResources"),
.package(name: "OversizeNetwork", path: "../OversizeNetwork"),
.package(name: "OversizeModels", path: "../OversizeModels"),
.package(url: "https://github.com/lorenzofiamingo/swiftui-cached-async-image.git", .upToNextMajor(from: "2.1.1")),
.package(url: "https://github.com/hmlongco/Factory.git", .upToNextMajor(from: "2.1.3")),
] }()
]

let package = Package(
name: "OversizeKit",
platforms: [
.iOS(.v15),
.macOS(.v12),
.macOS(.v13),
.tvOS(.v15),
.watchOS(.v9),
],
Expand Down Expand Up @@ -59,6 +61,7 @@ let package = Package(
.product(name: "OversizeLocalizable", package: "OversizeLocalizable"),
.product(name: "OversizeResources", package: "OversizeResources"),
.product(name: "OversizeNotificationService", package: "OversizeServices"),
.product(name: "OversizeModels", package: "OversizeModels"),
.product(name: "OversizeNetwork", package: "OversizeNetwork"),
.product(name: "Factory", package: "Factory"),
.product(name: "CachedAsyncImage", package: "swiftui-cached-async-image"),
Expand All @@ -74,6 +77,7 @@ let package = Package(
.product(name: "CachedAsyncImage", package: "swiftui-cached-async-image"),
.product(name: "OversizeCore", package: "OversizeCore"),
.product(name: "OversizeNetwork", package: "OversizeNetwork"),
.product(name: "OversizeModels", package: "OversizeModels"),
]
),
.target(
Expand All @@ -86,6 +90,7 @@ let package = Package(
.product(name: "OversizeCalendarService", package: "OversizeServices"),
.product(name: "OversizeLocationService", package: "OversizeServices"),
.product(name: "Factory", package: "Factory"),
.product(name: "OversizeModels", package: "OversizeModels"),
]
),
.target(
Expand All @@ -97,15 +102,16 @@ let package = Package(
.product(name: "OversizeContactsService", package: "OversizeServices"),
.product(name: "OversizeCalendarService", package: "OversizeServices"),
.product(name: "Factory", package: "Factory"),
.product(name: "OversizeModels", package: "OversizeModels"),
]
),
.target(
name: "OversizeLocationKit",
dependencies: [
.product(name: "OversizeUI", package: "OversizeUI"),
.product(name: "OversizeServices", package: "OversizeServices"),
.product(name: "OversizeLocationService", package: "OversizeServices"),
.product(name: "Factory", package: "Factory"),
.product(name: "OversizeModels", package: "OversizeModels"),
]
),
.target(
Expand All @@ -130,7 +136,7 @@ let package = Package(
dependencies: [
"OversizeKit",
.product(name: "OversizeUI", package: "OversizeUI"),
.product(name: "OversizeServices", package: "OversizeServices"),
.product(name: "OversizeModels", package: "OversizeModels"),
.product(name: "OversizeNotificationService", package: "OversizeServices"),
.product(name: "Factory", package: "Factory"),
]
Expand Down
3 changes: 2 additions & 1 deletion Sources/OversizeAdsKit/AdView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import CachedAsyncImage
import OversizeCore
import OversizeKit
import OversizeModels
import OversizeNetwork
import OversizeServices
import OversizeUI
Expand All @@ -30,7 +31,7 @@ public struct AdView: View {
await viewModel.fetchAd()
}
}
case let .result(appAd) :
case let .result(appAd):
#if os(iOS)
Surface {
isShowProduct.toggle()
Expand Down
1 change: 1 addition & 0 deletions Sources/OversizeAdsKit/AdViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
//

import Factory
import OversizeModels
import OversizeNetwork
import OversizeServices
import SwiftUI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import OversizeCalendarService
import OversizeComponents
import OversizeCore
import OversizeLocalizable
import OversizeServices
import OversizeModels
import OversizeUI
import SwiftUI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Factory
import OversizeCalendarService
import OversizeCore
import OversizeLocationService
import OversizeServices
import OversizeModels
import SwiftUI

public enum CreateEventType: Equatable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import OversizeContactsService
import OversizeCore
import OversizeKit
import OversizeLocalizable
import OversizeServices
import OversizeUI
import SwiftUI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import EventKit
import Factory
import OversizeContactsService
import OversizeCore
import OversizeServices
import OversizeModels
import SwiftUI

@MainActor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import OversizeComponents
import OversizeCore
import OversizeKit
import OversizeLocalizable
import OversizeServices
import OversizeUI
import SwiftUI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Contacts
import Factory
import OversizeContactsService
import OversizeCore
import OversizeServices
import OversizeModels
import SwiftUI

@MainActor
Expand Down
Loading

0 comments on commit 0743507

Please sign in to comment.