├── wearOS
├── .gitignore
├── src
│ └── main
│ │ ├── res
│ │ ├── values-round
│ │ │ └── strings.xml
│ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.webp
│ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.webp
│ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.webp
│ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.webp
│ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.webp
│ │ ├── values
│ │ │ ├── themes.xml
│ │ │ ├── strings.xml
│ │ │ └── dimens.xml
│ │ └── layout
│ │ │ └── activity_main.xml
│ │ ├── java
│ │ └── com
│ │ │ └── baseio
│ │ │ └── wearos
│ │ │ ├── ui
│ │ │ └── theme
│ │ │ │ ├── Color.kt
│ │ │ │ ├── Shape.kt
│ │ │ │ ├── Type.kt
│ │ │ │ └── Theme.kt
│ │ │ ├── PraxisApp.kt
│ │ │ ├── TrendingReposUI.kt
│ │ │ ├── TrendingReposVM.kt
│ │ │ └── TrendingReposListScreen.kt
│ │ └── AndroidManifest.xml
├── proguard-rules.pro
└── build.gradle.kts
├── iosApp
├── .gitignore
├── iosApp
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ ├── iOSApp.swift
│ ├── AppDelegate.swift
│ ├── Info.plist
│ └── CalendarView.swift
├── Podfile
├── iosApp.xcworkspace
│ ├── xcuserdata
│ │ └── anmolverma.xcuserdatad
│ │ │ ├── UserInterfaceState.xcuserstate
│ │ │ └── WorkspaceSettings.xcsettings
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── WorkspaceSettings.xcsettings
│ │ └── IDEWorkspaceChecks.plist
└── iosApp.xcodeproj
│ ├── xcuserdata
│ └── anmolverma.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
│ └── project.pbxproj
├── macOS
├── .gitignore
├── Podfile
├── macOS
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ ├── macOSApp.swift
│ ├── ContentView.swift
│ └── macOS.entitlements
├── macOS.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcuserdata
│ │ │ └── anmolverma.xcuserdatad
│ │ │ │ └── UserInterfaceState.xcuserstate
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── xcuserdata
│ │ └── anmolverma.xcuserdatad
│ │ │ └── xcschemes
│ │ │ └── xcschememanagement.plist
│ └── project.pbxproj
├── macOS.xcworkspace
│ ├── xcuserdata
│ │ └── anmolverma.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── macOSUITests
│ ├── macOSUITestsLaunchTests.swift
│ └── macOSUITests.swift
└── macOSTests
│ └── macOSTests.swift
├── watchApp
├── .gitignore
├── Podfile
├── watchApp WatchKit App
│ └── Assets.xcassets
│ │ ├── Contents.json
│ │ ├── AccentColor.colorset
│ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ └── Contents.json
├── watchApp WatchKit Extension
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ └── Complication.complicationset
│ │ │ ├── Graphic Bezel.imageset
│ │ │ └── Contents.json
│ │ │ ├── Graphic Corner.imageset
│ │ │ └── Contents.json
│ │ │ ├── Graphic Circular.imageset
│ │ │ └── Contents.json
│ │ │ ├── Graphic Large Rectangular.imageset
│ │ │ └── Contents.json
│ │ │ ├── Circular.imageset
│ │ │ └── Contents.json
│ │ │ ├── Modular.imageset
│ │ │ └── Contents.json
│ │ │ ├── Extra Large.imageset
│ │ │ └── Contents.json
│ │ │ ├── Utilitarian.imageset
│ │ │ └── Contents.json
│ │ │ ├── Graphic Extra Large.imageset
│ │ │ └── Contents.json
│ │ │ └── Contents.json
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ ├── NotificationView.swift
│ ├── Info.plist
│ ├── githubtrending
│ │ ├── UiRepo.swift
│ │ ├── GithubTrendingVM.swift
│ │ └── GithubTrendingUI.swift
│ ├── watchAppApp.swift
│ ├── PushNotificationPayload.apns
│ ├── NotificationController.swift
│ └── ComplicationController.swift
├── watchApp.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcuserdata
│ │ │ └── anmolverma.xcuserdatad
│ │ │ │ └── UserInterfaceState.xcuserstate
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ │ └── anmolverma.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── watchApp.xcworkspace
│ ├── xcuserdata
│ │ └── anmolverma.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── watchAppUITests
│ ├── watchAppUITestsLaunchTests.swift
│ └── watchAppUITests.swift
└── watchAppTests
│ └── watchAppTests.swift
├── art
├── art1.png
├── art2.png
├── art3.png
├── art4.png
├── art5.png
└── art6.png
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── shared
├── src
│ ├── androidMain
│ │ ├── AndroidManifest.xml
│ │ └── kotlin
│ │ │ └── com
│ │ │ └── baseio
│ │ │ └── kmm
│ │ │ ├── di
│ │ │ └── platformActual.kt
│ │ │ └── db
│ │ │ └── DriverFactory.kt
│ ├── commonMain
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── baseio
│ │ │ │ └── kmm
│ │ │ │ ├── calendar
│ │ │ │ ├── JetCalendarType.kt
│ │ │ │ ├── JetDay.kt
│ │ │ │ ├── JetYear.kt
│ │ │ │ ├── JetWeek.kt
│ │ │ │ └── JetMonth.kt
│ │ │ │ ├── db
│ │ │ │ └── DriverFactory.kt
│ │ │ │ ├── di
│ │ │ │ └── Koin.kt
│ │ │ │ └── mvm
│ │ │ │ └── PraxisDataModel.kt
│ │ └── sqldelight
│ │ │ └── db
│ │ │ └── BaseIoDB.sq
│ ├── macosArm64Main
│ │ └── kotlin
│ │ │ └── com
│ │ │ └── baseio
│ │ │ └── kmm
│ │ │ ├── di
│ │ │ └── Koin.kt
│ │ │ └── db
│ │ │ └── DriverFactory.kt
│ ├── jsMain
│ │ └── kotlin
│ │ │ └── com
│ │ │ └── baseio
│ │ │ └── kmm
│ │ │ ├── di
│ │ │ └── Koin.kt
│ │ │ └── db
│ │ │ └── DriverFactory.kt
│ ├── iosMain
│ │ └── kotlin
│ │ │ └── com
│ │ │ └── baseio
│ │ │ └── kmm
│ │ │ ├── di
│ │ │ └── Koin.kt
│ │ │ └── db
│ │ │ └── DriverFactory.kt
│ └── macosX64Main
│ │ └── kotlin
│ │ └── com
│ │ └── baseio
│ │ └── kmm
│ │ ├── di
│ │ └── Koin.kt
│ │ └── db
│ │ └── DriverFactory.kt
├── shared.podspec
└── build.gradle.kts
├── androidApp
├── src
│ └── main
│ │ ├── res
│ │ ├── drawable
│ │ │ ├── app_widget_preview.png
│ │ │ ├── ic_arrow_right.xml
│ │ │ └── ic_refresh.xml
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ ├── colors.xml
│ │ │ ├── styles.xml
│ │ │ └── themes.xml
│ │ ├── layout
│ │ │ ├── widget_loading.xml
│ │ │ └── activity_main.xml
│ │ └── xml
│ │ │ └── trending_repos_widget_info.xml
│ │ ├── java
│ │ └── com
│ │ │ └── baseio
│ │ │ └── kmm
│ │ │ └── android
│ │ │ ├── ui
│ │ │ └── theme
│ │ │ │ ├── Shape.kt
│ │ │ │ ├── Type.kt
│ │ │ │ ├── Color.kt
│ │ │ │ ├── PraxisSurface.kt
│ │ │ │ ├── SystemUiController.kt
│ │ │ │ └── Theme.kt
│ │ │ ├── MainActivity.kt
│ │ │ └── YearView.kt
│ │ └── AndroidManifest.xml
└── build.gradle.kts
├── .gitignore
├── webApp
├── src
│ └── jsMain
│ │ ├── kotlin
│ │ ├── calendar
│ │ │ └── JsJodaTimeZoneModule.kt
│ │ ├── Client.kt
│ │ └── TrendingUI.kt
│ │ └── resources
│ │ └── index.html
├── webpack.config.d
│ └── sqljs.js
└── build.gradle.kts
├── settings.gradle.kts
├── gradle.properties
├── README.md
├── gradlew.bat
└── gradlew
/wearOS/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/iosApp/.gitignore:
--------------------------------------------------------------------------------
1 | Pods
2 | Podfile.lock
--------------------------------------------------------------------------------
/macOS/.gitignore:
--------------------------------------------------------------------------------
1 | Pods
2 | Podfile.lock
--------------------------------------------------------------------------------
/watchApp/.gitignore:
--------------------------------------------------------------------------------
1 | Pods
2 | Podfile.lock
--------------------------------------------------------------------------------
/art/art1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oianmol/kmpcalendar/master/art/art1.png
--------------------------------------------------------------------------------
/art/art2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oianmol/kmpcalendar/master/art/art2.png
--------------------------------------------------------------------------------
/art/art3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oianmol/kmpcalendar/master/art/art3.png
--------------------------------------------------------------------------------
/art/art4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oianmol/kmpcalendar/master/art/art4.png
--------------------------------------------------------------------------------
/art/art5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oianmol/kmpcalendar/master/art/art5.png
--------------------------------------------------------------------------------
/art/art6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oianmol/kmpcalendar/master/art/art6.png
--------------------------------------------------------------------------------
/macOS/Podfile:
--------------------------------------------------------------------------------
1 | target 'macOS' do
2 | use_modular_headers!
3 | pod 'shared', :path => '../shared'
4 | end
5 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oianmol/kmpcalendar/master/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/shared/src/androidMain/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/iosApp/iosApp/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
--------------------------------------------------------------------------------
/macOS/macOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/baseio/kmm/calendar/JetCalendarType.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.calendar
2 |
3 | open class JetCalendarType
--------------------------------------------------------------------------------
/watchApp/Podfile:
--------------------------------------------------------------------------------
1 | target 'watchApp WatchKit Extension' do
2 | use_modular_headers!
3 | pod 'shared', :path => '../shared'
4 | end
5 |
--------------------------------------------------------------------------------
/wearOS/src/main/res/values-round/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Hello Round World!
3 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit App/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/iosApp/iosApp/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
--------------------------------------------------------------------------------
/macOS/macOS/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/wearOS/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oianmol/kmpcalendar/master/wearOS/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/wearOS/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oianmol/kmpcalendar/master/wearOS/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/wearOS/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oianmol/kmpcalendar/master/wearOS/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/wearOS/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oianmol/kmpcalendar/master/wearOS/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/wearOS/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oianmol/kmpcalendar/master/wearOS/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/androidApp/src/main/res/drawable/app_widget_preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oianmol/kmpcalendar/master/androidApp/src/main/res/drawable/app_widget_preview.png
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | .idea
5 | .DS_Store
6 | /build
7 | */build
8 | /captures
9 | .externalNativeBuild
10 | .cxx
11 | local.properties
12 | kotlin-js-store
--------------------------------------------------------------------------------
/iosApp/Podfile:
--------------------------------------------------------------------------------
1 | target 'iosApp' do
2 | use_frameworks!
3 | platform :ios, '14.1'
4 | pod 'shared', :path => '../shared'
5 | pod 'KMPNativeCoroutinesCombine'
6 | pod 'SDWebImageSwiftUI'
7 | end
8 |
--------------------------------------------------------------------------------
/androidApp/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | TrendingReposUI
3 | Trending Github Repos
4 |
--------------------------------------------------------------------------------
/webApp/src/jsMain/kotlin/calendar/JsJodaTimeZoneModule.kt:
--------------------------------------------------------------------------------
1 | package calendar
2 |
3 | @JsModule("@js-joda/timezone")
4 | @JsNonModule
5 | external object JsJodaTimeZoneModule
6 |
7 | private val jsJodaTz = JsJodaTimeZoneModule
--------------------------------------------------------------------------------
/macOS/macOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/macOS/macOS.xcworkspace/xcuserdata/anmolverma.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oianmol/kmpcalendar/master/macOS/macOS.xcworkspace/xcuserdata/anmolverma.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/baseio/kmm/calendar/JetDay.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.calendar
2 |
3 | import kotlinx.datetime.LocalDate
4 |
5 | data class JetDay(val date: LocalDate, val isPartOfMonth: Boolean) : JetCalendarType()
--------------------------------------------------------------------------------
/iosApp/iosApp.xcworkspace/xcuserdata/anmolverma.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oianmol/kmpcalendar/master/iosApp/iosApp.xcworkspace/xcuserdata/anmolverma.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/iosApp/iosApp/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
--------------------------------------------------------------------------------
/watchApp/watchApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/wearOS/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/macOS/macOS/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/watchApp/watchApp.xcworkspace/xcuserdata/anmolverma.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oianmol/kmpcalendar/master/watchApp/watchApp.xcworkspace/xcuserdata/anmolverma.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit App/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/androidApp/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #6200EE
4 | #3700B3
5 | #03DAC5
6 |
--------------------------------------------------------------------------------
/macOS/macOS.xcodeproj/project.xcworkspace/xcuserdata/anmolverma.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oianmol/kmpcalendar/master/macOS/macOS.xcodeproj/project.xcworkspace/xcuserdata/anmolverma.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/iosApp/iosApp/iOSApp.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | @main
4 | struct iOSApp: App {
5 | @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
6 |
7 | var body: some Scene {
8 | WindowGroup {
9 | CalendarView()
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/baseio/kmm/db/DriverFactory.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.db
2 |
3 | import com.squareup.sqldelight.db.SqlDriver
4 |
5 | expect class DriverFactory {
6 | fun createDriver(): SqlDriver
7 | suspend fun createDriverBlocking(): SqlDriver
8 | }
9 |
--------------------------------------------------------------------------------
/webApp/src/jsMain/resources/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | JS Client
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/watchApp/watchApp.xcodeproj/project.xcworkspace/xcuserdata/anmolverma.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oianmol/kmpcalendar/master/watchApp/watchApp.xcodeproj/project.xcworkspace/xcuserdata/anmolverma.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 27 14:55:40 IST 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/wearOS/src/main/java/com/baseio/wearos/ui/theme/Color.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.wearos.ui.theme
2 |
3 | import androidx.compose.ui.graphics.Color
4 |
5 | val Purple200 = Color(0xFFBB86FC)
6 | val Purple500 = Color(0xFF6200EE)
7 | val Purple700 = Color(0xFF3700B3)
8 | val Teal200 = Color(0xFF03DAC5)
--------------------------------------------------------------------------------
/macOS/macOS.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/baseio/kmm/di/Koin.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.di
2 |
3 | import org.koin.core.context.startKoin
4 | import org.koin.core.module.Module
5 |
6 | expect fun platformModule(): Module
7 |
8 | fun initSharedDependencies() = startKoin {
9 | modules(platformModule())
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/iosApp/iosApp.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/iosApp/iosApp.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/iosApp/iosApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/macOS/macOS.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/watchApp/watchApp.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | google()
4 | gradlePluginPortal()
5 | mavenCentral()
6 | }
7 | }
8 |
9 | rootProject.name = "BaseiOKMM"
10 | include(":androidApp")
11 | include(":shared")
12 | include(":watchApp")
13 | include(":wearOS")
14 | include(":webApp")
15 |
--------------------------------------------------------------------------------
/watchApp/watchApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/macOS/macOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/watchApp/watchApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/androidApp/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/shared/src/macosArm64Main/kotlin/com/baseio/kmm/di/Koin.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.di
2 |
3 | import com.baseio.kmm.db.DriverFactory
4 | import org.koin.dsl.module
5 | import io.ktor.client.engine.ios.*
6 |
7 | actual fun platformModule() = module {
8 | single { Ios.create() }
9 | single {
10 | DriverFactory().createDriver()
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/shared/src/androidMain/kotlin/com/baseio/kmm/di/platformActual.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.di
2 |
3 | import com.baseio.kmm.db.DriverFactory
4 | import org.koin.dsl.module
5 | import io.ktor.client.engine.android.*
6 |
7 | actual fun platformModule() = module {
8 | single { Android.create() }
9 | single {
10 | DriverFactory(get()).createDriver()
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/wearOS/src/main/java/com/baseio/wearos/ui/theme/Shape.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.wearos.ui.theme
2 |
3 | import androidx.compose.foundation.shape.RoundedCornerShape
4 | import androidx.compose.material.Shapes
5 | import androidx.compose.ui.unit.dp
6 |
7 | val Shapes = Shapes(
8 | small = RoundedCornerShape(4.dp),
9 | medium = RoundedCornerShape(4.dp),
10 | large = RoundedCornerShape(0.dp)
11 | )
--------------------------------------------------------------------------------
/androidApp/src/main/java/com/baseio/kmm/android/ui/theme/Shape.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.android.ui.theme
2 |
3 | import androidx.compose.foundation.shape.RoundedCornerShape
4 | import androidx.compose.material.Shapes
5 | import androidx.compose.ui.unit.dp
6 |
7 | val Shapes = Shapes(
8 | small = RoundedCornerShape(4.dp),
9 | medium = RoundedCornerShape(4.dp),
10 | large = RoundedCornerShape(0.dp)
11 | )
--------------------------------------------------------------------------------
/wearOS/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | KMPCalendarView
3 |
7 | Hello Square World!
8 | TrendingReposUI
9 |
--------------------------------------------------------------------------------
/macOS/macOS/macOSApp.swift:
--------------------------------------------------------------------------------
1 | //
2 | // macOSApp.swift
3 | // macOS
4 | //
5 | // Created by Anmol Verma on 27/12/21.
6 | //
7 |
8 | import SwiftUI
9 | import shared
10 |
11 | @main
12 | struct macOSApp: App {
13 | init() {
14 | KoinKt.doInitSharedDependencies()
15 | }
16 |
17 | var body: some Scene {
18 | WindowGroup {
19 | Text("")
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/androidApp/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/shared/src/jsMain/kotlin/com/baseio/kmm/di/Koin.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.di
2 |
3 | import com.baseio.kmm.db.DriverFactory
4 | import org.koin.dsl.module
5 | import io.ktor.client.engine.js.*
6 |
7 | actual fun platformModule() = module {
8 | single { Js.create() }
9 | single {
10 | DriverFactory().createDriver() // this never gets called for js since sqldriver is async and koin doesn't support that yet.
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/macOS/macOS/ContentView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContentView.swift
3 | // macOS
4 | //
5 | // Created by Anmol Verma on 27/12/21.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct ContentView: View {
11 | var body: some View {
12 | Text("Hello, world!")
13 | .padding()
14 | }
15 | }
16 |
17 | struct ContentView_Previews: PreviewProvider {
18 | static var previews: some View {
19 | ContentView()
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/baseio/kmm/mvm/PraxisDataModel.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.mvm
2 |
3 | import kotlinx.coroutines.CoroutineScope
4 | import kotlinx.coroutines.Dispatchers
5 | import kotlinx.coroutines.SupervisorJob
6 |
7 | abstract class PraxisDataModel {
8 | protected val dataModelScope = CoroutineScope(SupervisorJob() + Dispatchers.Main)
9 |
10 |
11 | abstract fun activate()
12 | abstract fun destroy()
13 | abstract fun refresh()
14 | }
--------------------------------------------------------------------------------
/shared/src/iosMain/kotlin/com/baseio/kmm/di/Koin.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.di
2 |
3 | import com.baseio.kmm.db.DriverFactory
4 | import com.squareup.sqldelight.db.SqlDriver
5 | import com.squareup.sqldelight.drivers.native.NativeSqliteDriver
6 | import org.koin.dsl.module
7 | import io.ktor.client.engine.ios.*
8 |
9 | actual fun platformModule() = module {
10 | single { Ios.create() }
11 | single {
12 | DriverFactory().createDriver()
13 | }
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/shared/src/macosX64Main/kotlin/com/baseio/kmm/di/Koin.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.di
2 |
3 | import com.baseio.kmm.db.DriverFactory
4 | import com.squareup.sqldelight.db.SqlDriver
5 | import com.squareup.sqldelight.drivers.native.NativeSqliteDriver
6 | import org.koin.dsl.module
7 | import io.ktor.client.engine.ios.*
8 |
9 | actual fun platformModule() = module {
10 | single { Ios.create() }
11 | single {
12 | DriverFactory().createDriver()
13 | }
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/macOS/macOS.xcodeproj/xcuserdata/anmolverma.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | macOS.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "scale" : "2x"
6 | },
7 | {
8 | "idiom" : "watch",
9 | "scale" : "2x",
10 | "screen-width" : ">183"
11 | }
12 | ],
13 | "info" : {
14 | "author" : "xcode",
15 | "version" : 1
16 | },
17 | "properties" : {
18 | "auto-scaling" : "auto"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "scale" : "2x"
6 | },
7 | {
8 | "idiom" : "watch",
9 | "scale" : "2x",
10 | "screen-width" : ">183"
11 | }
12 | ],
13 | "info" : {
14 | "author" : "xcode",
15 | "version" : 1
16 | },
17 | "properties" : {
18 | "auto-scaling" : "auto"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/androidApp/src/main/res/layout/widget_loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
--------------------------------------------------------------------------------
/iosApp/iosApp.xcodeproj/xcuserdata/anmolverma.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | iosApp.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 6
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "scale" : "2x"
6 | },
7 | {
8 | "idiom" : "watch",
9 | "scale" : "2x",
10 | "screen-width" : ">183"
11 | }
12 | ],
13 | "info" : {
14 | "author" : "xcode",
15 | "version" : 1
16 | },
17 | "properties" : {
18 | "auto-scaling" : "auto"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/NotificationView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NotificationView.swift
3 | // watchApp WatchKit Extension
4 | //
5 | // Created by Anmol Verma on 27/12/21.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct NotificationView: View {
11 | var body: some View {
12 | Text("Hello, World!")
13 | }
14 | }
15 |
16 | struct NotificationView_Previews: PreviewProvider {
17 | static var previews: some View {
18 | NotificationView()
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/webApp/webpack.config.d/sqljs.js:
--------------------------------------------------------------------------------
1 |
2 | config.resolve.fallback = {
3 | fs: false,
4 | path: false,
5 | crypto: false,
6 | };
7 |
8 | const CopyWebpackPlugin = require('copy-webpack-plugin');
9 | config.plugins.push(
10 | new CopyWebpackPlugin({
11 | patterns: [
12 | {
13 | from: '../../node_modules/sql.js/dist/sql-wasm.wasm',
14 | to: '../../../webApp/build/distributions'
15 | }
16 | ]
17 | })
18 | );
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | #Gradle
2 | org.gradle.jvmargs=--illegal-access=permit -Dkotlin.daemon.jvm.options=--illegal-access=permit
3 |
4 | #Kotlin
5 | kotlin.code.style=official
6 |
7 | #Android
8 | android.useAndroidX=true
9 | kotlinVersion=1.6.10
10 | kotlin.native.binary.memoryModel=experimental
11 | kotlin.native.binary.freezing=disabled
12 | #MPP
13 | kotlin.mpp.enableGranularSourceSetsMetadata=true
14 | kotlin.native.enableDependencyPropagation=false
15 | kotlin.mpp.enableCInteropCommonization=true
--------------------------------------------------------------------------------
/wearOS/src/main/java/com/baseio/wearos/PraxisApp.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.wearos
2 |
3 | import android.app.Application
4 | import com.baseio.kmm.di.SharedComponent
5 | import com.baseio.kmm.di.UseCasesComponent
6 | import com.baseio.kmm.di.initJSDependencies
7 |
8 | val sharedComponent = SharedComponent()
9 | val useCasesComponent = UseCasesComponent()
10 |
11 | class PraxisApp : Application() {
12 | override fun onCreate() {
13 | super.onCreate()
14 | initJSDependencies()
15 | }
16 | }
--------------------------------------------------------------------------------
/androidApp/src/main/res/drawable/ic_arrow_right.xml:
--------------------------------------------------------------------------------
1 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "scale" : "2x"
6 | },
7 | {
8 | "idiom" : "watch",
9 | "scale" : "2x",
10 | "screen-width" : ">183"
11 | }
12 | ],
13 | "info" : {
14 | "author" : "xcode",
15 | "version" : 1
16 | },
17 | "properties" : {
18 | "auto-scaling" : "auto"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/macOS/macOS/macOS.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.files.user-selected.read-only
8 |
9 | com.apple.security.network.client
10 |
11 | com.apple.security.network.server
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/shared/src/commonMain/sqldelight/db/BaseIoDB.sq:
--------------------------------------------------------------------------------
1 | CREATE TABLE trending_repos(
2 | uid TEXT NOT NULL PRIMARY KEY,
3 | author TEXT,
4 | avatar TEXT,
5 | description TEXT,
6 | language TEXT,
7 | name TEXT,
8 | url TEXT
9 | );
10 |
11 | insertRepo:
12 | INSERT OR REPLACE INTO trending_repos(uid,author,avatar,description,language,name,url) VALUES(?,?,?,?,?,?,?);
13 |
14 | selectAllRepos:
15 | SELECT * FROM trending_repos ORDER BY name ASC;
16 |
17 | deleteAllRepos:
18 | DELETE FROM trending_repos;
--------------------------------------------------------------------------------
/shared/src/iosMain/kotlin/com/baseio/kmm/db/DriverFactory.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.db
2 |
3 | import com.squareup.sqldelight.db.SqlDriver
4 | import com.squareup.sqldelight.drivers.native.NativeSqliteDriver
5 |
6 | actual class DriverFactory {
7 | actual fun createDriver(): SqlDriver {
8 | return NativeSqliteDriver(BaseIoDB.Schema, "baseio.db")
9 | }
10 |
11 | actual suspend fun createDriverBlocking(): SqlDriver {
12 | return NativeSqliteDriver(BaseIoDB.Schema, "baseio.db")
13 | }
14 | }
--------------------------------------------------------------------------------
/shared/src/macosArm64Main/kotlin/com/baseio/kmm/db/DriverFactory.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.db
2 |
3 | import com.squareup.sqldelight.db.SqlDriver
4 | import com.squareup.sqldelight.drivers.native.NativeSqliteDriver
5 |
6 | actual class DriverFactory {
7 | actual fun createDriver(): SqlDriver {
8 | return NativeSqliteDriver(BaseIoDB.Schema, "baseio.db")
9 | }
10 |
11 | actual suspend fun createDriverBlocking(): SqlDriver {
12 | return NativeSqliteDriver(BaseIoDB.Schema, "baseio.db")
13 | }
14 | }
--------------------------------------------------------------------------------
/shared/src/macosX64Main/kotlin/com/baseio/kmm/db/DriverFactory.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.db
2 |
3 | import com.squareup.sqldelight.db.SqlDriver
4 | import com.squareup.sqldelight.drivers.native.NativeSqliteDriver
5 |
6 | actual class DriverFactory {
7 | actual fun createDriver(): SqlDriver {
8 | return NativeSqliteDriver(BaseIoDB.Schema, "baseio.db")
9 | }
10 |
11 | actual suspend fun createDriverBlocking(): SqlDriver {
12 | return NativeSqliteDriver(BaseIoDB.Schema, "baseio.db")
13 | }
14 | }
--------------------------------------------------------------------------------
/shared/src/jsMain/kotlin/com/baseio/kmm/db/DriverFactory.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.db
2 |
3 | import com.squareup.sqldelight.db.SqlDriver
4 | import com.squareup.sqldelight.drivers.sqljs.initSqlDriver
5 | import kotlinx.coroutines.await
6 |
7 | actual class DriverFactory {
8 | actual fun createDriver(): SqlDriver {
9 | throw RuntimeException("call createDriverBlocking")
10 | }
11 |
12 | actual suspend fun createDriverBlocking(): SqlDriver {
13 | return initSqlDriver(BaseIoDB.Schema).await()
14 | }
15 |
16 | }
--------------------------------------------------------------------------------
/androidApp/src/main/res/xml/trending_repos_widget_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSExtension
6 |
7 | NSExtensionAttributes
8 |
9 | WKAppBundleIdentifier
10 | orgIdentifier.iosApp.watchApp.watchkitapp
11 |
12 | NSExtensionPointIdentifier
13 | com.apple.watchkit
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "scale" : "2x"
6 | },
7 | {
8 | "idiom" : "watch",
9 | "scale" : "2x",
10 | "screen-width" : "<=145"
11 | },
12 | {
13 | "idiom" : "watch",
14 | "scale" : "2x",
15 | "screen-width" : ">183"
16 | }
17 | ],
18 | "info" : {
19 | "author" : "xcode",
20 | "version" : 1
21 | },
22 | "properties" : {
23 | "auto-scaling" : "auto"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "scale" : "2x"
6 | },
7 | {
8 | "idiom" : "watch",
9 | "scale" : "2x",
10 | "screen-width" : "<=145"
11 | },
12 | {
13 | "idiom" : "watch",
14 | "scale" : "2x",
15 | "screen-width" : ">183"
16 | }
17 | ],
18 | "info" : {
19 | "author" : "xcode",
20 | "version" : 1
21 | },
22 | "properties" : {
23 | "auto-scaling" : "auto"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "scale" : "2x"
6 | },
7 | {
8 | "idiom" : "watch",
9 | "scale" : "2x",
10 | "screen-width" : "<=145"
11 | },
12 | {
13 | "idiom" : "watch",
14 | "scale" : "2x",
15 | "screen-width" : ">183"
16 | }
17 | ],
18 | "info" : {
19 | "author" : "xcode",
20 | "version" : 1
21 | },
22 | "properties" : {
23 | "auto-scaling" : "auto"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "scale" : "2x"
6 | },
7 | {
8 | "idiom" : "watch",
9 | "scale" : "2x",
10 | "screen-width" : "<=145"
11 | },
12 | {
13 | "idiom" : "watch",
14 | "scale" : "2x",
15 | "screen-width" : ">183"
16 | }
17 | ],
18 | "info" : {
19 | "author" : "xcode",
20 | "version" : 1
21 | },
22 | "properties" : {
23 | "auto-scaling" : "auto"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/shared/src/androidMain/kotlin/com/baseio/kmm/db/DriverFactory.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.db
2 |
3 | import android.content.Context
4 | import com.squareup.sqldelight.android.AndroidSqliteDriver
5 | import com.squareup.sqldelight.db.SqlDriver
6 |
7 | actual class DriverFactory(private val context: Context) {
8 | actual fun createDriver(): SqlDriver {
9 | return AndroidSqliteDriver(BaseIoDB.Schema, context, "baseio.db")
10 | }
11 |
12 | actual suspend fun createDriverBlocking(): SqlDriver {
13 | return AndroidSqliteDriver(BaseIoDB.Schema, context, "baseio.db")
14 | }
15 | }
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/githubtrending/UiRepo.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UiRepo.swift
3 | // watchApp WatchKit Extension
4 | //
5 | // Created by Anmol Verma on 27/12/21.
6 | //
7 |
8 | import Foundation
9 |
10 |
11 | import Foundation
12 |
13 | class UIRepo: Identifiable {
14 | let author, name: String?
15 | let avatar: String?
16 | let url: String?
17 |
18 |
19 | init(author: String?, name: String?, avatar: String?, url: String?) {
20 | self.author = author
21 | self.name = name
22 | self.avatar = avatar
23 | self.url = url
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Extra Large.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "scale" : "2x"
6 | },
7 | {
8 | "idiom" : "watch",
9 | "scale" : "2x",
10 | "screen-width" : "<=145"
11 | },
12 | {
13 | "idiom" : "watch",
14 | "scale" : "2x",
15 | "screen-width" : ">183"
16 | }
17 | ],
18 | "info" : {
19 | "author" : "xcode",
20 | "version" : 1
21 | },
22 | "properties" : {
23 | "auto-scaling" : "auto"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/androidApp/src/main/res/drawable/ic_refresh.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/wearOS/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | 0dp
8 |
9 |
14 | 5dp
15 |
--------------------------------------------------------------------------------
/iosApp/iosApp.xcworkspace/xcuserdata/anmolverma.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildLocationStyle
6 | UseAppPreferences
7 | CustomBuildLocationType
8 | RelativeToDerivedData
9 | DerivedDataLocationStyle
10 | Default
11 | IssueFilterStyle
12 | ShowActiveSchemeOnly
13 | LiveSourceIssuesEnabled
14 |
15 | ShowSharedSchemesAutomaticallyEnabled
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/watchAppApp.swift:
--------------------------------------------------------------------------------
1 | //
2 | // watchAppApp.swift
3 | // watchApp WatchKit Extension
4 | //
5 | // Created by Anmol Verma on 27/12/21.
6 | //
7 |
8 | import SwiftUI
9 | import shared
10 |
11 | let sharedComponent = SharedComponent()
12 | let useCasesComponent = UseCasesComponent()
13 |
14 | @main
15 | struct watchAppApp: App {
16 | init() {
17 | KoinKt.doInitSharedDependencies()
18 | }
19 |
20 | @SceneBuilder var body: some Scene {
21 | WindowGroup {
22 | NavigationView {
23 | GithubTrendingScreen()
24 | }
25 | }
26 |
27 |
28 | WKNotificationScene(controller: NotificationController.self, category: "myCategory")
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/watchApp/watchApp.xcodeproj/xcuserdata/anmolverma.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | watchApp WatchKit App (Complication).xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 8
11 |
12 | watchApp WatchKit App (Notification).xcscheme_^#shared#^_
13 |
14 | orderHint
15 | 7
16 |
17 | watchApp WatchKit App.xcscheme_^#shared#^_
18 |
19 | orderHint
20 | 6
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/webApp/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | WebAppPlugins.plugins.forEach { dependency ->
3 | kotlin(dependency)
4 | }
5 | }
6 |
7 | kotlin {
8 | js(IR) {
9 | browser()
10 | binaries.executable()
11 | }
12 |
13 | sourceSets {
14 | val jsMain by getting {
15 | dependencies {
16 | implementation(project(":shared"))
17 | WebAppDependencies.implementation.forEach(::implementation)
18 | WebAppDependencies.kotlin.map { dependency ->
19 | kotlin(dependency)
20 | }.forEach(::implementation)
21 | WebAppDependencies.npm.map { (dependency, version) ->
22 | npm(dependency, version)
23 | }.forEach(::implementation)
24 | }
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/wearOS/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/androidApp/src/main/java/com/baseio/kmm/android/ui/theme/Type.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.android.ui.theme
2 |
3 | import androidx.compose.material.Typography
4 | import androidx.compose.ui.text.TextStyle
5 | import androidx.compose.ui.text.font.FontFamily
6 | import androidx.compose.ui.text.font.FontWeight
7 | import androidx.compose.ui.unit.sp
8 |
9 | // Set of Material typography styles to start with
10 | val PraxisTypography = Typography(
11 | body1 = TextStyle(
12 | fontFamily = FontFamily.Default,
13 | fontWeight = FontWeight.Normal,
14 | fontSize = 16.sp
15 | ),
16 | button = TextStyle(
17 | fontFamily = FontFamily.Default,
18 | fontWeight = FontWeight.W500,
19 | fontSize = 14.sp
20 | ),
21 | caption = TextStyle(
22 | fontFamily = FontFamily.Default,
23 | fontWeight = FontWeight.Normal,
24 | fontSize = 12.sp
25 | )
26 |
27 |
28 | )
--------------------------------------------------------------------------------
/androidApp/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
19 |
--------------------------------------------------------------------------------
/wearOS/src/main/java/com/baseio/wearos/ui/theme/Type.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.wearos.ui.theme
2 |
3 | import androidx.compose.material.Typography
4 | import androidx.compose.ui.text.TextStyle
5 | import androidx.compose.ui.text.font.FontFamily
6 | import androidx.compose.ui.text.font.FontWeight
7 | import androidx.compose.ui.unit.sp
8 |
9 | // Set of Material typography styles to start with
10 | val Typography = Typography(
11 | body1 = TextStyle(
12 | fontFamily = FontFamily.Default,
13 | fontWeight = FontWeight.Normal,
14 | fontSize = 16.sp
15 | )
16 | /* Other default text styles to override
17 | button = TextStyle(
18 | fontFamily = FontFamily.Default,
19 | fontWeight = FontWeight.W500,
20 | fontSize = 14.sp
21 | ),
22 | caption = TextStyle(
23 | fontFamily = FontFamily.Default,
24 | fontWeight = FontWeight.Normal,
25 | fontSize = 12.sp
26 | )
27 | */
28 | )
--------------------------------------------------------------------------------
/macOS/macOSUITests/macOSUITestsLaunchTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // macOSUITestsLaunchTests.swift
3 | // macOSUITests
4 | //
5 | // Created by Anmol Verma on 27/12/21.
6 | //
7 |
8 | import XCTest
9 |
10 | class macOSUITestsLaunchTests: XCTestCase {
11 |
12 | override class var runsForEachTargetApplicationUIConfiguration: Bool {
13 | true
14 | }
15 |
16 | override func setUpWithError() throws {
17 | continueAfterFailure = false
18 | }
19 |
20 | func testLaunch() throws {
21 | let app = XCUIApplication()
22 | app.launch()
23 |
24 | // Insert steps here to perform after app launch but before taking a screenshot,
25 | // such as logging into a test account or navigating somewhere in the app
26 |
27 | let attachment = XCTAttachment(screenshot: app.screenshot())
28 | attachment.name = "Launch Screen"
29 | attachment.lifetime = .keepAlways
30 | add(attachment)
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/watchApp/watchAppUITests/watchAppUITestsLaunchTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // watchAppUITestsLaunchTests.swift
3 | // watchAppUITests
4 | //
5 | // Created by Anmol Verma on 27/12/21.
6 | //
7 |
8 | import XCTest
9 |
10 | class watchAppUITestsLaunchTests: XCTestCase {
11 |
12 | override class var runsForEachTargetApplicationUIConfiguration: Bool {
13 | true
14 | }
15 |
16 | override func setUpWithError() throws {
17 | continueAfterFailure = false
18 | }
19 |
20 | func testLaunch() throws {
21 | let app = XCUIApplication()
22 | app.launch()
23 |
24 | // Insert steps here to perform after app launch but before taking a screenshot,
25 | // such as logging into a test account or navigating somewhere in the app
26 |
27 | let attachment = XCTAttachment(screenshot: app.screenshot())
28 | attachment.name = "Launch Screen"
29 | attachment.lifetime = .keepAlways
30 | add(attachment)
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/PushNotificationPayload.apns:
--------------------------------------------------------------------------------
1 | {
2 | "aps": {
3 | "alert": {
4 | "body": "Test message",
5 | "title": "Optional title",
6 | "subtitle": "Optional subtitle"
7 | },
8 | "category": "myCategory",
9 | "thread-id": "5280"
10 | },
11 |
12 | "WatchKit Simulator Actions": [
13 | {
14 | "title": "First Button",
15 | "identifier": "firstButtonAction"
16 | }
17 | ],
18 |
19 | "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App."
20 | }
21 |
--------------------------------------------------------------------------------
/wearOS/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
16 |
17 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/wearOS/src/main/java/com/baseio/wearos/TrendingReposUI.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.wearos
2 |
3 | import android.os.Bundle
4 | import androidx.activity.ComponentActivity
5 | import androidx.activity.compose.setContent
6 | import androidx.compose.material.*
7 | import androidx.compose.runtime.Composable
8 | import androidx.compose.ui.graphics.Color
9 | import com.baseio.wearos.ui.theme.BaseiOKMMTheme
10 |
11 | class TrendingReposUI : ComponentActivity() {
12 | override fun onCreate(savedInstanceState: Bundle?) {
13 | super.onCreate(savedInstanceState)
14 | val viewModel = TrendingReposVM(application)
15 | setContent {
16 | BaseiOKMMTheme {
17 | val materialBlue700 = Color(0xFF1976D2)
18 | // A surface container using the 'background' color from the theme
19 | Surface(color = MaterialTheme.colors.background) {
20 | Scaffold(
21 | content = {
22 | TrendingReposListScreen(viewModel)
23 | },
24 | )
25 | }
26 | }
27 | }
28 | }
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/androidApp/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
15 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/NotificationController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NotificationController.swift
3 | // watchApp WatchKit Extension
4 | //
5 | // Created by Anmol Verma on 27/12/21.
6 | //
7 |
8 | import WatchKit
9 | import SwiftUI
10 | import UserNotifications
11 |
12 | class NotificationController: WKUserNotificationHostingController {
13 |
14 | override var body: NotificationView {
15 | return NotificationView()
16 | }
17 |
18 | override func willActivate() {
19 | // This method is called when watch view controller is about to be visible to user
20 | super.willActivate()
21 | }
22 |
23 | override func didDeactivate() {
24 | // This method is called when watch view controller is no longer visible
25 | super.didDeactivate()
26 | }
27 |
28 | override func didReceive(_ notification: UNNotification) {
29 | // This method is called when a notification needs to be presented.
30 | // Implement it if you use a dynamic notification interface.
31 | // Populate your dynamic notification interface as quickly as possible.
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/webApp/src/jsMain/kotlin/Client.kt:
--------------------------------------------------------------------------------
1 | import com.baseio.kmm.db.DriverFactory
2 | import com.baseio.kmm.di.SharedComponent
3 | import com.baseio.kmm.di.UseCasesComponent
4 | import com.baseio.kmm.di.initJSDependencies
5 | import react.dom.render
6 | import kotlinx.browser.document
7 | import kotlinx.browser.window
8 |
9 | val sharedComponent = SharedComponent()
10 | val useCasesComponent = UseCasesComponent()
11 |
12 | fun main() {
13 | initJSDependencies()
14 | window.onload = { _ ->
15 | val rootDiv = document.getElementById("root")
16 | render(rootDiv!!) {
17 | child(TrendingUI)
18 | }
19 | }
20 | }
21 |
22 | suspend fun setupDriver() {
23 | sharedComponent.provideGithubTrendingLocal().driver?.let {} ?: run {
24 | setupDriverInternal()
25 | }
26 |
27 | }
28 |
29 | private suspend fun setupDriverInternal() {
30 | try {
31 | val driver = DriverFactory().createDriverBlocking()
32 | val trendingLocal = sharedComponent.provideGithubTrendingLocal()
33 | trendingLocal.driver = driver
34 | } catch (ex: Exception) {
35 | console.log(ex.message)
36 | console.log("Exception happened here.")
37 | console.log(ex)
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/androidApp/src/main/java/com/baseio/kmm/android/ui/theme/Color.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.android.ui.theme
2 |
3 | import androidx.compose.ui.graphics.Color
4 |
5 | val White = Color(0xffffffff)
6 | val PraxisColor = Color(0xff00ACEE)
7 |
8 | val VeryLightGrey = Color(0xffdadce0)
9 | val LightGrey = Color(0xffe8eaed)
10 | val Grey = Color(0xff5f6368)
11 | val TextPrimary = Color(0xff202124)
12 | val TextSecondaryDark = Color(0xff212121)
13 | val TextSecondary = Color(0xff5f6368)
14 | val DarkGreen = Color(0xff056449)
15 | val GreyBg = Color(0xff15202b)
16 | val SearchBarDarkColor = Color(0xff10171e)
17 |
18 | val Shadow1 = Color(0xffded6fe)
19 |
20 | val Ocean11 = Color(0xff005687)
21 | val Ocean2 = Color(0xffbbfdfd)
22 |
23 | val Neutral7 = Color(0xff000000)
24 | val Neutral6 = Color(0x99000000)
25 | val Neutral3 = Color(0x1fffffff)
26 | val Neutral2 = Color(0x61ffffff)
27 | val Neutral1 = Color(0xbdffffff)
28 | val Neutral0 = Color(0xffffffff)
29 |
30 | val FunctionalRed = Color(0xffd00036)
31 | val FunctionalRedDark = Color(0xffea6d7e)
32 | val FunctionalGrey = Color(0xfff6f6f6)
33 | val FunctionalDarkGrey = Color(0xff2e2e2e)
34 |
35 | const val AlphaNearOpaque = 0.95f
36 | const val AlphaNearTransparent = 0.15f
--------------------------------------------------------------------------------
/macOS/macOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "mac",
5 | "scale" : "1x",
6 | "size" : "16x16"
7 | },
8 | {
9 | "idiom" : "mac",
10 | "scale" : "2x",
11 | "size" : "16x16"
12 | },
13 | {
14 | "idiom" : "mac",
15 | "scale" : "1x",
16 | "size" : "32x32"
17 | },
18 | {
19 | "idiom" : "mac",
20 | "scale" : "2x",
21 | "size" : "32x32"
22 | },
23 | {
24 | "idiom" : "mac",
25 | "scale" : "1x",
26 | "size" : "128x128"
27 | },
28 | {
29 | "idiom" : "mac",
30 | "scale" : "2x",
31 | "size" : "128x128"
32 | },
33 | {
34 | "idiom" : "mac",
35 | "scale" : "1x",
36 | "size" : "256x256"
37 | },
38 | {
39 | "idiom" : "mac",
40 | "scale" : "2x",
41 | "size" : "256x256"
42 | },
43 | {
44 | "idiom" : "mac",
45 | "scale" : "1x",
46 | "size" : "512x512"
47 | },
48 | {
49 | "idiom" : "mac",
50 | "scale" : "2x",
51 | "size" : "512x512"
52 | }
53 | ],
54 | "info" : {
55 | "author" : "xcode",
56 | "version" : 1
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/wearOS/src/main/java/com/baseio/wearos/ui/theme/Theme.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.wearos.ui.theme
2 |
3 | import androidx.compose.foundation.isSystemInDarkTheme
4 | import androidx.compose.material.MaterialTheme
5 | import androidx.compose.material.darkColors
6 | import androidx.compose.material.lightColors
7 | import androidx.compose.runtime.Composable
8 |
9 | private val DarkColorPalette = darkColors(
10 | primary = Purple200,
11 | primaryVariant = Purple700,
12 | secondary = Teal200
13 | )
14 |
15 | private val LightColorPalette = lightColors(
16 | primary = Purple500,
17 | primaryVariant = Purple700,
18 | secondary = Teal200
19 |
20 | /* Other default colors to override
21 | background = Color.White,
22 | surface = Color.White,
23 | onPrimary = Color.White,
24 | onSecondary = Color.Black,
25 | onBackground = Color.Black,
26 | onSurface = Color.Black,
27 | */
28 | )
29 |
30 | @Composable
31 | fun BaseiOKMMTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable() () -> Unit) {
32 | val colors = if (darkTheme) {
33 | DarkColorPalette
34 | } else {
35 | LightColorPalette
36 | }
37 |
38 | MaterialTheme(
39 | colors = colors,
40 | typography = Typography,
41 | shapes = Shapes,
42 | content = content
43 | )
44 | }
--------------------------------------------------------------------------------
/macOS/macOSTests/macOSTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // macOSTests.swift
3 | // macOSTests
4 | //
5 | // Created by Anmol Verma on 27/12/21.
6 | //
7 |
8 | import XCTest
9 | @testable import macOS
10 |
11 | class macOSTests: XCTestCase {
12 |
13 | override func setUpWithError() throws {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDownWithError() throws {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() throws {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | // Any test you write for XCTest can be annotated as throws and async.
25 | // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error.
26 | // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards.
27 | }
28 |
29 | func testPerformanceExample() throws {
30 | // This is an example of a performance test case.
31 | self.measure {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/wearOS/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | WearOSPlugins.plugins.forEach { dependency ->
3 | id(dependency)
4 | }
5 | WearOSPlugins.kotlinPlugins.forEach { dependency ->
6 | kotlin(dependency)
7 | }
8 | }
9 |
10 | android {
11 | compileSdk = 31
12 | defaultConfig {
13 | applicationId = "com.baseio.wearos"
14 | minSdk = 30
15 | targetSdk = 31
16 | versionCode = 1
17 | versionName = "1.0"
18 | vectorDrawables {
19 | useSupportLibrary = true
20 | }
21 | }
22 |
23 | buildTypes {
24 | getByName("release") {
25 | isMinifyEnabled = false
26 | }
27 | }
28 | buildFeatures {
29 | viewBinding = true
30 | compose = true
31 | }
32 | compileOptions {
33 | sourceCompatibility = JavaVersion.VERSION_1_8
34 | targetCompatibility = JavaVersion.VERSION_1_8
35 | }
36 | kotlinOptions {
37 | jvmTarget = "1.8"
38 | }
39 | composeOptions {
40 | kotlinCompilerExtensionVersion = AndroidDependencyVersions.composeKotlinCompiler
41 | }
42 | packagingOptions {
43 | resources {
44 | excludes += "/META-INF/{AL2.0,LGPL2.1}"
45 | }
46 | }
47 | }
48 |
49 | dependencies {
50 | implementation(project(":shared"))
51 | WearOSDependencies.implementation.forEach(::implementation)
52 | }
53 |
--------------------------------------------------------------------------------
/watchApp/watchAppTests/watchAppTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // watchAppTests.swift
3 | // watchAppTests
4 | //
5 | // Created by Anmol Verma on 27/12/21.
6 | //
7 |
8 | import XCTest
9 | @testable import watchApp_WatchKit_Extension
10 |
11 | class watchAppTests: XCTestCase {
12 |
13 | override func setUpWithError() throws {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDownWithError() throws {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() throws {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | // Any test you write for XCTest can be annotated as throws and async.
25 | // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error.
26 | // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards.
27 | }
28 |
29 | func testPerformanceExample() throws {
30 | // This is an example of a performance test case.
31 | self.measure {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/Assets.xcassets/Complication.complicationset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "assets" : [
3 | {
4 | "filename" : "Circular.imageset",
5 | "idiom" : "watch",
6 | "role" : "circular"
7 | },
8 | {
9 | "filename" : "Extra Large.imageset",
10 | "idiom" : "watch",
11 | "role" : "extra-large"
12 | },
13 | {
14 | "filename" : "Graphic Bezel.imageset",
15 | "idiom" : "watch",
16 | "role" : "graphic-bezel"
17 | },
18 | {
19 | "filename" : "Graphic Circular.imageset",
20 | "idiom" : "watch",
21 | "role" : "graphic-circular"
22 | },
23 | {
24 | "filename" : "Graphic Corner.imageset",
25 | "idiom" : "watch",
26 | "role" : "graphic-corner"
27 | },
28 | {
29 | "filename" : "Graphic Extra Large.imageset",
30 | "idiom" : "watch",
31 | "role" : "graphic-extra-large"
32 | },
33 | {
34 | "filename" : "Graphic Large Rectangular.imageset",
35 | "idiom" : "watch",
36 | "role" : "graphic-large-rectangular"
37 | },
38 | {
39 | "filename" : "Modular.imageset",
40 | "idiom" : "watch",
41 | "role" : "modular"
42 | },
43 | {
44 | "filename" : "Utilitarian.imageset",
45 | "idiom" : "watch",
46 | "role" : "utilitarian"
47 | }
48 | ],
49 | "info" : {
50 | "author" : "xcode",
51 | "version" : 1
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/baseio/kmm/calendar/JetYear.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.calendar
2 |
3 | import kotlinx.datetime.*
4 |
5 | class JetYear private constructor(
6 | val startDate: LocalDate,
7 | val endDate: LocalDate,
8 | ) : JetCalendarType() {
9 | lateinit var yearMonths: List
10 |
11 | companion object {
12 | fun current(
13 | date: LocalDate,
14 | firstDayOfWeek: DayOfWeek
15 | ): JetYear {
16 | val day = LocalDate(date.year, Month.JANUARY, 1)
17 | val last = LocalDate(date.year, Month.DECEMBER, 31)
18 | val year = JetYear(day, last)
19 | year.yearMonths = year.months(firstDayOfWeek)
20 | return year
21 | }
22 | }
23 |
24 | private fun months(firstDayOfWeek: DayOfWeek): List {
25 | val months = mutableListOf()
26 | months.add(JetMonth.current(this.startDate, firstDayOfWeek))
27 | while (months.size != 12) {
28 | val nextMonth = months.last().nextMonth()
29 | months.add(nextMonth)
30 | }
31 | return months
32 | }
33 |
34 | fun year(): String {
35 | return this.startDate.year.toString()
36 | }
37 |
38 | private fun LocalDate.withDayOfMonth(dayOfMonth: Int): LocalDate {
39 | return if (this.dayOfMonth == dayOfMonth) {
40 | this
41 | } else LocalDate(year, month.number, dayOfMonth)
42 | }
43 | }
44 |
45 | private fun LocalDate.startDateNextMonth(): LocalDate {
46 | return LocalDate(this.year, this.monthNumber + 1, 1)
47 | }
48 |
--------------------------------------------------------------------------------
/iosApp/iosApp/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // iosApp
4 | //
5 | // Created by Anmol Verma on 27/12/21.
6 | // Copyright © 2021 orgName. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | import UIKit
12 | import shared
13 |
14 |
15 | class AppDelegate: UIResponder, UIApplicationDelegate {
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 |
19 | KoinKt.doInitSharedDependencies()
20 |
21 | return true
22 | }
23 |
24 | // MARK: UISceneSession Lifecycle
25 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
26 | // Called when a new scene session is being created.
27 | // Use this method to select a configuration to create the new scene with.
28 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
29 | }
30 |
31 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) {
32 | // Called when the user discards a scene session.
33 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
34 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
35 | }
36 |
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/githubtrending/GithubTrendingVM.swift:
--------------------------------------------------------------------------------
1 | //
2 | // GithubTrendingVM.swift
3 | // iosApp
4 | //
5 | // Created by Anmol Verma on 27/12/21.
6 | // Copyright © 2021 orgName. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import shared
11 | import Combine
12 | import KMPNativeCoroutinesCombine
13 |
14 | class GithubTrendingVM : ObservableObject{
15 | private var trendingDataModel:TrendingDataModel?
16 |
17 | @Published var repos : [UIRepo] = []
18 | @Published
19 | var loading = false
20 | @Published
21 | var error: String?
22 |
23 | init() {
24 | activate()
25 | }
26 |
27 | func activate(){
28 | trendingDataModel = TrendingDataModel { [weak self] dataState in
29 | self?.loading = dataState is TrendingDataModel.LoadingState
30 | if(dataState is TrendingDataModel.SuccessState){
31 | let listDataState = dataState as! TrendingDataModel.SuccessState
32 | self?.repos = listDataState.trendingList.map({ item in
33 | return UIRepo(author:item.author, name:item.name, avatar:item.avatar, url:item.url)
34 | })
35 | }
36 | }
37 | trendingDataModel?.activate()
38 | }
39 |
40 | func filter(searchText:String){
41 | trendingDataModel?.filterRecords(search:searchText)
42 | }
43 |
44 |
45 | func destroy(){
46 | trendingDataModel?.destroy()
47 | }
48 |
49 | func refresh(){
50 | trendingDataModel?.refresh()
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/wearOS/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
16 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
30 |
34 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/macOS/macOSUITests/macOSUITests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // macOSUITests.swift
3 | // macOSUITests
4 | //
5 | // Created by Anmol Verma on 27/12/21.
6 | //
7 |
8 | import XCTest
9 |
10 | class macOSUITests: XCTestCase {
11 |
12 | override func setUpWithError() throws {
13 | // Put setup code here. This method is called before the invocation of each test method in the class.
14 |
15 | // In UI tests it is usually best to stop immediately when a failure occurs.
16 | continueAfterFailure = false
17 |
18 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
19 | }
20 |
21 | override func tearDownWithError() throws {
22 | // Put teardown code here. This method is called after the invocation of each test method in the class.
23 | }
24 |
25 | func testExample() throws {
26 | // UI tests must launch the application that they test.
27 | let app = XCUIApplication()
28 | app.launch()
29 |
30 | // Use recording to get started writing UI tests.
31 | // Use XCTAssert and related functions to verify your tests produce the correct results.
32 | }
33 |
34 | func testLaunchPerformance() throws {
35 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) {
36 | // This measures how long it takes to launch your application.
37 | measure(metrics: [XCTApplicationLaunchMetric()]) {
38 | XCUIApplication().launch()
39 | }
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/watchApp/watchAppUITests/watchAppUITests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // watchAppUITests.swift
3 | // watchAppUITests
4 | //
5 | // Created by Anmol Verma on 27/12/21.
6 | //
7 |
8 | import XCTest
9 |
10 | class watchAppUITests: XCTestCase {
11 |
12 | override func setUpWithError() throws {
13 | // Put setup code here. This method is called before the invocation of each test method in the class.
14 |
15 | // In UI tests it is usually best to stop immediately when a failure occurs.
16 | continueAfterFailure = false
17 |
18 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
19 | }
20 |
21 | override func tearDownWithError() throws {
22 | // Put teardown code here. This method is called after the invocation of each test method in the class.
23 | }
24 |
25 | func testExample() throws {
26 | // UI tests must launch the application that they test.
27 | let app = XCUIApplication()
28 | app.launch()
29 |
30 | // Use recording to get started writing UI tests.
31 | // Use XCTAssert and related functions to verify your tests produce the correct results.
32 | }
33 |
34 | func testLaunchPerformance() throws {
35 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) {
36 | // This measures how long it takes to launch your application.
37 | measure(metrics: [XCTApplicationLaunchMetric()]) {
38 | XCUIApplication().launch()
39 | }
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/githubtrending/GithubTrendingUI.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import shared
3 | import SDWebImageSwiftUI
4 |
5 |
6 | struct GithubTrendingScreen: View {
7 |
8 | @ObservedObject var ghVM = GithubTrendingVM()
9 | @State private var searchText = ""
10 |
11 | var body: some View {
12 | NavigationView{
13 | List{
14 | ForEach(ghVM.repos){ repo in
15 | RepoItem(repo:repo)
16 | }
17 | }.refreshable {
18 | ghVM.refresh()
19 | }.onAppear{
20 | ghVM.activate()
21 | }.onDisappear(){
22 | ghVM.destroy()
23 | }.navigationTitle("Trending Repos")
24 | }.searchable(text: $searchText, placement: .navigationBarDrawer(displayMode: .always),prompt: "Search by language.").onChange(of: searchText) { searchText in
25 | self.ghVM.filter(searchText:searchText)
26 | }
27 | }
28 | }
29 |
30 | struct RepoItem : View{
31 |
32 | let repo : UIRepo
33 | @Environment(\.openURL) var openURL
34 |
35 | var body: some View{
36 | HStack{
37 | VStack{
38 | Text(repo.name ?? "NA").fontWeight(.bold).frame(maxWidth:.infinity,alignment: Alignment.topLeading)
39 | Text(repo.author ?? "NA").frame(maxWidth:.infinity,alignment: Alignment.topLeading)
40 | Button {
41 | openURL(URL(string: repo.url ?? "no url")!)
42 | } label: {
43 | Text(repo.url ?? "no url").frame(maxWidth:.infinity,alignment: Alignment.topLeading)
44 | }
45 | }
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/iosApp/iosApp/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UIApplicationSceneManifest
24 |
25 | UIApplicationSupportsMultipleScenes
26 |
27 |
28 | UILaunchScreen
29 |
30 | UIRequiredDeviceCapabilities
31 |
32 | armv7
33 |
34 | UISupportedInterfaceOrientations
35 |
36 | UIInterfaceOrientationPortrait
37 | UIInterfaceOrientationLandscapeLeft
38 | UIInterfaceOrientationLandscapeRight
39 |
40 | UISupportedInterfaceOrientations~ipad
41 |
42 | UIInterfaceOrientationPortrait
43 | UIInterfaceOrientationPortraitUpsideDown
44 | UIInterfaceOrientationLandscapeLeft
45 | UIInterfaceOrientationLandscapeRight
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/androidApp/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | AndroidPluginDependencies.plugins.forEach { (lib, v) ->
3 | if (v.isNotBlank()) {
4 | id(lib) version v
5 | } else {
6 | id(lib)
7 | }
8 | }
9 | }
10 |
11 | android {
12 | compileSdk = 31
13 | defaultConfig {
14 | applicationId = "com.baseio.kmm.android"
15 | minSdk = 21
16 | targetSdk = 31
17 | versionCode = 1
18 | versionName = "1.0"
19 | vectorDrawables {
20 | useSupportLibrary = true
21 | }
22 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
23 | }
24 | buildTypes {
25 | getByName("release") {
26 | isMinifyEnabled = false
27 | }
28 | }
29 | compileOptions {
30 | isCoreLibraryDesugaringEnabled = true
31 | sourceCompatibility = JavaVersion.VERSION_1_8
32 | targetCompatibility = JavaVersion.VERSION_1_8
33 | }
34 | kotlinOptions {
35 | jvmTarget = "1.8"
36 | }
37 | buildFeatures {
38 | compose = true
39 | }
40 | composeOptions {
41 | kotlinCompilerExtensionVersion = AndroidDependencyVersions.composeKotlinCompiler
42 | }
43 | packagingOptions {
44 | resources {
45 | excludes += "/META-INF/{AL2.0,LGPL2.1}"
46 | }
47 | }
48 | }
49 |
50 | dependencies {
51 | implementation(project(":shared"))
52 | coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5")
53 | AndroidDependencies.implementation.forEach(::implementation)
54 | AndroidDependencies.androidTestImplementation.forEach(::androidTestImplementation)
55 | AndroidDependencies.debugImplementation.forEach(::debugImplementation)
56 | }
57 |
--------------------------------------------------------------------------------
/androidApp/src/main/java/com/baseio/kmm/android/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.android
2 |
3 | import android.os.Bundle
4 | import androidx.activity.ComponentActivity
5 | import androidx.activity.compose.setContent
6 | import androidx.compose.foundation.isSystemInDarkTheme
7 | import androidx.compose.foundation.layout.fillMaxSize
8 | import androidx.compose.material.Scaffold
9 | import androidx.compose.material.Surface
10 | import androidx.compose.material.Text
11 | import androidx.compose.material.TopAppBar
12 | import androidx.compose.runtime.Composable
13 | import androidx.compose.runtime.SideEffect
14 | import androidx.compose.ui.Modifier
15 | import androidx.compose.ui.graphics.Color
16 | import androidx.compose.ui.tooling.preview.Preview
17 | import androidx.compose.ui.unit.dp
18 | import androidx.core.view.WindowCompat
19 | import com.baseio.kmm.android.ui.theme.PraxisSurface
20 | import com.baseio.kmm.android.ui.theme.PraxisTheme
21 |
22 | class TrendingReposUI : ComponentActivity() {
23 | override fun onCreate(savedInstanceState: Bundle?) {
24 | super.onCreate(savedInstanceState)
25 | WindowCompat.setDecorFitsSystemWindows(window, false)
26 | setContent {
27 | PraxisTheme() {
28 | PraxisSurface(
29 | modifier = Modifier
30 | .fillMaxSize()
31 | ) {
32 |
33 | Scaffold(
34 | topBar = {
35 | TopAppBar(
36 | title = { Text(text = "Trending Kotlin Repositories") },
37 | )
38 | },
39 | content = {
40 | YearView()
41 | },
42 | backgroundColor = Color.Transparent
43 | )
44 | }
45 | }
46 | }
47 | }
48 | }
49 |
50 | @Composable
51 | fun Greeting(name: String) {
52 | Text(text = "Hello $name!")
53 | }
54 |
--------------------------------------------------------------------------------
/shared/shared.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |spec|
2 | spec.name = 'shared'
3 | spec.version = '1.0'
4 | spec.homepage = 'Link to the Shared Module homepage'
5 | spec.source = { :git => "Not Published", :tag => "Cocoapods/#{spec.name}/#{spec.version}" }
6 | spec.authors = ''
7 | spec.license = ''
8 | spec.summary = 'Some description for the Shared Module'
9 |
10 | spec.vendored_frameworks = "build/cocoapods/framework/shared.framework"
11 | spec.libraries = "c++"
12 | spec.module_name = "#{spec.name}_umbrella"
13 |
14 | spec.ios.deployment_target = '14.1'
15 |
16 |
17 |
18 | spec.pod_target_xcconfig = {
19 | 'KOTLIN_PROJECT_PATH' => ':shared',
20 | 'PRODUCT_MODULE_NAME' => 'shared',
21 | }
22 |
23 | spec.script_phases = [
24 | {
25 | :name => 'Build shared',
26 | :execution_position => :before_compile,
27 | :shell_path => '/bin/sh',
28 | :script => <<-SCRIPT
29 | if [ "YES" = "$COCOAPODS_SKIP_KOTLIN_BUILD" ]; then
30 | echo "Skipping Gradle build task invocation due to COCOAPODS_SKIP_KOTLIN_BUILD environment variable set to \"YES\""
31 | exit 0
32 | fi
33 | set -ev
34 | REPO_ROOT="$PODS_TARGET_SRCROOT"
35 | "$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \
36 | -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \
37 | -Pkotlin.native.cocoapods.archs="$ARCHS" \
38 | -Pkotlin.native.cocoapods.configuration=$CONFIGURATION
39 | SCRIPT
40 | }
41 | ]
42 | end
--------------------------------------------------------------------------------
/androidApp/src/main/java/com/baseio/kmm/android/YearView.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.android
2 |
3 | import androidx.compose.foundation.layout.*
4 | import androidx.compose.foundation.lazy.LazyColumn
5 | import androidx.compose.foundation.lazy.LazyRow
6 | import androidx.compose.foundation.lazy.items
7 | import androidx.compose.material.MaterialTheme
8 | import androidx.compose.material.Text
9 | import androidx.compose.runtime.Composable
10 | import androidx.compose.ui.Modifier
11 | import androidx.compose.ui.graphics.Color
12 | import androidx.compose.ui.text.TextStyle
13 | import androidx.compose.ui.unit.dp
14 | import com.baseio.kmm.calendar.JetYear
15 | import com.baseio.kmm.calendar.dayNames
16 | import kotlinx.datetime.DayOfWeek
17 | import kotlinx.datetime.LocalDate
18 |
19 | @Composable
20 | fun YearView() {
21 | val jetYear = JetYear.current(LocalDate(2022, 1, 1), firstDayOfWeek = DayOfWeek.SUNDAY)
22 | LazyColumn {
23 | items(jetYear.yearMonths) { jetMonth ->
24 | Text(jetMonth.startDate.month.name, style = TextStyle(color = Color.Red))
25 | Row(modifier = Modifier.fillMaxWidth()) {
26 | dayNames(DayOfWeek.SUNDAY).forEach { name ->
27 | Box(modifier = Modifier.size(40.dp)) {
28 | Text(name)
29 | }
30 | }
31 | }
32 |
33 | Column() {
34 | jetMonth.monthWeeks.forEach{ week ->
35 | LazyRow(modifier = Modifier.fillMaxWidth()) {
36 | items(week.days) { day ->
37 | Box(modifier = Modifier.size(40.dp)) {
38 | Text(
39 | text = day.date.dayOfMonth.toString(),
40 | style = TextStyle(color = if (day.isPartOfMonth) MaterialTheme.typography.body1.color else Color.Transparent)
41 | )
42 | }
43 | }
44 | }
45 | }
46 | }
47 | }
48 |
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "scale" : "1x",
46 | "size" : "20x20"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "scale" : "2x",
51 | "size" : "20x20"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "scale" : "1x",
56 | "size" : "29x29"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "scale" : "2x",
61 | "size" : "29x29"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "scale" : "1x",
66 | "size" : "40x40"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "scale" : "2x",
71 | "size" : "40x40"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "scale" : "1x",
76 | "size" : "76x76"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "scale" : "2x",
81 | "size" : "76x76"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "scale" : "2x",
86 | "size" : "83.5x83.5"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "scale" : "1x",
91 | "size" : "1024x1024"
92 | }
93 | ],
94 | "info" : {
95 | "author" : "xcode",
96 | "version" : 1
97 | }
98 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # KMPCalendarView
2 |
3 | Minimal **Kotlin Multiplatform** project with SwiftUI, Jetpack Compose, Compose for Wear OS,. Currently running on
4 |
5 | * Android (Jetpack Compose) ✅ DONE
6 | * Android App Widget 🚧 TODO
7 | * Wear OS (Compose for Wear OS) ✅ DONE
8 | * iOS (SwiftUI) ✅ DONE
9 | * iOS App Widget (SwiftUI) 🚧 TODO
10 | * watchOS (SwiftUI) ✅ DONE
11 | * macOS (SwiftUI) ✅ DONE
12 | * Web (ReactJS) ✅ DONE
13 |
14 | ### TODOs
15 |
16 | 1. Koin does not allow to return dependencies with await() which affects providing SqlDriver on JSPlatform.
17 | Figure out a way for proper DI for SQlDriver.
18 | see issue here: https://github.com/InsertKoinIO/koin/issues/388
19 |
20 | ### Screenshots
21 |
22 | * Android Wear OS (Compose for Wear OS)
23 |
24 |
25 |
26 | * Android (Jetpack Compose)
27 |
28 |
29 |
30 | * watchOS (SwiftUI)
31 |
32 |
33 |
34 | * iOS (SwiftUI)
35 |
36 |
37 |
38 | * macOS (SwiftUI)
39 |
40 |
41 |
42 | * Web (ReactJS)
43 |
44 |
45 |
46 | ### Languages, libraries and tools used
47 |
48 | * [Kotlin](https://kotlinlang.org/)
49 | * [Kotlin Coroutines](https://kotlinlang.org/docs/reference/coroutines-overview.html)
50 | * [Kotlinx Serialization](https://github.com/Kotlin/kotlinx.serialization)
51 | * [Ktor client library](https://github.com/ktorio/ktor)
52 | * [Android Architecture Components](https://developer.android.com/topic/libraries/architecture/index.html)
53 | * [Koin](https://github.com/InsertKoinIO/koin)
54 | * [SQLDelight](https://github.com/cashapp/sqldelight)
55 | * [Jetpack Compose](https://developer.android.com/jetpack/compose)
56 | * [SwiftUI](https://developer.apple.com/documentation/swiftui)
57 | * [KMP-NativeCoroutines](https://github.com/rickclephas/KMP-NativeCoroutines)
--------------------------------------------------------------------------------
/iosApp/iosApp/CalendarView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CalendarView.swift
3 | // iosApp
4 | //
5 | // Created by Anmol Verma on 22/01/22.
6 | // Copyright © 2022 orgName. All rights reserved.
7 | //
8 |
9 | import SwiftUI
10 | import shared
11 |
12 | struct CalendarView: View {
13 | var jetYear = JetYear.companion.current(date: Kotlinx_datetimeLocalDate.init(year: 2022, month: Kotlinx_datetimeMonth.january, dayOfMonth: 1), firstDayOfWeek: Kotlinx_datetimeDayOfWeek.sunday)
14 |
15 | @Environment(\.colorScheme) var colorScheme
16 |
17 |
18 | var body: some View {
19 |
20 |
21 | ScrollView{
22 | VStack{
23 | ForEach(jetYear.yearMonths,id: \.self){ jetMonth in
24 | VStack {
25 | Text("\(jetMonth.startDate.month.name)").foregroundColor(Color.red)
26 | HStack {
27 | ForEach(JetWeekKt.dayNames(dayOfWeek: Kotlinx_datetimeDayOfWeek.sunday),id: \.self){ name in
28 | VStack{
29 | Text(name)
30 | }.frame(width: 40, height: 40, alignment: Alignment.center).foregroundColor(Color.gray)
31 | }
32 | }
33 | ForEach(jetMonth.monthWeeks,id: \.self) { week in
34 | HStack {
35 | ForEach(week.days,id: \.self){ JetDay in
36 | VStack{
37 | Text(String(JetDay.date.dayOfMonth)).foregroundColor(JetDay.isPartOfMonth ? Color.white : Color.gray)
38 | }.frame(width: 40, height: 40, alignment: Alignment.center)
39 | }
40 | }
41 | }
42 | }
43 | }
44 | }
45 | }
46 |
47 |
48 |
49 |
50 | }
51 | }
52 |
53 | struct CalendarView_Previews: PreviewProvider {
54 | static var previews: some View {
55 | CalendarView()
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/wearOS/src/main/java/com/baseio/wearos/TrendingReposVM.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.wearos
2 |
3 | import android.app.Application
4 | import androidx.compose.runtime.getValue
5 | import androidx.compose.runtime.mutableStateOf
6 | import androidx.compose.runtime.setValue
7 | import androidx.lifecycle.AndroidViewModel
8 | import androidx.lifecycle.ViewModel
9 | import androidx.lifecycle.viewModelScope
10 | import com.baseio.kmm.db.DriverFactory
11 | import com.baseio.kmm.domain.model.GithubReposItem
12 | import com.squareup.sqldelight.db.SqlDriver
13 | import kotlinx.coroutines.Dispatchers
14 | import kotlinx.coroutines.delay
15 | import kotlinx.coroutines.flow.collectLatest
16 | import kotlinx.coroutines.launch
17 | import kotlinx.coroutines.withContext
18 |
19 | class TrendingReposVM(app: Application) : AndroidViewModel(app) {
20 | var uiState by mutableStateOf(TrendingReposUiState(emptyList(), true, message = "Loading..."))
21 | private set
22 |
23 | init {
24 | listenToChanges()
25 | fetchData()
26 | }
27 |
28 | private fun fetchData() {
29 | viewModelScope.launch {
30 | withContext(Dispatchers.IO) {
31 | try {
32 | val data = useCasesComponent.provideFetchTrendingReposUseCase().perform("Kotlin")
33 | precheckSqlite()
34 | useCasesComponent.provideSaveTrendingReposUseCase().perform(data)
35 | } catch (ex: Exception) {
36 | ex.printStackTrace()
37 | uiState = uiState.copy(message = ex.message ?: "Error")
38 | }
39 | }
40 | }
41 | }
42 |
43 | private fun listenToChanges() {
44 | viewModelScope.launch {
45 | precheckSqlite()
46 | useCasesComponent.provideGetLocalReposUseCase().perform(null).collectLatest {
47 | uiState = TrendingReposUiState(it, false, "")
48 | uiState = uiState.copy(dataToDisplayOnScreen = it, loading = false)
49 | }
50 | }
51 | }
52 |
53 | private suspend fun precheckSqlite() {
54 | if (sharedComponent.provideGithubTrendingLocal().driver == null) {
55 | val driver = DriverFactory(context = getApplication()).createDriverBlocking()
56 | sharedComponent.provideGithubTrendingLocal().driver = driver
57 | }
58 | }
59 | }
60 |
61 |
62 | data class TrendingReposUiState(
63 | val dataToDisplayOnScreen: List = emptyList(),
64 | val loading: Boolean = false,
65 | val message: String = ""
66 | )
67 |
--------------------------------------------------------------------------------
/wearOS/src/main/java/com/baseio/wearos/TrendingReposListScreen.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.wearos
2 |
3 | import androidx.compose.foundation.Image
4 | import androidx.compose.foundation.layout.*
5 | import androidx.compose.foundation.lazy.LazyColumn
6 | import androidx.compose.material.CircularProgressIndicator
7 | import androidx.compose.material.Text
8 | import androidx.compose.runtime.Composable
9 | import androidx.compose.runtime.remember
10 | import androidx.compose.ui.Modifier
11 | import androidx.compose.ui.platform.LocalConfiguration
12 | import androidx.compose.ui.text.TextStyle
13 | import androidx.compose.ui.text.font.FontWeight
14 | import androidx.compose.ui.unit.dp
15 | import coil.compose.rememberImagePainter
16 |
17 | @Composable
18 | fun TrendingReposListScreen(viewModel: TrendingReposVM) {
19 | Column {
20 | val configuration = LocalConfiguration.current
21 |
22 | val extraBottomPadding = remember {
23 | if (configuration.isScreenRound) 40.dp else 0.dp
24 | }
25 | val uiState = viewModel.uiState
26 |
27 | if (uiState.loading) {
28 | CircularProgressIndicator()
29 | }
30 |
31 | Text(text = uiState.message, modifier = Modifier.padding(4.dp))
32 |
33 | LazyColumn(
34 | modifier = Modifier
35 | .padding(horizontal = 4.dp),
36 | contentPadding = PaddingValues(
37 | start = 8.dp,
38 | top = 8.dp,
39 | end = 8.dp,
40 | bottom = 8.dp + extraBottomPadding
41 | ),
42 | ) {
43 | uiState.dataToDisplayOnScreen.forEach {
44 | item {
45 | Row(modifier = Modifier.padding(4.dp)) {
46 | Image(
47 | painter = rememberImagePainter(it.avatar),
48 | contentDescription = null,
49 | modifier = Modifier.size(64.dp)
50 | )
51 | Column(modifier = Modifier.padding(all = 8.dp)) {
52 | Text(
53 | text = it.author ?: "author",
54 | style = TextStyle(fontWeight = FontWeight.Bold)
55 | )
56 | Text(text = it.name ?: "name")
57 | }
58 | }
59 | }
60 | }
61 |
62 | }
63 |
64 | }
65 | }
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/baseio/kmm/calendar/JetWeek.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.calendar
2 |
3 | import kotlinx.datetime.*
4 |
5 | fun dayNames(dayOfWeek: DayOfWeek): List {
6 | val days = weekDays(dayOfWeek)
7 | return days.map {
8 | it.name.substring(0, 1)
9 | }
10 | }
11 |
12 | private fun weekDays(dayOfWeek: DayOfWeek): MutableList {
13 | val days = mutableListOf()
14 | days.add(dayOfWeek)
15 | while (days.size != 7) {
16 | days.add(days.last().next())
17 | }
18 | return days
19 | }
20 |
21 | private fun DayOfWeek.next(): DayOfWeek {
22 | val currentIndex = this.ordinal
23 | val values = DayOfWeek.values()
24 | val isLast = values.size.minus(1) == currentIndex
25 | return if (isLast) {
26 | values.first()
27 | } else {
28 | values[currentIndex + 1]
29 | }
30 | }
31 |
32 | class JetWeek private constructor(
33 | val startDate: LocalDate,
34 | val monthNumber: Int,
35 | ) : JetCalendarType() {
36 | lateinit var days: List
37 |
38 | companion object {
39 | fun current(
40 | date: LocalDate,
41 | dayOfWeek: DayOfWeek,
42 | monthNumber: Int
43 | ): JetWeek {
44 | val startOfCurrentWeek: LocalDate = date.dateOfCurrentWeek(dayOfWeek, true)
45 | val week = JetWeek(startOfCurrentWeek, monthNumber)
46 | week.days = week.dates()
47 | return week
48 | }
49 | }
50 |
51 | fun dates(): List {
52 | val days = mutableListOf()
53 | val isPart = startDate.monthNumber == this.monthNumber
54 | days.add(startDate.toJetDay(isPart))
55 | while (days.size != 7) {
56 | days.add(days.last().nextDay(this))
57 | }
58 | return days
59 | }
60 |
61 | }
62 |
63 | fun LocalDate.dateOfCurrentWeek(dayOfWeek: DayOfWeek, isFirst: Boolean): LocalDate {
64 | return if (this.dayOfWeek == dayOfWeek) {
65 | this
66 | } else {
67 | // we are somewhere in the week
68 | val calendarWeek = weekDays(dayOfWeek)
69 | val atIndex = calendarWeek.indexOf(this.dayOfWeek)
70 | // if we are at
71 | if (isFirst) {
72 | this.minus(DatePeriod(days = atIndex))
73 | } else {
74 | this.plus(DatePeriod(days = atIndex))
75 | }
76 | }
77 | }
78 |
79 |
80 | fun LocalDate.toJetDay(isPart: Boolean): JetDay {
81 | return JetDay(this, isPart)
82 | }
83 |
84 | private fun JetDay.nextDay(jetWeek: JetWeek): JetDay {
85 | val date = this.date.plus(DatePeriod(days = 1))
86 | val isPartOfMonth = date.monthNumber == jetWeek.monthNumber
87 | return JetDay(date, isPartOfMonth)
88 | }
89 |
90 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit Extension/ComplicationController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ComplicationController.swift
3 | // watchApp WatchKit Extension
4 | //
5 | // Created by Anmol Verma on 27/12/21.
6 | //
7 |
8 | import ClockKit
9 |
10 |
11 | class ComplicationController: NSObject, CLKComplicationDataSource {
12 |
13 | // MARK: - Complication Configuration
14 |
15 | func getComplicationDescriptors(handler: @escaping ([CLKComplicationDescriptor]) -> Void) {
16 | let descriptors = [
17 | CLKComplicationDescriptor(identifier: "complication", displayName: "watchApp", supportedFamilies: CLKComplicationFamily.allCases)
18 | // Multiple complication support can be added here with more descriptors
19 | ]
20 |
21 | // Call the handler with the currently supported complication descriptors
22 | handler(descriptors)
23 | }
24 |
25 | func handleSharedComplicationDescriptors(_ complicationDescriptors: [CLKComplicationDescriptor]) {
26 | // Do any necessary work to support these newly shared complication descriptors
27 | }
28 |
29 | // MARK: - Timeline Configuration
30 |
31 | func getTimelineEndDate(for complication: CLKComplication, withHandler handler: @escaping (Date?) -> Void) {
32 | // Call the handler with the last entry date you can currently provide or nil if you can't support future timelines
33 | handler(nil)
34 | }
35 |
36 | func getPrivacyBehavior(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationPrivacyBehavior) -> Void) {
37 | // Call the handler with your desired behavior when the device is locked
38 | handler(.showOnLockScreen)
39 | }
40 |
41 | // MARK: - Timeline Population
42 |
43 | func getCurrentTimelineEntry(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTimelineEntry?) -> Void) {
44 | // Call the handler with the current timeline entry
45 | handler(nil)
46 | }
47 |
48 | func getTimelineEntries(for complication: CLKComplication, after date: Date, limit: Int, withHandler handler: @escaping ([CLKComplicationTimelineEntry]?) -> Void) {
49 | // Call the handler with the timeline entries after the given date
50 | handler(nil)
51 | }
52 |
53 | // MARK: - Sample Templates
54 |
55 | func getLocalizableSampleTemplate(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTemplate?) -> Void) {
56 | // This method will be called once per supported complication, and the results will be cached
57 | handler(nil)
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/com/baseio/kmm/calendar/JetMonth.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.calendar
2 |
3 | import kotlinx.datetime.*
4 |
5 | class JetMonth private constructor(
6 | val startDate: LocalDate,
7 | val endDate: LocalDate,
8 | var firstDayOfWeek: DayOfWeek,
9 | ) : JetCalendarType() {
10 | lateinit var monthWeeks: List
11 |
12 | fun name(): String {
13 | return startDate.month.name.replaceFirstChar { if (it.isLowerCase()) it.titlecase() else it.toString() }
14 | }
15 |
16 | fun monthYear(): String {
17 | return name() + " " + year()
18 | }
19 |
20 | fun year(): String {
21 | return startDate.year.toString()
22 | }
23 |
24 | companion object {
25 | fun current(
26 | date: LocalDate,
27 | firstDayOfWeek: DayOfWeek
28 | ): JetMonth {
29 | val startOfMonth = date.firstDayOfMonth()
30 | val endOfMonth = date.lastDayOfMonth()
31 | val month = JetMonth(startOfMonth, endOfMonth, firstDayOfWeek = firstDayOfWeek)
32 | month.monthWeeks = month.weeks(firstDayOfWeek)
33 | return month
34 | }
35 | }
36 |
37 | private fun weeks(firstDayOfWeek: DayOfWeek): List {
38 | var date = startDate
39 | val monthWeeks = mutableListOf()
40 |
41 | while (true) {
42 | val firstDateOfWeek = date.dateOfCurrentWeek(firstDayOfWeek, monthWeeks.size == 0)
43 | date = firstDateOfWeek.plus(DatePeriod(days = 6))
44 | if (endDate.monthNumber != date.monthNumber) {
45 | monthWeeks.add(
46 | JetWeek.current(
47 | firstDateOfWeek,
48 | dayOfWeek = this.firstDayOfWeek,
49 | this.startDate.monthNumber
50 | )
51 | )
52 | break
53 | } else {
54 | monthWeeks.add(
55 | JetWeek.current(
56 | firstDateOfWeek,
57 | dayOfWeek = this.firstDayOfWeek,
58 | this.startDate.monthNumber
59 | )
60 | )
61 | }
62 | date = date.plus(DatePeriod(days = 1))
63 | }
64 | return monthWeeks
65 | }
66 |
67 | }
68 |
69 | fun JetMonth.nextMonth(): JetMonth {
70 | return JetMonth.current(this.endDate.plus(DatePeriod(days = 1)), this.firstDayOfWeek)
71 | }
72 |
73 | private fun LocalDate.lastDayOfMonth(): LocalDate {
74 | // first day of next month minus 1 day is last day of month :P
75 | val currentMonth = this.month.number
76 | return if (currentMonth == 12) {
77 | LocalDate(this.year.plus(1), 1, 1).minus(DatePeriod(days = 1))
78 | } else {
79 | LocalDate(this.year, this.month.number + 1, 1).minus(DatePeriod(days = 1))
80 | }
81 |
82 | }
83 |
84 | private fun LocalDate.firstDayOfMonth(): LocalDate {
85 | return LocalDate(this.year, this.month, 1)
86 | }
87 |
--------------------------------------------------------------------------------
/watchApp/watchApp WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "role" : "notificationCenter",
6 | "scale" : "2x",
7 | "size" : "24x24",
8 | "subtype" : "38mm"
9 | },
10 | {
11 | "idiom" : "watch",
12 | "role" : "notificationCenter",
13 | "scale" : "2x",
14 | "size" : "27.5x27.5",
15 | "subtype" : "42mm"
16 | },
17 | {
18 | "idiom" : "watch",
19 | "role" : "companionSettings",
20 | "scale" : "2x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "watch",
25 | "role" : "companionSettings",
26 | "scale" : "3x",
27 | "size" : "29x29"
28 | },
29 | {
30 | "idiom" : "watch",
31 | "role" : "notificationCenter",
32 | "scale" : "2x",
33 | "size" : "33x33",
34 | "subtype" : "45mm"
35 | },
36 | {
37 | "idiom" : "watch",
38 | "role" : "appLauncher",
39 | "scale" : "2x",
40 | "size" : "40x40",
41 | "subtype" : "38mm"
42 | },
43 | {
44 | "idiom" : "watch",
45 | "role" : "appLauncher",
46 | "scale" : "2x",
47 | "size" : "44x44",
48 | "subtype" : "40mm"
49 | },
50 | {
51 | "idiom" : "watch",
52 | "role" : "appLauncher",
53 | "scale" : "2x",
54 | "size" : "46x46",
55 | "subtype" : "41mm"
56 | },
57 | {
58 | "idiom" : "watch",
59 | "role" : "appLauncher",
60 | "scale" : "2x",
61 | "size" : "50x50",
62 | "subtype" : "44mm"
63 | },
64 | {
65 | "idiom" : "watch",
66 | "role" : "appLauncher",
67 | "scale" : "2x",
68 | "size" : "51x51",
69 | "subtype" : "45mm"
70 | },
71 | {
72 | "idiom" : "watch",
73 | "role" : "quickLook",
74 | "scale" : "2x",
75 | "size" : "86x86",
76 | "subtype" : "38mm"
77 | },
78 | {
79 | "idiom" : "watch",
80 | "role" : "quickLook",
81 | "scale" : "2x",
82 | "size" : "98x98",
83 | "subtype" : "42mm"
84 | },
85 | {
86 | "idiom" : "watch",
87 | "role" : "quickLook",
88 | "scale" : "2x",
89 | "size" : "108x108",
90 | "subtype" : "44mm"
91 | },
92 | {
93 | "idiom" : "watch",
94 | "role" : "quickLook",
95 | "scale" : "2x",
96 | "size" : "117x117",
97 | "subtype" : "45mm"
98 | },
99 | {
100 | "idiom" : "watch-marketing",
101 | "scale" : "1x",
102 | "size" : "1024x1024"
103 | }
104 | ],
105 | "info" : {
106 | "author" : "xcode",
107 | "version" : 1
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/androidApp/src/main/java/com/baseio/kmm/android/ui/theme/PraxisSurface.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.android.ui.theme
2 |
3 | import androidx.compose.foundation.BorderStroke
4 | import androidx.compose.foundation.background
5 | import androidx.compose.foundation.border
6 | import androidx.compose.foundation.layout.Box
7 | import androidx.compose.material.LocalContentColor
8 | import androidx.compose.runtime.Composable
9 | import androidx.compose.runtime.CompositionLocalProvider
10 | import androidx.compose.ui.Modifier
11 | import androidx.compose.ui.draw.clip
12 | import androidx.compose.ui.draw.shadow
13 | import androidx.compose.ui.graphics.Color
14 | import androidx.compose.ui.graphics.RectangleShape
15 | import androidx.compose.ui.graphics.Shape
16 | import androidx.compose.ui.graphics.compositeOver
17 | import androidx.compose.ui.unit.Dp
18 | import androidx.compose.ui.unit.dp
19 | import androidx.compose.ui.zIndex
20 | import kotlin.math.ln
21 |
22 | /**
23 | * An alternative to [androidx.compose.material.Surface]
24 | */
25 | @Composable
26 | fun PraxisSurface(
27 | modifier: Modifier = Modifier,
28 | shape: Shape = RectangleShape,
29 | color: Color = PraxisTheme.colors.uiBackground,
30 | contentColor: Color = PraxisTheme.colors.textSecondary,
31 | border: BorderStroke? = null,
32 | elevation: Dp = 0.dp,
33 | content: @Composable () -> Unit
34 | ) {
35 | Box(
36 | modifier = modifier
37 | .shadow(elevation = elevation, shape = shape, clip = false)
38 | .zIndex(elevation.value)
39 | .then(if (border != null) Modifier.border(border, shape) else Modifier)
40 | .background(
41 | color = getBackgroundColorForElevation(color, elevation),
42 | shape = shape
43 | )
44 | .clip(shape)
45 | ) {
46 | CompositionLocalProvider(LocalContentColor provides contentColor, content = content)
47 | }
48 | }
49 |
50 | @Composable
51 | private fun getBackgroundColorForElevation(
52 | color: Color,
53 | elevation: Dp
54 | ): Color {
55 | return if (elevation > 0.dp
56 | ) {
57 | color.withElevation(elevation)
58 | } else {
59 | color
60 | }
61 | }
62 |
63 | /**
64 | * Applies a [Color.White] overlay to this color based on the [elevation]. This increases visibility
65 | * of elevation for surfaces in a dark theme.
66 | */
67 | private fun Color.withElevation(elevation: Dp): Color {
68 | val foreground = calculateForeground(elevation)
69 | return foreground.compositeOver(this)
70 | }
71 |
72 | /**
73 | * @return the alpha-modified [Color.White] to overlay on top of the surface color to produce
74 | * the resultant color.
75 | */
76 | private fun calculateForeground(elevation: Dp): Color {
77 | val alpha = ((4.5f * ln(elevation.value + 1)) + 2f) / 20f
78 | return Color.White.copy(alpha = alpha)
79 | }
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/webApp/src/jsMain/kotlin/TrendingUI.kt:
--------------------------------------------------------------------------------
1 | import com.baseio.kmm.domain.model.GithubReposItem
2 | import com.baseio.kmm.features.trending.TrendingDataModel
3 | import kotlinx.coroutines.*
4 | import kotlinx.css.Display
5 | import kotlinx.css.FlexDirection
6 | import kotlinx.css.display
7 | import kotlinx.css.flexDirection
8 | import kotlinx.html.js.onChangeFunction
9 | import org.w3c.dom.HTMLInputElement
10 | import react.*
11 | import react.dom.*
12 | import styled.css
13 | import styled.styledDiv
14 |
15 | external interface TrendingProps : Props
16 |
17 | val TrendingUI = fc {
18 | var trendingRepos: List by useState(emptyList())
19 | var message: String by useState("")
20 | var state by useState()
21 | var search by useState("")
22 |
23 | val dataModel = TrendingDataModel(onDataState = { stateNew ->
24 | state = stateNew
25 | when (stateNew) {
26 | is TrendingDataModel.LoadingState -> {
27 | message = "Loading..."
28 | }
29 | is TrendingDataModel.SuccessState -> {
30 | trendingRepos = stateNew.trendingList
31 | message = "Found repos..."
32 | }
33 | TrendingDataModel.Complete -> {
34 | message = "Completed loading!"
35 | }
36 | TrendingDataModel.EmptyState -> {
37 | message = "Emty state"
38 | }
39 | is TrendingDataModel.ErrorState -> {
40 | message = stateNew.throwable.message ?: "Error"
41 | }
42 | }
43 | })
44 |
45 | useEffectOnce {
46 | MainScope().launch {
47 | setupDriver()
48 | message = "Driver created";
49 | dataModel.activate()
50 | message = "DataModel activated";
51 | }
52 | }
53 |
54 | h1 {
55 | +"Trending Kotlin Repositories"
56 | }
57 | h1 {
58 | +"Status :"
59 | +message
60 | }
61 |
62 | styledDiv{
63 | css {
64 | display = Display.flex
65 | flexDirection = FlexDirection.column
66 | }
67 |
68 | div{
69 | input {
70 | attrs{
71 | placeholder = "Search by language..."
72 | value = search
73 | onChangeFunction = {
74 | val target = it.target as HTMLInputElement
75 | search = target.value
76 | }
77 | }
78 | }
79 |
80 | button {
81 | +"Search Now"
82 |
83 | attrs {
84 | onClick = {
85 | dataModel.filterRecords(search)
86 | }
87 | }
88 | }
89 | }
90 |
91 |
92 | }
93 |
94 | h1{
95 |
96 | }
97 |
98 | div {
99 | for (repo in trendingRepos) {
100 | img(src = repo.avatar, classes = "img") {
101 | this.attrs.height = "100"
102 | this.attrs.width = "100"
103 | }
104 | div {
105 | p {
106 | key = repo.url
107 | +"${repo.name}: ${repo.author}"
108 | }
109 | a {
110 | attrs {
111 | href = repo.url.toString()
112 | target = repo.url.toString()
113 | }
114 | p {
115 | +repo.url.toString()
116 | }
117 | }
118 | }
119 |
120 | }
121 | }
122 |
123 | }
124 |
125 |
--------------------------------------------------------------------------------
/shared/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | CommonPlugins.plugins.forEach { dependency ->
3 | id(dependency)
4 | }
5 | CommonPlugins.kotlinPlugins.forEach { dependency ->
6 | kotlin(dependency)
7 | }
8 | }
9 |
10 | version = "1.0"
11 |
12 | kotlin {
13 | android()
14 | iosX64()
15 | iosArm64()
16 | watchos()
17 | macosX64()
18 | macosArm64()
19 | watchosSimulatorArm64()
20 | iosSimulatorArm64() // sure all ios dependencies support this target
21 |
22 | js(IR) {
23 | binaries.executable()
24 | browser {
25 | commonWebpackConfig {
26 | cssSupport.enabled = true
27 | }
28 | }
29 | }
30 | cocoapods {
31 | summary = "Some description for the Shared Module"
32 | homepage = "Link to the Shared Module homepage"
33 | ios.deploymentTarget = "14.1"
34 | podfile = project.file("../iosApp/Podfile")
35 | framework {
36 | baseName = "shared"
37 | }
38 | }
39 |
40 | sourceSets {
41 | val commonMain by getting {
42 | dependencies {
43 | CommonMainDependencies.implementation.forEach(::implementation)
44 | CommonMainDependencies.api.forEach(::api)
45 | }
46 | }
47 | val commonTest by getting {
48 | dependencies {
49 | CommonTestDependencies.implementation.forEach(::implementation)
50 | CommonTestDependencies.kotlin.map { dependency ->
51 | kotlin(dependency)
52 | }.forEach(::implementation)
53 | }
54 | }
55 | val androidMain by getting {
56 | dependencies {
57 | AndroidMainDependencies.implementation.forEach(::implementation)
58 | }
59 | }
60 | val androidTest by getting {
61 | dependencies {
62 | AndroidTestDependencies.kotlin.map { dependency ->
63 | kotlin(dependency)
64 | }.forEach(::implementation)
65 | AndroidTestDependencies.implementation.forEach(::implementation)
66 | }
67 | }
68 | val jsMain by getting {
69 | dependencies {
70 | WebAppCommonMainDependencies.implementation.forEach(::implementation)
71 | }
72 | }
73 | val iosX64Main by getting
74 | val iosArm64Main by getting
75 | val iosSimulatorArm64Main by getting
76 |
77 | val watchosSimulatorArm64Main by getting
78 | val watchosMain by getting
79 |
80 | val macosX64Main by getting {
81 | dependencies {
82 | MacOSMainDependencies.implementationx64.forEach(::implementation)
83 | }
84 | }
85 | val macosArm64Main by getting {
86 | dependencies {
87 | MacOSMainDependencies.implementationArm64.forEach(::implementation)
88 | }
89 | }
90 |
91 | val iosMain by creating {
92 | dependencies {
93 | IOSMainDependencies.implementation.forEach(::implementation)
94 | }
95 | dependsOn(commonMain)
96 | watchosMain.dependsOn(this)
97 | watchosSimulatorArm64Main.dependsOn(this)
98 | iosX64Main.dependsOn(this)
99 | iosArm64Main.dependsOn(this)
100 | iosSimulatorArm64Main.dependsOn(this)
101 | }
102 | val iosX64Test by getting
103 | val iosArm64Test by getting
104 | val iosSimulatorArm64Test by getting
105 | val iosTest by creating {
106 | dependsOn(commonTest)
107 | iosX64Test.dependsOn(this)
108 | iosArm64Test.dependsOn(this)
109 | iosSimulatorArm64Test.dependsOn(this)
110 | }
111 | }
112 | }
113 |
114 | sqldelight {
115 | database("BaseIoDB") {
116 | packageName = "com.baseio.kmm.db"
117 | }
118 | }
119 |
120 | android {
121 | compileSdk = 31
122 | sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
123 | defaultConfig {
124 | minSdk = 21
125 | targetSdk = 31
126 | }
127 | }
128 |
--------------------------------------------------------------------------------
/androidApp/src/main/java/com/baseio/kmm/android/ui/theme/SystemUiController.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.android.ui.theme
2 |
3 | import android.os.Build
4 | import android.view.View
5 | import android.view.Window
6 | import androidx.compose.runtime.staticCompositionLocalOf
7 | import androidx.compose.ui.graphics.Color
8 | import androidx.compose.ui.graphics.compositeOver
9 | import androidx.compose.ui.graphics.luminance
10 | import androidx.compose.ui.graphics.toArgb
11 |
12 | interface SystemUiController {
13 | fun setStatusBarColor(
14 | color: Color,
15 | darkIcons: Boolean = color.luminance() > 0.5f,
16 | transformColorForLightContent: (Color) -> Color = BlackScrimmed
17 | )
18 |
19 | fun setNavigationBarColor(
20 | color: Color,
21 | darkIcons: Boolean = color.luminance() > 0.5f,
22 | transformColorForLightContent: (Color) -> Color = BlackScrimmed
23 | )
24 |
25 | fun setSystemBarsColor(
26 | color: Color,
27 | darkIcons: Boolean = color.luminance() > 0.5f,
28 | transformColorForLightContent: (Color) -> Color = BlackScrimmed
29 | )
30 | }
31 |
32 | fun SystemUiController(window: Window): SystemUiController {
33 | return SystemUiControllerImpl(window)
34 | }
35 |
36 | /**
37 | * A helper class for setting the navigation and status bar colors for a [Window], gracefully
38 | * degrading behavior based upon API level.
39 | */
40 | private class SystemUiControllerImpl(private val window: Window) : SystemUiController {
41 |
42 | /**
43 | * Set the status bar color.
44 | *
45 | * @param color The **desired** [Color] to set. This may require modification if running on an
46 | * API level that only supports white status bar icons.
47 | * @param darkIcons Whether dark status bar icons would be preferable. Only available on
48 | * API 23+.
49 | * @param transformColorForLightContent A lambda which will be invoked to transform [color] if
50 | * dark icons were requested but are not available. Defaults to applying a black scrim.
51 | */
52 | override fun setStatusBarColor(
53 | color: Color,
54 | darkIcons: Boolean,
55 | transformColorForLightContent: (Color) -> Color
56 | ) {
57 | val statusBarColor = when {
58 | darkIcons && Build.VERSION.SDK_INT < 23 -> transformColorForLightContent(color)
59 | else -> color
60 | }
61 | window.statusBarColor = statusBarColor.toArgb()
62 |
63 | if (Build.VERSION.SDK_INT >= 23) {
64 | @Suppress("DEPRECATION")
65 | if (darkIcons) {
66 | window.decorView.systemUiVisibility = window.decorView.systemUiVisibility or
67 | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
68 | } else {
69 | window.decorView.systemUiVisibility = window.decorView.systemUiVisibility and
70 | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR.inv()
71 | }
72 | }
73 | }
74 |
75 | /**
76 | * Set the navigation bar color.
77 | *
78 | * @param color The **desired** [Color] to set. This may require modification if running on an
79 | * API level that only supports white navigation bar icons. Additionally this will be ignored
80 | * and [Color.Transparent] will be used on API 29+ where gesture navigation is preferred or the
81 | * system UI automatically applies background protection in other navigation modes.
82 | * @param darkIcons Whether dark navigation bar icons would be preferable. Only available on
83 | * API 26+.
84 | * @param transformColorForLightContent A lambda which will be invoked to transform [color] if
85 | * dark icons were requested but are not available. Defaults to applying a black scrim.
86 | */
87 | override fun setNavigationBarColor(
88 | color: Color,
89 | darkIcons: Boolean,
90 | transformColorForLightContent: (Color) -> Color
91 | ) {
92 | val navBarColor = when {
93 | Build.VERSION.SDK_INT >= 29 -> Color.Transparent // For gesture nav
94 | darkIcons && Build.VERSION.SDK_INT < 26 -> transformColorForLightContent(color)
95 | else -> color
96 | }
97 | window.navigationBarColor = navBarColor.toArgb()
98 |
99 | if (Build.VERSION.SDK_INT >= 26) {
100 | @Suppress("DEPRECATION")
101 | if (darkIcons) {
102 | window.decorView.systemUiVisibility = window.decorView.systemUiVisibility or
103 | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
104 | } else {
105 | window.decorView.systemUiVisibility = window.decorView.systemUiVisibility and
106 | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR.inv()
107 | }
108 | }
109 | }
110 |
111 | /**
112 | * Set the status and navigation bars to [color].
113 | *
114 | * @see setStatusBarColor
115 | * @see setNavigationBarColor
116 | */
117 | override fun setSystemBarsColor(
118 | color: Color,
119 | darkIcons: Boolean,
120 | transformColorForLightContent: (Color) -> Color
121 | ) {
122 | setStatusBarColor(color, darkIcons, transformColorForLightContent)
123 | setNavigationBarColor(color, darkIcons, transformColorForLightContent)
124 | }
125 | }
126 |
127 | /**
128 | * An [androidx.compose.runtime.CompositionLocalProvider] holding the current [LocalSysUiController]. Defaults to a
129 | * no-op controller; consumers should [provide][androidx.compose.runtime.CompositionLocalProvider] a real one.
130 | */
131 | val LocalSysUiController = staticCompositionLocalOf {
132 | FakeSystemUiController
133 | }
134 |
135 | private val BlackScrim = Color(0f, 0f, 0f, 0.2f) // 20% opaque black
136 | private val BlackScrimmed: (Color) -> Color = { original ->
137 | BlackScrim.compositeOver(original)
138 | }
139 |
140 | /**
141 | * A fake implementation, useful as a default or used in Previews.
142 | */
143 | private object FakeSystemUiController : SystemUiController {
144 | override fun setStatusBarColor(
145 | color: Color,
146 | darkIcons: Boolean,
147 | transformColorForLightContent: (Color) -> Color
148 | ) = Unit
149 |
150 | override fun setNavigationBarColor(
151 | color: Color,
152 | darkIcons: Boolean,
153 | transformColorForLightContent: (Color) -> Color
154 | ) = Unit
155 |
156 | override fun setSystemBarsColor(
157 | color: Color,
158 | darkIcons: Boolean,
159 | transformColorForLightContent: (Color) -> Color
160 | ) = Unit
161 | }
162 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 |
86 | # Determine the Java command to use to start the JVM.
87 | if [ -n "$JAVA_HOME" ] ; then
88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
89 | # IBM's JDK on AIX uses strange locations for the executables
90 | JAVACMD="$JAVA_HOME/jre/sh/java"
91 | else
92 | JAVACMD="$JAVA_HOME/bin/java"
93 | fi
94 | if [ ! -x "$JAVACMD" ] ; then
95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
96 |
97 | Please set the JAVA_HOME variable in your environment to match the
98 | location of your Java installation."
99 | fi
100 | else
101 | JAVACMD="java"
102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
103 |
104 | Please set the JAVA_HOME variable in your environment to match the
105 | location of your Java installation."
106 | fi
107 |
108 | # Increase the maximum file descriptors if we can.
109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110 | MAX_FD_LIMIT=`ulimit -H -n`
111 | if [ $? -eq 0 ] ; then
112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
113 | MAX_FD="$MAX_FD_LIMIT"
114 | fi
115 | ulimit -n $MAX_FD
116 | if [ $? -ne 0 ] ; then
117 | warn "Could not set maximum file descriptor limit: $MAX_FD"
118 | fi
119 | else
120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
121 | fi
122 | fi
123 |
124 | # For Darwin, add options to specify how the application appears in the dock
125 | if $darwin; then
126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127 | fi
128 |
129 | # For Cygwin or MSYS, switch paths to Windows format before running java
130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133 |
134 | JAVACMD=`cygpath --unix "$JAVACMD"`
135 |
136 | # We build the pattern for arguments to be converted via cygpath
137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
138 | SEP=""
139 | for dir in $ROOTDIRSRAW ; do
140 | ROOTDIRS="$ROOTDIRS$SEP$dir"
141 | SEP="|"
142 | done
143 | OURCYGPATTERN="(^($ROOTDIRS))"
144 | # Add a user-defined pattern to the cygpath arguments
145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
147 | fi
148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
149 | i=0
150 | for arg in "$@" ; do
151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
153 |
154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
156 | else
157 | eval `echo args$i`="\"$arg\""
158 | fi
159 | i=`expr $i + 1`
160 | done
161 | case $i in
162 | 0) set -- ;;
163 | 1) set -- "$args0" ;;
164 | 2) set -- "$args0" "$args1" ;;
165 | 3) set -- "$args0" "$args1" "$args2" ;;
166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172 | esac
173 | fi
174 |
175 | # Escape application args
176 | save () {
177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178 | echo " "
179 | }
180 | APP_ARGS=`save "$@"`
181 |
182 | # Collect all arguments for the java command, following the shell quoting and substitution rules
183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
184 |
185 | exec "$JAVACMD" "$@"
186 |
--------------------------------------------------------------------------------
/androidApp/src/main/java/com/baseio/kmm/android/ui/theme/Theme.kt:
--------------------------------------------------------------------------------
1 | package com.baseio.kmm.android.ui.theme
2 |
3 | import androidx.compose.foundation.isSystemInDarkTheme
4 | import androidx.compose.material.Colors
5 | import androidx.compose.material.MaterialTheme
6 | import androidx.compose.runtime.Composable
7 | import androidx.compose.runtime.CompositionLocalProvider
8 | import androidx.compose.runtime.SideEffect
9 | import androidx.compose.runtime.Stable
10 | import androidx.compose.runtime.getValue
11 | import androidx.compose.runtime.mutableStateOf
12 | import androidx.compose.runtime.remember
13 | import androidx.compose.runtime.setValue
14 | import androidx.compose.runtime.staticCompositionLocalOf
15 | import androidx.compose.ui.graphics.Color
16 |
17 | private val LightColorPalette = PraxisColorPalette(
18 | brand = White,
19 | accent = PraxisColor,
20 | accentDark = PraxisColor,
21 | iconTint = Grey,
22 | uiBackground = Neutral0,
23 | uiBorder = VeryLightGrey,
24 | uiFloated = FunctionalGrey,
25 | textPrimary = TextPrimary,
26 | textSecondary = TextSecondary,
27 | textSecondaryDark = TextSecondaryDark,
28 | textHelp = Neutral6,
29 | textInteractive = Neutral0,
30 | textLink = Ocean11,
31 | iconSecondary = Neutral7,
32 | iconInteractive = PraxisColor,
33 | iconInteractiveInactive = Grey,
34 | error = FunctionalRed,
35 | progressIndicatorBg = LightGrey,
36 | switchColor = PraxisColor,
37 | statusBarColor = PraxisColor,
38 | isDark = false,
39 | searchBarBgColor = LightGrey,
40 | buttonColor = PraxisColor,
41 | buttonTextColor = White
42 | )
43 |
44 | private val DarkColorPalette = PraxisColorPalette(
45 | brand = Shadow1,
46 | accent = PraxisColor,
47 | accentDark = DarkGreen,
48 | iconTint = Shadow1,
49 | uiBackground = GreyBg,
50 | uiBorder = Neutral3,
51 | uiFloated = FunctionalDarkGrey,
52 | textPrimary = Shadow1,
53 | textSecondary = Neutral0,
54 | textHelp = Neutral1,
55 | textInteractive = Neutral7,
56 | textLink = Ocean2,
57 | iconPrimary = Neutral3,
58 | iconSecondary = Neutral0,
59 | textSecondaryDark = Neutral0,
60 | iconInteractive = White,
61 | iconInteractiveInactive = Neutral2,
62 | error = FunctionalRedDark,
63 | progressIndicatorBg = LightGrey,
64 | switchColor = PraxisColor,
65 | statusBarColor = GreyBg,
66 | isDark = true,
67 | searchBarBgColor = SearchBarDarkColor,
68 | buttonColor = PraxisColor,
69 | buttonTextColor = White
70 |
71 | )
72 |
73 | @Composable
74 | fun PraxisTheme(
75 | darkTheme: Boolean = isSystemInDarkTheme(),
76 | content: @Composable () -> Unit
77 | ) {
78 | val colors = if (darkTheme) DarkColorPalette else LightColorPalette
79 |
80 | val sysUiController = LocalSysUiController.current
81 | SideEffect {
82 | sysUiController.setSystemBarsColor(
83 | color = colors.uiBackground.copy(alpha = AlphaNearOpaque)
84 | )
85 | }
86 |
87 | ProvidePraxisColors(colors) {
88 | MaterialTheme(
89 | colors = debugColors(darkTheme),
90 | typography = PraxisTypography,
91 | content = content
92 | )
93 | }
94 | }
95 |
96 | object PraxisTheme {
97 | val colors: PraxisColorPalette
98 | @Composable
99 | get() = LocalPraxisColor.current
100 | }
101 |
102 | /**
103 | * Praxis custom Color Palette
104 | */
105 | @Stable
106 | class PraxisColorPalette(
107 | brand: Color,
108 | accent: Color,
109 | accentDark: Color,
110 | iconTint: Color,
111 | uiBackground: Color,
112 | uiBorder: Color,
113 | uiFloated: Color,
114 | textPrimary: Color = brand,
115 | textSecondaryDark: Color,
116 | textSecondary: Color,
117 | textHelp: Color,
118 | textInteractive: Color,
119 | textLink: Color,
120 | iconPrimary: Color = brand,
121 | iconSecondary: Color,
122 | iconInteractive: Color,
123 | iconInteractiveInactive: Color,
124 | error: Color,
125 | notificationBadge: Color = error,
126 | progressIndicatorBg: Color,
127 | switchColor: Color,
128 | statusBarColor: Color,
129 | isDark: Boolean,
130 | searchBarBgColor: Color,
131 | buttonColor: Color,
132 | buttonTextColor: Color
133 | ) {
134 | var searchBarBg by mutableStateOf(searchBarBgColor)
135 | private set
136 | var brand by mutableStateOf(brand)
137 | private set
138 | var accent by mutableStateOf(accent)
139 | private set
140 | var accentDark by mutableStateOf(accentDark)
141 | private set
142 | var iconTint by mutableStateOf(iconTint)
143 | private set
144 | var uiBackground by mutableStateOf(uiBackground)
145 | private set
146 | var statusBarColor by mutableStateOf(statusBarColor)
147 | private set
148 | var uiBorder by mutableStateOf(uiBorder)
149 | private set
150 | var uiFloated by mutableStateOf(uiFloated)
151 | private set
152 | var textPrimary by mutableStateOf(textPrimary)
153 | private set
154 | var textSecondary by mutableStateOf(textSecondary)
155 | private set
156 | var textSecondaryDark by mutableStateOf(textSecondaryDark)
157 | private set
158 | var textHelp by mutableStateOf(textHelp)
159 | private set
160 | var textInteractive by mutableStateOf(textInteractive)
161 | private set
162 | var textLink by mutableStateOf(textLink)
163 | private set
164 | var iconPrimary by mutableStateOf(iconPrimary)
165 | private set
166 | var iconSecondary by mutableStateOf(iconSecondary)
167 | private set
168 | var iconInteractive by mutableStateOf(iconInteractive)
169 | private set
170 | var iconInteractiveInactive by mutableStateOf(iconInteractiveInactive)
171 | private set
172 | var error by mutableStateOf(error)
173 | private set
174 | var notificationBadge by mutableStateOf(notificationBadge)
175 | private set
176 | var progressIndicatorBg by mutableStateOf(progressIndicatorBg)
177 | private set
178 | var switchColor by mutableStateOf(switchColor)
179 | private set
180 | var isDark by mutableStateOf(isDark)
181 | private set
182 | var buttonColor by mutableStateOf(buttonColor)
183 | private set
184 |
185 | var buttonTextColor by mutableStateOf(buttonTextColor)
186 | private set
187 |
188 |
189 | fun update(other: PraxisColorPalette) {
190 | brand = other.brand
191 | uiBackground = other.uiBackground
192 | uiBorder = other.uiBorder
193 | uiFloated = other.uiFloated
194 | textPrimary = other.textPrimary
195 | textSecondary = other.textSecondary
196 | textHelp = other.textHelp
197 | textInteractive = other.textInteractive
198 | textLink = other.textLink
199 | iconPrimary = other.iconPrimary
200 | iconSecondary = other.iconSecondary
201 | iconInteractive = other.iconInteractive
202 | iconInteractiveInactive = other.iconInteractiveInactive
203 | error = other.error
204 | notificationBadge = other.notificationBadge
205 | switchColor = other.switchColor
206 | statusBarColor = other.statusBarColor
207 | isDark = other.isDark
208 | searchBarBg = other.searchBarBg
209 | buttonColor = other.buttonColor
210 | buttonTextColor = other.buttonTextColor
211 | }
212 | }
213 |
214 | @Composable
215 | fun ProvidePraxisColors(
216 | colors: PraxisColorPalette,
217 | content: @Composable () -> Unit
218 | ) {
219 | val colorPalette = remember { colors }
220 | colorPalette.update(colors)
221 | CompositionLocalProvider(LocalPraxisColor provides colorPalette, content = content)
222 | }
223 |
224 | private val LocalPraxisColor = staticCompositionLocalOf {
225 | error("No PraxisColorPalette provided")
226 | }
227 |
228 | /**
229 | * A Material [Colors] implementation which sets all colors to [debugColor] to discourage usage of
230 | * [MaterialTheme.colors] in preference to [PraxisTheme.colors].
231 | */
232 | fun debugColors(
233 | darkTheme: Boolean,
234 | debugColor: Color = Color.Red
235 | ) = Colors(
236 | primary = debugColor,
237 | primaryVariant = debugColor,
238 | secondary = debugColor,
239 | secondaryVariant = debugColor,
240 | background = debugColor,
241 | surface = debugColor,
242 | error = debugColor,
243 | onPrimary = debugColor,
244 | onSecondary = debugColor,
245 | onBackground = debugColor,
246 | onSurface = debugColor,
247 | onError = debugColor,
248 | isLight = !darkTheme
249 | )
--------------------------------------------------------------------------------
/iosApp/iosApp.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 058557BB273AAA24004C7B11 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557BA273AAA24004C7B11 /* Assets.xcassets */; };
11 | 058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */; };
12 | 12F72EEE657317AD0347C1FB /* Pods_iosApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2653B26BCBC847F765B563C5 /* Pods_iosApp.framework */; };
13 | 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2152FB032600AC8F00CF470E /* iOSApp.swift */; };
14 | 892380C2279C446F004ECDED /* CalendarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 892380C1279C446F004ECDED /* CalendarView.swift */; };
15 | 89D841702779CFB200D08BC0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89D8416F2779CFB200D08BC0 /* AppDelegate.swift */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXFileReference section */
19 | 058557BA273AAA24004C7B11 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
20 | 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
21 | 2152FB032600AC8F00CF470E /* iOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSApp.swift; sourceTree = ""; };
22 | 2653B26BCBC847F765B563C5 /* Pods_iosApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; };
23 | 7555FF7B242A565900829871 /* iosApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iosApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
24 | 7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
25 | 892380C1279C446F004ECDED /* CalendarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarView.swift; sourceTree = ""; };
26 | 89D8416F2779CFB200D08BC0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
27 | 95A4C568919CD765F48B4C71 /* Pods-iosApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.debug.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig"; sourceTree = ""; };
28 | C000B12582D1C9BAAF385E15 /* Pods-iosApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.release.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig"; sourceTree = ""; };
29 | /* End PBXFileReference section */
30 |
31 | /* Begin PBXFrameworksBuildPhase section */
32 | 2B5F32FB34CAAB6EAE5E80A8 /* Frameworks */ = {
33 | isa = PBXFrameworksBuildPhase;
34 | buildActionMask = 2147483647;
35 | files = (
36 | 12F72EEE657317AD0347C1FB /* Pods_iosApp.framework in Frameworks */,
37 | );
38 | runOnlyForDeploymentPostprocessing = 0;
39 | };
40 | /* End PBXFrameworksBuildPhase section */
41 |
42 | /* Begin PBXGroup section */
43 | 058557D7273AAEEB004C7B11 /* Preview Content */ = {
44 | isa = PBXGroup;
45 | children = (
46 | 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */,
47 | );
48 | path = "Preview Content";
49 | sourceTree = "";
50 | };
51 | 43284C8CA9782B61E3903EBC /* Pods */ = {
52 | isa = PBXGroup;
53 | children = (
54 | 95A4C568919CD765F48B4C71 /* Pods-iosApp.debug.xcconfig */,
55 | C000B12582D1C9BAAF385E15 /* Pods-iosApp.release.xcconfig */,
56 | );
57 | path = Pods;
58 | sourceTree = "";
59 | };
60 | 4443D9C6DE2DF5582B9E9D06 /* Frameworks */ = {
61 | isa = PBXGroup;
62 | children = (
63 | 2653B26BCBC847F765B563C5 /* Pods_iosApp.framework */,
64 | );
65 | name = Frameworks;
66 | sourceTree = "";
67 | };
68 | 7555FF72242A565900829871 = {
69 | isa = PBXGroup;
70 | children = (
71 | 7555FF7D242A565900829871 /* iosApp */,
72 | 7555FF7C242A565900829871 /* Products */,
73 | 43284C8CA9782B61E3903EBC /* Pods */,
74 | 4443D9C6DE2DF5582B9E9D06 /* Frameworks */,
75 | );
76 | sourceTree = "";
77 | };
78 | 7555FF7C242A565900829871 /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 7555FF7B242A565900829871 /* iosApp.app */,
82 | );
83 | name = Products;
84 | sourceTree = "";
85 | };
86 | 7555FF7D242A565900829871 /* iosApp */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 058557BA273AAA24004C7B11 /* Assets.xcassets */,
90 | 7555FF8C242A565B00829871 /* Info.plist */,
91 | 2152FB032600AC8F00CF470E /* iOSApp.swift */,
92 | 058557D7273AAEEB004C7B11 /* Preview Content */,
93 | 89D8416F2779CFB200D08BC0 /* AppDelegate.swift */,
94 | 892380C1279C446F004ECDED /* CalendarView.swift */,
95 | );
96 | path = iosApp;
97 | sourceTree = "";
98 | };
99 | /* End PBXGroup section */
100 |
101 | /* Begin PBXNativeTarget section */
102 | 7555FF7A242A565900829871 /* iosApp */ = {
103 | isa = PBXNativeTarget;
104 | buildConfigurationList = 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */;
105 | buildPhases = (
106 | EA1B7D0D1D69916276B38A29 /* [CP] Check Pods Manifest.lock */,
107 | 7555FF77242A565900829871 /* Sources */,
108 | 7555FF79242A565900829871 /* Resources */,
109 | 2B5F32FB34CAAB6EAE5E80A8 /* Frameworks */,
110 | 2E192C8A111ADEA0FF58BA61 /* [CP] Embed Pods Frameworks */,
111 | );
112 | buildRules = (
113 | );
114 | dependencies = (
115 | );
116 | name = iosApp;
117 | productName = iosApp;
118 | productReference = 7555FF7B242A565900829871 /* iosApp.app */;
119 | productType = "com.apple.product-type.application";
120 | };
121 | /* End PBXNativeTarget section */
122 |
123 | /* Begin PBXProject section */
124 | 7555FF73242A565900829871 /* Project object */ = {
125 | isa = PBXProject;
126 | attributes = {
127 | LastSwiftUpdateCheck = 1130;
128 | LastUpgradeCheck = 1130;
129 | ORGANIZATIONNAME = orgName;
130 | TargetAttributes = {
131 | 7555FF7A242A565900829871 = {
132 | CreatedOnToolsVersion = 11.3.1;
133 | };
134 | };
135 | };
136 | buildConfigurationList = 7555FF76242A565900829871 /* Build configuration list for PBXProject "iosApp" */;
137 | compatibilityVersion = "Xcode 9.3";
138 | developmentRegion = en;
139 | hasScannedForEncodings = 0;
140 | knownRegions = (
141 | en,
142 | Base,
143 | );
144 | mainGroup = 7555FF72242A565900829871;
145 | productRefGroup = 7555FF7C242A565900829871 /* Products */;
146 | projectDirPath = "";
147 | projectRoot = "";
148 | targets = (
149 | 7555FF7A242A565900829871 /* iosApp */,
150 | );
151 | };
152 | /* End PBXProject section */
153 |
154 | /* Begin PBXResourcesBuildPhase section */
155 | 7555FF79242A565900829871 /* Resources */ = {
156 | isa = PBXResourcesBuildPhase;
157 | buildActionMask = 2147483647;
158 | files = (
159 | 058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */,
160 | 058557BB273AAA24004C7B11 /* Assets.xcassets in Resources */,
161 | );
162 | runOnlyForDeploymentPostprocessing = 0;
163 | };
164 | /* End PBXResourcesBuildPhase section */
165 |
166 | /* Begin PBXShellScriptBuildPhase section */
167 | 2E192C8A111ADEA0FF58BA61 /* [CP] Embed Pods Frameworks */ = {
168 | isa = PBXShellScriptBuildPhase;
169 | buildActionMask = 2147483647;
170 | files = (
171 | );
172 | inputFileListPaths = (
173 | "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-frameworks-${CONFIGURATION}-input-files.xcfilelist",
174 | );
175 | name = "[CP] Embed Pods Frameworks";
176 | outputFileListPaths = (
177 | "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-frameworks-${CONFIGURATION}-output-files.xcfilelist",
178 | );
179 | runOnlyForDeploymentPostprocessing = 0;
180 | shellPath = /bin/sh;
181 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-frameworks.sh\"\n";
182 | showEnvVarsInLog = 0;
183 | };
184 | EA1B7D0D1D69916276B38A29 /* [CP] Check Pods Manifest.lock */ = {
185 | isa = PBXShellScriptBuildPhase;
186 | buildActionMask = 2147483647;
187 | files = (
188 | );
189 | inputFileListPaths = (
190 | );
191 | inputPaths = (
192 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
193 | "${PODS_ROOT}/Manifest.lock",
194 | );
195 | name = "[CP] Check Pods Manifest.lock";
196 | outputFileListPaths = (
197 | );
198 | outputPaths = (
199 | "$(DERIVED_FILE_DIR)/Pods-iosApp-checkManifestLockResult.txt",
200 | );
201 | runOnlyForDeploymentPostprocessing = 0;
202 | shellPath = /bin/sh;
203 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
204 | showEnvVarsInLog = 0;
205 | };
206 | /* End PBXShellScriptBuildPhase section */
207 |
208 | /* Begin PBXSourcesBuildPhase section */
209 | 7555FF77242A565900829871 /* Sources */ = {
210 | isa = PBXSourcesBuildPhase;
211 | buildActionMask = 2147483647;
212 | files = (
213 | 89D841702779CFB200D08BC0 /* AppDelegate.swift in Sources */,
214 | 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */,
215 | 892380C2279C446F004ECDED /* CalendarView.swift in Sources */,
216 | );
217 | runOnlyForDeploymentPostprocessing = 0;
218 | };
219 | /* End PBXSourcesBuildPhase section */
220 |
221 | /* Begin XCBuildConfiguration section */
222 | 7555FFA3242A565B00829871 /* Debug */ = {
223 | isa = XCBuildConfiguration;
224 | buildSettings = {
225 | ALWAYS_SEARCH_USER_PATHS = NO;
226 | CLANG_ANALYZER_NONNULL = YES;
227 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
228 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
229 | CLANG_CXX_LIBRARY = "libc++";
230 | CLANG_ENABLE_MODULES = YES;
231 | CLANG_ENABLE_OBJC_ARC = YES;
232 | CLANG_ENABLE_OBJC_WEAK = YES;
233 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
234 | CLANG_WARN_BOOL_CONVERSION = YES;
235 | CLANG_WARN_COMMA = YES;
236 | CLANG_WARN_CONSTANT_CONVERSION = YES;
237 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
238 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
239 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
240 | CLANG_WARN_EMPTY_BODY = YES;
241 | CLANG_WARN_ENUM_CONVERSION = YES;
242 | CLANG_WARN_INFINITE_RECURSION = YES;
243 | CLANG_WARN_INT_CONVERSION = YES;
244 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
245 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
246 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
247 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
248 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
249 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
250 | CLANG_WARN_STRICT_PROTOTYPES = YES;
251 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
252 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
253 | CLANG_WARN_UNREACHABLE_CODE = YES;
254 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
255 | COPY_PHASE_STRIP = NO;
256 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
257 | ENABLE_STRICT_OBJC_MSGSEND = YES;
258 | ENABLE_TESTABILITY = YES;
259 | GCC_C_LANGUAGE_STANDARD = gnu11;
260 | GCC_DYNAMIC_NO_PIC = NO;
261 | GCC_NO_COMMON_BLOCKS = YES;
262 | GCC_OPTIMIZATION_LEVEL = 0;
263 | GCC_PREPROCESSOR_DEFINITIONS = (
264 | "DEBUG=1",
265 | "$(inherited)",
266 | );
267 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
268 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
269 | GCC_WARN_UNDECLARED_SELECTOR = YES;
270 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
271 | GCC_WARN_UNUSED_FUNCTION = YES;
272 | GCC_WARN_UNUSED_VARIABLE = YES;
273 | IPHONEOS_DEPLOYMENT_TARGET = 14.1;
274 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
275 | MTL_FAST_MATH = YES;
276 | ONLY_ACTIVE_ARCH = YES;
277 | SDKROOT = iphoneos;
278 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
279 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
280 | };
281 | name = Debug;
282 | };
283 | 7555FFA4242A565B00829871 /* Release */ = {
284 | isa = XCBuildConfiguration;
285 | buildSettings = {
286 | ALWAYS_SEARCH_USER_PATHS = NO;
287 | CLANG_ANALYZER_NONNULL = YES;
288 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
289 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
290 | CLANG_CXX_LIBRARY = "libc++";
291 | CLANG_ENABLE_MODULES = YES;
292 | CLANG_ENABLE_OBJC_ARC = YES;
293 | CLANG_ENABLE_OBJC_WEAK = YES;
294 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
295 | CLANG_WARN_BOOL_CONVERSION = YES;
296 | CLANG_WARN_COMMA = YES;
297 | CLANG_WARN_CONSTANT_CONVERSION = YES;
298 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
299 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
300 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
301 | CLANG_WARN_EMPTY_BODY = YES;
302 | CLANG_WARN_ENUM_CONVERSION = YES;
303 | CLANG_WARN_INFINITE_RECURSION = YES;
304 | CLANG_WARN_INT_CONVERSION = YES;
305 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
306 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
307 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
308 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
309 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
310 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
311 | CLANG_WARN_STRICT_PROTOTYPES = YES;
312 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
313 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
314 | CLANG_WARN_UNREACHABLE_CODE = YES;
315 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
316 | COPY_PHASE_STRIP = NO;
317 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
318 | ENABLE_NS_ASSERTIONS = NO;
319 | ENABLE_STRICT_OBJC_MSGSEND = YES;
320 | GCC_C_LANGUAGE_STANDARD = gnu11;
321 | GCC_NO_COMMON_BLOCKS = YES;
322 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
323 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
324 | GCC_WARN_UNDECLARED_SELECTOR = YES;
325 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
326 | GCC_WARN_UNUSED_FUNCTION = YES;
327 | GCC_WARN_UNUSED_VARIABLE = YES;
328 | IPHONEOS_DEPLOYMENT_TARGET = 14.1;
329 | MTL_ENABLE_DEBUG_INFO = NO;
330 | MTL_FAST_MATH = YES;
331 | SDKROOT = iphoneos;
332 | SWIFT_COMPILATION_MODE = wholemodule;
333 | SWIFT_OPTIMIZATION_LEVEL = "-O";
334 | VALIDATE_PRODUCT = YES;
335 | };
336 | name = Release;
337 | };
338 | 7555FFA6242A565B00829871 /* Debug */ = {
339 | isa = XCBuildConfiguration;
340 | baseConfigurationReference = 95A4C568919CD765F48B4C71 /* Pods-iosApp.debug.xcconfig */;
341 | buildSettings = {
342 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
343 | CODE_SIGN_STYLE = Automatic;
344 | DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
345 | DEVELOPMENT_TEAM = S4G3GQXM69;
346 | ENABLE_PREVIEWS = YES;
347 | INFOPLIST_FILE = iosApp/Info.plist;
348 | IPHONEOS_DEPLOYMENT_TARGET = 15.0;
349 | LD_RUNPATH_SEARCH_PATHS = (
350 | "$(inherited)",
351 | "@executable_path/Frameworks",
352 | );
353 | OTHER_LDFLAGS = (
354 | "$(inherited)",
355 | "-ObjC",
356 | "-l\"c++\"",
357 | "-framework",
358 | "\"KMPNativeCoroutinesCombine\"",
359 | "-framework",
360 | "\"KMPNativeCoroutinesCore\"",
361 | "-framework",
362 | "\"shared\"",
363 | "-lsqlite3",
364 | );
365 | PRODUCT_BUNDLE_IDENTIFIER = com.something.exa;
366 | PRODUCT_NAME = "$(TARGET_NAME)";
367 | SWIFT_VERSION = 5.0;
368 | TARGETED_DEVICE_FAMILY = "1,2";
369 | };
370 | name = Debug;
371 | };
372 | 7555FFA7242A565B00829871 /* Release */ = {
373 | isa = XCBuildConfiguration;
374 | baseConfigurationReference = C000B12582D1C9BAAF385E15 /* Pods-iosApp.release.xcconfig */;
375 | buildSettings = {
376 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
377 | CODE_SIGN_STYLE = Automatic;
378 | DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
379 | DEVELOPMENT_TEAM = S4G3GQXM69;
380 | ENABLE_PREVIEWS = YES;
381 | INFOPLIST_FILE = iosApp/Info.plist;
382 | IPHONEOS_DEPLOYMENT_TARGET = 15.0;
383 | LD_RUNPATH_SEARCH_PATHS = (
384 | "$(inherited)",
385 | "@executable_path/Frameworks",
386 | );
387 | OTHER_LDFLAGS = (
388 | "$(inherited)",
389 | "-ObjC",
390 | "-l\"c++\"",
391 | "-framework",
392 | "\"KMPNativeCoroutinesCombine\"",
393 | "-framework",
394 | "\"KMPNativeCoroutinesCore\"",
395 | "-framework",
396 | "\"shared\"",
397 | "-lsqlite3",
398 | );
399 | PRODUCT_BUNDLE_IDENTIFIER = com.something.exa;
400 | PRODUCT_NAME = "$(TARGET_NAME)";
401 | SWIFT_VERSION = 5.0;
402 | TARGETED_DEVICE_FAMILY = "1,2";
403 | };
404 | name = Release;
405 | };
406 | /* End XCBuildConfiguration section */
407 |
408 | /* Begin XCConfigurationList section */
409 | 7555FF76242A565900829871 /* Build configuration list for PBXProject "iosApp" */ = {
410 | isa = XCConfigurationList;
411 | buildConfigurations = (
412 | 7555FFA3242A565B00829871 /* Debug */,
413 | 7555FFA4242A565B00829871 /* Release */,
414 | );
415 | defaultConfigurationIsVisible = 0;
416 | defaultConfigurationName = Release;
417 | };
418 | 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */ = {
419 | isa = XCConfigurationList;
420 | buildConfigurations = (
421 | 7555FFA6242A565B00829871 /* Debug */,
422 | 7555FFA7242A565B00829871 /* Release */,
423 | );
424 | defaultConfigurationIsVisible = 0;
425 | defaultConfigurationName = Release;
426 | };
427 | /* End XCConfigurationList section */
428 | };
429 | rootObject = 7555FF73242A565900829871 /* Project object */;
430 | }
431 |
--------------------------------------------------------------------------------
/macOS/macOS.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 55;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 89D8421F277A218500D08BC0 /* macOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89D8421E277A218500D08BC0 /* macOSApp.swift */; };
11 | 89D84223277A218600D08BC0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 89D84222277A218600D08BC0 /* Assets.xcassets */; };
12 | 89D84226277A218600D08BC0 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 89D84225277A218600D08BC0 /* Preview Assets.xcassets */; };
13 | 89D84231277A218600D08BC0 /* macOSTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89D84230277A218600D08BC0 /* macOSTests.swift */; };
14 | 89D8423B277A218600D08BC0 /* macOSUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89D8423A277A218600D08BC0 /* macOSUITests.swift */; };
15 | 89D8423D277A218600D08BC0 /* macOSUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89D8423C277A218600D08BC0 /* macOSUITestsLaunchTests.swift */; };
16 | D517D08F8A4365D67D27DE7F /* libPods-macOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EA38324EF8E940C0D06D4CE /* libPods-macOS.a */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXContainerItemProxy section */
20 | 89D8422D277A218600D08BC0 /* PBXContainerItemProxy */ = {
21 | isa = PBXContainerItemProxy;
22 | containerPortal = 89D84213277A218500D08BC0 /* Project object */;
23 | proxyType = 1;
24 | remoteGlobalIDString = 89D8421A277A218500D08BC0;
25 | remoteInfo = macOS;
26 | };
27 | 89D84237277A218600D08BC0 /* PBXContainerItemProxy */ = {
28 | isa = PBXContainerItemProxy;
29 | containerPortal = 89D84213277A218500D08BC0 /* Project object */;
30 | proxyType = 1;
31 | remoteGlobalIDString = 89D8421A277A218500D08BC0;
32 | remoteInfo = macOS;
33 | };
34 | /* End PBXContainerItemProxy section */
35 |
36 | /* Begin PBXFileReference section */
37 | 14536A7C63C12B806054769C /* Pods-macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-macOS.debug.xcconfig"; path = "Target Support Files/Pods-macOS/Pods-macOS.debug.xcconfig"; sourceTree = ""; };
38 | 1EA38324EF8E940C0D06D4CE /* libPods-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
39 | 854FBFAB66BF3DF25604115C /* Pods-macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-macOS.release.xcconfig"; path = "Target Support Files/Pods-macOS/Pods-macOS.release.xcconfig"; sourceTree = ""; };
40 | 89D8421B277A218500D08BC0 /* macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = macOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 89D8421E277A218500D08BC0 /* macOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = macOSApp.swift; sourceTree = ""; };
42 | 89D84222277A218600D08BC0 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | 89D84225277A218600D08BC0 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
44 | 89D84227277A218600D08BC0 /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; };
45 | 89D8422C277A218600D08BC0 /* macOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = macOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
46 | 89D84230277A218600D08BC0 /* macOSTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = macOSTests.swift; sourceTree = ""; };
47 | 89D84236277A218600D08BC0 /* macOSUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = macOSUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
48 | 89D8423A277A218600D08BC0 /* macOSUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = macOSUITests.swift; sourceTree = ""; };
49 | 89D8423C277A218600D08BC0 /* macOSUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = macOSUITestsLaunchTests.swift; sourceTree = ""; };
50 | /* End PBXFileReference section */
51 |
52 | /* Begin PBXFrameworksBuildPhase section */
53 | 89D84218277A218500D08BC0 /* Frameworks */ = {
54 | isa = PBXFrameworksBuildPhase;
55 | buildActionMask = 2147483647;
56 | files = (
57 | D517D08F8A4365D67D27DE7F /* libPods-macOS.a in Frameworks */,
58 | );
59 | runOnlyForDeploymentPostprocessing = 0;
60 | };
61 | 89D84229277A218600D08BC0 /* Frameworks */ = {
62 | isa = PBXFrameworksBuildPhase;
63 | buildActionMask = 2147483647;
64 | files = (
65 | );
66 | runOnlyForDeploymentPostprocessing = 0;
67 | };
68 | 89D84233277A218600D08BC0 /* Frameworks */ = {
69 | isa = PBXFrameworksBuildPhase;
70 | buildActionMask = 2147483647;
71 | files = (
72 | );
73 | runOnlyForDeploymentPostprocessing = 0;
74 | };
75 | /* End PBXFrameworksBuildPhase section */
76 |
77 | /* Begin PBXGroup section */
78 | 403E6E4318611032E81F5AB5 /* Pods */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 14536A7C63C12B806054769C /* Pods-macOS.debug.xcconfig */,
82 | 854FBFAB66BF3DF25604115C /* Pods-macOS.release.xcconfig */,
83 | );
84 | path = Pods;
85 | sourceTree = "";
86 | };
87 | 89D84212277A218500D08BC0 = {
88 | isa = PBXGroup;
89 | children = (
90 | 89D8421D277A218500D08BC0 /* macOS */,
91 | 89D8422F277A218600D08BC0 /* macOSTests */,
92 | 89D84239277A218600D08BC0 /* macOSUITests */,
93 | 89D8421C277A218500D08BC0 /* Products */,
94 | 403E6E4318611032E81F5AB5 /* Pods */,
95 | 8A313E3128877F794EC8E09F /* Frameworks */,
96 | );
97 | sourceTree = "";
98 | };
99 | 89D8421C277A218500D08BC0 /* Products */ = {
100 | isa = PBXGroup;
101 | children = (
102 | 89D8421B277A218500D08BC0 /* macOS.app */,
103 | 89D8422C277A218600D08BC0 /* macOSTests.xctest */,
104 | 89D84236277A218600D08BC0 /* macOSUITests.xctest */,
105 | );
106 | name = Products;
107 | sourceTree = "";
108 | };
109 | 89D8421D277A218500D08BC0 /* macOS */ = {
110 | isa = PBXGroup;
111 | children = (
112 | 89D8421E277A218500D08BC0 /* macOSApp.swift */,
113 | 89D84222277A218600D08BC0 /* Assets.xcassets */,
114 | 89D84227277A218600D08BC0 /* macOS.entitlements */,
115 | 89D84224277A218600D08BC0 /* Preview Content */,
116 | );
117 | path = macOS;
118 | sourceTree = "";
119 | };
120 | 89D84224277A218600D08BC0 /* Preview Content */ = {
121 | isa = PBXGroup;
122 | children = (
123 | 89D84225277A218600D08BC0 /* Preview Assets.xcassets */,
124 | );
125 | path = "Preview Content";
126 | sourceTree = "";
127 | };
128 | 89D8422F277A218600D08BC0 /* macOSTests */ = {
129 | isa = PBXGroup;
130 | children = (
131 | 89D84230277A218600D08BC0 /* macOSTests.swift */,
132 | );
133 | path = macOSTests;
134 | sourceTree = "";
135 | };
136 | 89D84239277A218600D08BC0 /* macOSUITests */ = {
137 | isa = PBXGroup;
138 | children = (
139 | 89D8423A277A218600D08BC0 /* macOSUITests.swift */,
140 | 89D8423C277A218600D08BC0 /* macOSUITestsLaunchTests.swift */,
141 | );
142 | path = macOSUITests;
143 | sourceTree = "";
144 | };
145 | 8A313E3128877F794EC8E09F /* Frameworks */ = {
146 | isa = PBXGroup;
147 | children = (
148 | 1EA38324EF8E940C0D06D4CE /* libPods-macOS.a */,
149 | );
150 | name = Frameworks;
151 | sourceTree = "";
152 | };
153 | /* End PBXGroup section */
154 |
155 | /* Begin PBXNativeTarget section */
156 | 89D8421A277A218500D08BC0 /* macOS */ = {
157 | isa = PBXNativeTarget;
158 | buildConfigurationList = 89D84240277A218600D08BC0 /* Build configuration list for PBXNativeTarget "macOS" */;
159 | buildPhases = (
160 | 2F083E599676636460651DC1 /* [CP] Check Pods Manifest.lock */,
161 | 89D84217277A218500D08BC0 /* Sources */,
162 | 89D84218277A218500D08BC0 /* Frameworks */,
163 | 89D84219277A218500D08BC0 /* Resources */,
164 | );
165 | buildRules = (
166 | );
167 | dependencies = (
168 | );
169 | name = macOS;
170 | productName = macOS;
171 | productReference = 89D8421B277A218500D08BC0 /* macOS.app */;
172 | productType = "com.apple.product-type.application";
173 | };
174 | 89D8422B277A218600D08BC0 /* macOSTests */ = {
175 | isa = PBXNativeTarget;
176 | buildConfigurationList = 89D84243277A218600D08BC0 /* Build configuration list for PBXNativeTarget "macOSTests" */;
177 | buildPhases = (
178 | 89D84228277A218600D08BC0 /* Sources */,
179 | 89D84229277A218600D08BC0 /* Frameworks */,
180 | 89D8422A277A218600D08BC0 /* Resources */,
181 | );
182 | buildRules = (
183 | );
184 | dependencies = (
185 | 89D8422E277A218600D08BC0 /* PBXTargetDependency */,
186 | );
187 | name = macOSTests;
188 | productName = macOSTests;
189 | productReference = 89D8422C277A218600D08BC0 /* macOSTests.xctest */;
190 | productType = "com.apple.product-type.bundle.unit-test";
191 | };
192 | 89D84235277A218600D08BC0 /* macOSUITests */ = {
193 | isa = PBXNativeTarget;
194 | buildConfigurationList = 89D84246277A218600D08BC0 /* Build configuration list for PBXNativeTarget "macOSUITests" */;
195 | buildPhases = (
196 | 89D84232277A218600D08BC0 /* Sources */,
197 | 89D84233277A218600D08BC0 /* Frameworks */,
198 | 89D84234277A218600D08BC0 /* Resources */,
199 | );
200 | buildRules = (
201 | );
202 | dependencies = (
203 | 89D84238277A218600D08BC0 /* PBXTargetDependency */,
204 | );
205 | name = macOSUITests;
206 | productName = macOSUITests;
207 | productReference = 89D84236277A218600D08BC0 /* macOSUITests.xctest */;
208 | productType = "com.apple.product-type.bundle.ui-testing";
209 | };
210 | /* End PBXNativeTarget section */
211 |
212 | /* Begin PBXProject section */
213 | 89D84213277A218500D08BC0 /* Project object */ = {
214 | isa = PBXProject;
215 | attributes = {
216 | BuildIndependentTargetsInParallel = 1;
217 | LastSwiftUpdateCheck = 1320;
218 | LastUpgradeCheck = 1320;
219 | TargetAttributes = {
220 | 89D8421A277A218500D08BC0 = {
221 | CreatedOnToolsVersion = 13.2.1;
222 | };
223 | 89D8422B277A218600D08BC0 = {
224 | CreatedOnToolsVersion = 13.2.1;
225 | TestTargetID = 89D8421A277A218500D08BC0;
226 | };
227 | 89D84235277A218600D08BC0 = {
228 | CreatedOnToolsVersion = 13.2.1;
229 | TestTargetID = 89D8421A277A218500D08BC0;
230 | };
231 | };
232 | };
233 | buildConfigurationList = 89D84216277A218500D08BC0 /* Build configuration list for PBXProject "macOS" */;
234 | compatibilityVersion = "Xcode 13.0";
235 | developmentRegion = en;
236 | hasScannedForEncodings = 0;
237 | knownRegions = (
238 | en,
239 | Base,
240 | );
241 | mainGroup = 89D84212277A218500D08BC0;
242 | productRefGroup = 89D8421C277A218500D08BC0 /* Products */;
243 | projectDirPath = "";
244 | projectRoot = "";
245 | targets = (
246 | 89D8421A277A218500D08BC0 /* macOS */,
247 | 89D8422B277A218600D08BC0 /* macOSTests */,
248 | 89D84235277A218600D08BC0 /* macOSUITests */,
249 | );
250 | };
251 | /* End PBXProject section */
252 |
253 | /* Begin PBXResourcesBuildPhase section */
254 | 89D84219277A218500D08BC0 /* Resources */ = {
255 | isa = PBXResourcesBuildPhase;
256 | buildActionMask = 2147483647;
257 | files = (
258 | 89D84226277A218600D08BC0 /* Preview Assets.xcassets in Resources */,
259 | 89D84223277A218600D08BC0 /* Assets.xcassets in Resources */,
260 | );
261 | runOnlyForDeploymentPostprocessing = 0;
262 | };
263 | 89D8422A277A218600D08BC0 /* Resources */ = {
264 | isa = PBXResourcesBuildPhase;
265 | buildActionMask = 2147483647;
266 | files = (
267 | );
268 | runOnlyForDeploymentPostprocessing = 0;
269 | };
270 | 89D84234277A218600D08BC0 /* Resources */ = {
271 | isa = PBXResourcesBuildPhase;
272 | buildActionMask = 2147483647;
273 | files = (
274 | );
275 | runOnlyForDeploymentPostprocessing = 0;
276 | };
277 | /* End PBXResourcesBuildPhase section */
278 |
279 | /* Begin PBXShellScriptBuildPhase section */
280 | 2F083E599676636460651DC1 /* [CP] Check Pods Manifest.lock */ = {
281 | isa = PBXShellScriptBuildPhase;
282 | buildActionMask = 2147483647;
283 | files = (
284 | );
285 | inputFileListPaths = (
286 | );
287 | inputPaths = (
288 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
289 | "${PODS_ROOT}/Manifest.lock",
290 | );
291 | name = "[CP] Check Pods Manifest.lock";
292 | outputFileListPaths = (
293 | );
294 | outputPaths = (
295 | "$(DERIVED_FILE_DIR)/Pods-macOS-checkManifestLockResult.txt",
296 | );
297 | runOnlyForDeploymentPostprocessing = 0;
298 | shellPath = /bin/sh;
299 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
300 | showEnvVarsInLog = 0;
301 | };
302 | /* End PBXShellScriptBuildPhase section */
303 |
304 | /* Begin PBXSourcesBuildPhase section */
305 | 89D84217277A218500D08BC0 /* Sources */ = {
306 | isa = PBXSourcesBuildPhase;
307 | buildActionMask = 2147483647;
308 | files = (
309 | 89D8421F277A218500D08BC0 /* macOSApp.swift in Sources */,
310 | );
311 | runOnlyForDeploymentPostprocessing = 0;
312 | };
313 | 89D84228277A218600D08BC0 /* Sources */ = {
314 | isa = PBXSourcesBuildPhase;
315 | buildActionMask = 2147483647;
316 | files = (
317 | 89D84231277A218600D08BC0 /* macOSTests.swift in Sources */,
318 | );
319 | runOnlyForDeploymentPostprocessing = 0;
320 | };
321 | 89D84232277A218600D08BC0 /* Sources */ = {
322 | isa = PBXSourcesBuildPhase;
323 | buildActionMask = 2147483647;
324 | files = (
325 | 89D8423D277A218600D08BC0 /* macOSUITestsLaunchTests.swift in Sources */,
326 | 89D8423B277A218600D08BC0 /* macOSUITests.swift in Sources */,
327 | );
328 | runOnlyForDeploymentPostprocessing = 0;
329 | };
330 | /* End PBXSourcesBuildPhase section */
331 |
332 | /* Begin PBXTargetDependency section */
333 | 89D8422E277A218600D08BC0 /* PBXTargetDependency */ = {
334 | isa = PBXTargetDependency;
335 | target = 89D8421A277A218500D08BC0 /* macOS */;
336 | targetProxy = 89D8422D277A218600D08BC0 /* PBXContainerItemProxy */;
337 | };
338 | 89D84238277A218600D08BC0 /* PBXTargetDependency */ = {
339 | isa = PBXTargetDependency;
340 | target = 89D8421A277A218500D08BC0 /* macOS */;
341 | targetProxy = 89D84237277A218600D08BC0 /* PBXContainerItemProxy */;
342 | };
343 | /* End PBXTargetDependency section */
344 |
345 | /* Begin XCBuildConfiguration section */
346 | 89D8423E277A218600D08BC0 /* Debug */ = {
347 | isa = XCBuildConfiguration;
348 | buildSettings = {
349 | ALWAYS_SEARCH_USER_PATHS = NO;
350 | CLANG_ANALYZER_NONNULL = YES;
351 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
352 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
353 | CLANG_CXX_LIBRARY = "libc++";
354 | CLANG_ENABLE_MODULES = YES;
355 | CLANG_ENABLE_OBJC_ARC = YES;
356 | CLANG_ENABLE_OBJC_WEAK = YES;
357 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
358 | CLANG_WARN_BOOL_CONVERSION = YES;
359 | CLANG_WARN_COMMA = YES;
360 | CLANG_WARN_CONSTANT_CONVERSION = YES;
361 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
362 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
363 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
364 | CLANG_WARN_EMPTY_BODY = YES;
365 | CLANG_WARN_ENUM_CONVERSION = YES;
366 | CLANG_WARN_INFINITE_RECURSION = YES;
367 | CLANG_WARN_INT_CONVERSION = YES;
368 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
369 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
370 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
371 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
372 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
373 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
374 | CLANG_WARN_STRICT_PROTOTYPES = YES;
375 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
376 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
377 | CLANG_WARN_UNREACHABLE_CODE = YES;
378 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
379 | COPY_PHASE_STRIP = NO;
380 | DEBUG_INFORMATION_FORMAT = dwarf;
381 | ENABLE_STRICT_OBJC_MSGSEND = YES;
382 | ENABLE_TESTABILITY = YES;
383 | GCC_C_LANGUAGE_STANDARD = gnu11;
384 | GCC_DYNAMIC_NO_PIC = NO;
385 | GCC_NO_COMMON_BLOCKS = YES;
386 | GCC_OPTIMIZATION_LEVEL = 0;
387 | GCC_PREPROCESSOR_DEFINITIONS = (
388 | "DEBUG=1",
389 | "$(inherited)",
390 | );
391 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
392 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
393 | GCC_WARN_UNDECLARED_SELECTOR = YES;
394 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
395 | GCC_WARN_UNUSED_FUNCTION = YES;
396 | GCC_WARN_UNUSED_VARIABLE = YES;
397 | MACOSX_DEPLOYMENT_TARGET = 12.0;
398 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
399 | MTL_FAST_MATH = YES;
400 | ONLY_ACTIVE_ARCH = YES;
401 | SDKROOT = macosx;
402 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
403 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
404 | };
405 | name = Debug;
406 | };
407 | 89D8423F277A218600D08BC0 /* Release */ = {
408 | isa = XCBuildConfiguration;
409 | buildSettings = {
410 | ALWAYS_SEARCH_USER_PATHS = NO;
411 | CLANG_ANALYZER_NONNULL = YES;
412 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
413 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
414 | CLANG_CXX_LIBRARY = "libc++";
415 | CLANG_ENABLE_MODULES = YES;
416 | CLANG_ENABLE_OBJC_ARC = YES;
417 | CLANG_ENABLE_OBJC_WEAK = YES;
418 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
419 | CLANG_WARN_BOOL_CONVERSION = YES;
420 | CLANG_WARN_COMMA = YES;
421 | CLANG_WARN_CONSTANT_CONVERSION = YES;
422 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
423 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
424 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
425 | CLANG_WARN_EMPTY_BODY = YES;
426 | CLANG_WARN_ENUM_CONVERSION = YES;
427 | CLANG_WARN_INFINITE_RECURSION = YES;
428 | CLANG_WARN_INT_CONVERSION = YES;
429 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
430 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
431 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
432 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
433 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
434 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
435 | CLANG_WARN_STRICT_PROTOTYPES = YES;
436 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
437 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
438 | CLANG_WARN_UNREACHABLE_CODE = YES;
439 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
440 | COPY_PHASE_STRIP = NO;
441 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
442 | ENABLE_NS_ASSERTIONS = NO;
443 | ENABLE_STRICT_OBJC_MSGSEND = YES;
444 | GCC_C_LANGUAGE_STANDARD = gnu11;
445 | GCC_NO_COMMON_BLOCKS = YES;
446 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
447 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
448 | GCC_WARN_UNDECLARED_SELECTOR = YES;
449 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
450 | GCC_WARN_UNUSED_FUNCTION = YES;
451 | GCC_WARN_UNUSED_VARIABLE = YES;
452 | MACOSX_DEPLOYMENT_TARGET = 12.0;
453 | MTL_ENABLE_DEBUG_INFO = NO;
454 | MTL_FAST_MATH = YES;
455 | SDKROOT = macosx;
456 | SWIFT_COMPILATION_MODE = wholemodule;
457 | SWIFT_OPTIMIZATION_LEVEL = "-O";
458 | };
459 | name = Release;
460 | };
461 | 89D84241277A218600D08BC0 /* Debug */ = {
462 | isa = XCBuildConfiguration;
463 | baseConfigurationReference = 14536A7C63C12B806054769C /* Pods-macOS.debug.xcconfig */;
464 | buildSettings = {
465 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
466 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
467 | CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
468 | CODE_SIGN_STYLE = Automatic;
469 | COMBINE_HIDPI_IMAGES = YES;
470 | CURRENT_PROJECT_VERSION = 1;
471 | DEVELOPMENT_ASSET_PATHS = "\"macOS/Preview Content\"";
472 | DEVELOPMENT_TEAM = S4G3GQXM69;
473 | ENABLE_HARDENED_RUNTIME = YES;
474 | ENABLE_PREVIEWS = YES;
475 | GENERATE_INFOPLIST_FILE = YES;
476 | INFOPLIST_KEY_NSHumanReadableCopyright = "";
477 | LD_RUNPATH_SEARCH_PATHS = (
478 | "$(inherited)",
479 | "@executable_path/../Frameworks",
480 | );
481 | MARKETING_VERSION = 1.0;
482 | OTHER_LDFLAGS = (
483 | "$(inherited)",
484 | "-ObjC",
485 | "-l\"KMPNativeCoroutinesCombine\"",
486 | "-l\"KMPNativeCoroutinesCore\"",
487 | "-l\"c++\"",
488 | "-framework",
489 | "\"Combine\"",
490 | "-framework",
491 | "\"shared\"",
492 | "\"-lsqlite3\"",
493 | );
494 | PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.iosApp.macOS;
495 | PRODUCT_NAME = "$(TARGET_NAME)";
496 | SWIFT_EMIT_LOC_STRINGS = YES;
497 | SWIFT_VERSION = 5.0;
498 | };
499 | name = Debug;
500 | };
501 | 89D84242277A218600D08BC0 /* Release */ = {
502 | isa = XCBuildConfiguration;
503 | baseConfigurationReference = 854FBFAB66BF3DF25604115C /* Pods-macOS.release.xcconfig */;
504 | buildSettings = {
505 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
506 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
507 | CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
508 | CODE_SIGN_STYLE = Automatic;
509 | COMBINE_HIDPI_IMAGES = YES;
510 | CURRENT_PROJECT_VERSION = 1;
511 | DEVELOPMENT_ASSET_PATHS = "\"macOS/Preview Content\"";
512 | DEVELOPMENT_TEAM = S4G3GQXM69;
513 | ENABLE_HARDENED_RUNTIME = YES;
514 | ENABLE_PREVIEWS = YES;
515 | GENERATE_INFOPLIST_FILE = YES;
516 | INFOPLIST_KEY_NSHumanReadableCopyright = "";
517 | LD_RUNPATH_SEARCH_PATHS = (
518 | "$(inherited)",
519 | "@executable_path/../Frameworks",
520 | );
521 | MARKETING_VERSION = 1.0;
522 | OTHER_LDFLAGS = (
523 | "$(inherited)",
524 | "-ObjC",
525 | "-l\"KMPNativeCoroutinesCombine\"",
526 | "-l\"KMPNativeCoroutinesCore\"",
527 | "-l\"c++\"",
528 | "-framework",
529 | "\"Combine\"",
530 | "-framework",
531 | "\"shared\"",
532 | "\"-lsqlite3\"",
533 | );
534 | PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.iosApp.macOS;
535 | PRODUCT_NAME = "$(TARGET_NAME)";
536 | SWIFT_EMIT_LOC_STRINGS = YES;
537 | SWIFT_VERSION = 5.0;
538 | };
539 | name = Release;
540 | };
541 | 89D84244277A218600D08BC0 /* Debug */ = {
542 | isa = XCBuildConfiguration;
543 | buildSettings = {
544 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
545 | BUNDLE_LOADER = "$(TEST_HOST)";
546 | CODE_SIGN_STYLE = Automatic;
547 | CURRENT_PROJECT_VERSION = 1;
548 | DEVELOPMENT_TEAM = S4G3GQXM69;
549 | GENERATE_INFOPLIST_FILE = YES;
550 | MACOSX_DEPLOYMENT_TARGET = 12.0;
551 | MARKETING_VERSION = 1.0;
552 | PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.iosApp.macOSTests;
553 | PRODUCT_NAME = "$(TARGET_NAME)";
554 | SWIFT_EMIT_LOC_STRINGS = NO;
555 | SWIFT_VERSION = 5.0;
556 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/macOS.app/Contents/MacOS/macOS";
557 | };
558 | name = Debug;
559 | };
560 | 89D84245277A218600D08BC0 /* Release */ = {
561 | isa = XCBuildConfiguration;
562 | buildSettings = {
563 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
564 | BUNDLE_LOADER = "$(TEST_HOST)";
565 | CODE_SIGN_STYLE = Automatic;
566 | CURRENT_PROJECT_VERSION = 1;
567 | DEVELOPMENT_TEAM = S4G3GQXM69;
568 | GENERATE_INFOPLIST_FILE = YES;
569 | MACOSX_DEPLOYMENT_TARGET = 12.0;
570 | MARKETING_VERSION = 1.0;
571 | PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.iosApp.macOSTests;
572 | PRODUCT_NAME = "$(TARGET_NAME)";
573 | SWIFT_EMIT_LOC_STRINGS = NO;
574 | SWIFT_VERSION = 5.0;
575 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/macOS.app/Contents/MacOS/macOS";
576 | };
577 | name = Release;
578 | };
579 | 89D84247277A218600D08BC0 /* Debug */ = {
580 | isa = XCBuildConfiguration;
581 | buildSettings = {
582 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
583 | CODE_SIGN_STYLE = Automatic;
584 | CURRENT_PROJECT_VERSION = 1;
585 | DEVELOPMENT_TEAM = S4G3GQXM69;
586 | GENERATE_INFOPLIST_FILE = YES;
587 | MARKETING_VERSION = 1.0;
588 | PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.iosApp.macOSUITests;
589 | PRODUCT_NAME = "$(TARGET_NAME)";
590 | SWIFT_EMIT_LOC_STRINGS = NO;
591 | SWIFT_VERSION = 5.0;
592 | TEST_TARGET_NAME = macOS;
593 | };
594 | name = Debug;
595 | };
596 | 89D84248277A218600D08BC0 /* Release */ = {
597 | isa = XCBuildConfiguration;
598 | buildSettings = {
599 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
600 | CODE_SIGN_STYLE = Automatic;
601 | CURRENT_PROJECT_VERSION = 1;
602 | DEVELOPMENT_TEAM = S4G3GQXM69;
603 | GENERATE_INFOPLIST_FILE = YES;
604 | MARKETING_VERSION = 1.0;
605 | PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.iosApp.macOSUITests;
606 | PRODUCT_NAME = "$(TARGET_NAME)";
607 | SWIFT_EMIT_LOC_STRINGS = NO;
608 | SWIFT_VERSION = 5.0;
609 | TEST_TARGET_NAME = macOS;
610 | };
611 | name = Release;
612 | };
613 | /* End XCBuildConfiguration section */
614 |
615 | /* Begin XCConfigurationList section */
616 | 89D84216277A218500D08BC0 /* Build configuration list for PBXProject "macOS" */ = {
617 | isa = XCConfigurationList;
618 | buildConfigurations = (
619 | 89D8423E277A218600D08BC0 /* Debug */,
620 | 89D8423F277A218600D08BC0 /* Release */,
621 | );
622 | defaultConfigurationIsVisible = 0;
623 | defaultConfigurationName = Release;
624 | };
625 | 89D84240277A218600D08BC0 /* Build configuration list for PBXNativeTarget "macOS" */ = {
626 | isa = XCConfigurationList;
627 | buildConfigurations = (
628 | 89D84241277A218600D08BC0 /* Debug */,
629 | 89D84242277A218600D08BC0 /* Release */,
630 | );
631 | defaultConfigurationIsVisible = 0;
632 | defaultConfigurationName = Release;
633 | };
634 | 89D84243277A218600D08BC0 /* Build configuration list for PBXNativeTarget "macOSTests" */ = {
635 | isa = XCConfigurationList;
636 | buildConfigurations = (
637 | 89D84244277A218600D08BC0 /* Debug */,
638 | 89D84245277A218600D08BC0 /* Release */,
639 | );
640 | defaultConfigurationIsVisible = 0;
641 | defaultConfigurationName = Release;
642 | };
643 | 89D84246277A218600D08BC0 /* Build configuration list for PBXNativeTarget "macOSUITests" */ = {
644 | isa = XCConfigurationList;
645 | buildConfigurations = (
646 | 89D84247277A218600D08BC0 /* Debug */,
647 | 89D84248277A218600D08BC0 /* Release */,
648 | );
649 | defaultConfigurationIsVisible = 0;
650 | defaultConfigurationName = Release;
651 | };
652 | /* End XCConfigurationList section */
653 | };
654 | rootObject = 89D84213277A218500D08BC0 /* Project object */;
655 | }
656 |
--------------------------------------------------------------------------------