diff --git a/.gitattributes b/.gitattributes index f148c08..555736a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,21 +1,6 @@ * text=auto eol=lf *.bat text eol=crlf -README text -LICENSE text -CONTRIBUTING text - -.gitignore text -*.gitattributes text -*.xcconfig text -*.md text diff=markdown - -# -# Exclude files from exporting -# -.gitattributes export-ignore -.gitignore export-ignore - *.jar binary *.png binary *.jpg binary diff --git a/build-logic/convention/build.gradle.kts b/build-logic/convention/build.gradle.kts index c6e002c..c0b6476 100644 --- a/build-logic/convention/build.gradle.kts +++ b/build-logic/convention/build.gradle.kts @@ -6,15 +6,10 @@ plugins { repositories { mavenCentral() - google { - content { - includeGroupByRegex(".*google.*") - includeGroupByRegex(".*android.*") - } - } + google() } -group = "com.jithub.app.buildlogic" +group = "com.jithub.app.build-logic" kotlin { jvmToolchain(17) diff --git a/gradle.properties b/gradle.properties index 5befbaa..434b629 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,15 +5,18 @@ org.gradle.caching=true org.gradle.configureondemand=true org.gradle.configuration-cache=true -# This is needed for the JB Compose runtime to link on native targets. They also use this flag -# in their samples. Over time it should be removed once they figure out why it was needed. -kotlin.native.cacheKind=none - # Kotlin kotlin.code.style=official kotlin.incremental.native=true #kotlin.js.compiler=ir +# This is needed for the JB Compose runtime to link on native targets. They also use this flag +# in their samples. Over time it should be removed once they figure out why it was needed. +kotlin.native.cacheKind=none + +# https://github.com/Kotlin/kotlinx-atomicfu/issues/141 +kotlin.native.ignoreIncorrectDependencies=true + # MPP kotlin.mpp.stability.nowarn=true kotlin.mpp.enableCInteropCommonization=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 91bcf83..bff7827 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,12 +6,11 @@ redwood = "0.11.0" androidx-activityCompose = "1.9.0" androidx-appcompat = "1.6.1" androidx-constraintlayout = "2.1.4" -androidx-core-ktx = "1.13.0" -androidx-material = "1.11.0" - -jetpackCompose = "1.6.6" -jetbrainsCompose = "1.6.2" +androidx-core-ktx = "1.13.1" +androidx-material = "1.12.0" +jbr-compose = "1.6.2" +androidx-compose = "1.6.6" compose-material3 = "1.2.1" androidx-espresso-core = "3.5.1" @@ -30,17 +29,17 @@ androidx-activity-compose = { module = "androidx.activity:activity-compose", ver # JetBrains Compose: https://github.com/JetBrains/compose-multiplatform jetbrains-compose-compiler = "org.jetbrains.compose.compiler:compiler:1.5.14" -jetbrains-compose-gradlePlugin = { module = "org.jetbrains.compose:compose-gradle-plugin", version.ref = "jetbrainsCompose" } -jetbrains-compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "jetbrainsCompose" } -jetbrains-compose-runtime-saveable = { module = "org.jetbrains.compose.runtime:runtime-saveable", version.ref = "jetbrainsCompose" } -jetbrains-compose-foundation = { module = "org.jetbrains.compose.foundation:foundation", version.ref = "jetbrainsCompose" } -jetbrains-compose-ui = { module = "org.jetbrains.compose.ui:ui", version.ref = "jetbrainsCompose" } -jetbrains-compose-ui-tooling = { module = "org.jetbrains.compose.ui:ui-tooling", version.ref = "jetbrainsCompose" } -jetbrains-compose-ui-tooling-preview = { module = "org.jetbrains.compose.ui:ui-tooling-preview", version.ref = "jetbrainsCompose" } -jetbrains-compose-material = { module = "org.jetbrains.compose.material:material", version.ref = "jetbrainsCompose" } -jetbrains-compose-material3 = { module = "org.jetbrains.compose.material3:material3", version.ref = "jetbrainsCompose" } -jetbrains-compose-animation = { module = "org.jetbrains.compose.animation:animation-core", version.ref = "jetbrainsCompose" } -jetbrains-components-resources = { module = "org.jetbrains.compose.components:components-resources", version.ref = "jetbrainsCompose" } +jetbrains-compose-gradlePlugin = { module = "org.jetbrains.compose:compose-gradle-plugin", version.ref = "jbr-compose" } +jetbrains-compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "jbr-compose" } +jetbrains-compose-runtime-saveable = { module = "org.jetbrains.compose.runtime:runtime-saveable", version.ref = "jbr-compose" } +jetbrains-compose-foundation = { module = "org.jetbrains.compose.foundation:foundation", version.ref = "jbr-compose" } +jetbrains-compose-ui = { module = "org.jetbrains.compose.ui:ui", version.ref = "jbr-compose" } +jetbrains-compose-ui-tooling = { module = "org.jetbrains.compose.ui:ui-tooling", version.ref = "jbr-compose" } +jetbrains-compose-ui-tooling-preview = { module = "org.jetbrains.compose.ui:ui-tooling-preview", version.ref = "jbr-compose" } +jetbrains-compose-material = { module = "org.jetbrains.compose.material:material", version.ref = "jbr-compose" } +jetbrains-compose-material3 = { module = "org.jetbrains.compose.material3:material3", version.ref = "jbr-compose" } +jetbrains-compose-animation = { module = "org.jetbrains.compose.animation:animation-core", version.ref = "jbr-compose" } +jetbrains-components-resources = { module = "org.jetbrains.compose.components:components-resources", version.ref = "jbr-compose" } # Redwood: https://github.com/cashapp/redwood redwood-compose = { module = "app.cash.redwood:redwood-compose", version.ref = "redwood" } @@ -64,7 +63,7 @@ android-application = { id = "com.android.application", version.ref = "agp" } android-library = { id = "com.android.library", version.ref = "agp" } kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } kotlin-cocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" } -jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "jetbrainsCompose" } +jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "jbr-compose" } cashapp-redwood = { id = "app.cash.redwood", version.ref = "redwood" } diff --git a/iosApp/Podfile.lock b/iosApp/Podfile.lock index f84fbbf..c4bf2dd 100644 --- a/iosApp/Podfile.lock +++ b/iosApp/Podfile.lock @@ -15,7 +15,7 @@ EXTERNAL SOURCES: :path: "../shared" SPEC CHECKSUMS: - shared: 825978f2a80ce00aa0d9e76613eb649352d916b5 + shared: 322de44d4a2cd8a0315d0b724307402aaa406311 SwiftFormat: d30e6e1c9a85f4bce83394af184e2c1d03032605 PODFILE CHECKSUM: c865212f162b25efab1f4c3a7c4b85bdb722c41e diff --git a/iosApp/iosApp.xcodeproj/project.pbxproj b/iosApp/iosApp.xcodeproj/project.pbxproj index 8f8d229..d495b59 100644 --- a/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/iosApp/iosApp.xcodeproj/project.pbxproj @@ -437,7 +437,7 @@ "-ObjC", "-l\"c++\"", "-framework", - "\"shared\"", + "\"SharedKit\"", ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; @@ -476,7 +476,7 @@ "-ObjC", "-l\"c++\"", "-framework", - "\"shared\"", + "\"SharedKit\"", ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; diff --git a/iosApp/iosApp/AppDelegate.swift b/iosApp/iosApp/AppDelegate.swift index 21862ae..c442b32 100644 --- a/iosApp/iosApp/AppDelegate.swift +++ b/iosApp/iosApp/AppDelegate.swift @@ -6,7 +6,7 @@ // Copyright © 2024 jithub.com. All rights reserved. // -import shared +import SharedKit import UIKit @main diff --git a/iosApp/iosApp/ContentView.swift b/iosApp/iosApp/ContentView.swift index 2a08a88..7856fd5 100644 --- a/iosApp/iosApp/ContentView.swift +++ b/iosApp/iosApp/ContentView.swift @@ -1,4 +1,4 @@ -import shared +import SharedKit import SwiftUI struct ContentView: View { diff --git a/iosApp/iosApp/CounterViewController.swift b/iosApp/iosApp/CounterViewController.swift index 7d35d47..504e3da 100644 --- a/iosApp/iosApp/CounterViewController.swift +++ b/iosApp/iosApp/CounterViewController.swift @@ -7,7 +7,7 @@ // import Foundation -import shared +import SharedKit import UIKit class CounterViewController: UIViewController { diff --git a/iosApp/iosApp/MokoView.swift b/iosApp/iosApp/MokoView.swift index a3f1763..294bbfb 100644 --- a/iosApp/iosApp/MokoView.swift +++ b/iosApp/iosApp/MokoView.swift @@ -6,7 +6,7 @@ // Copyright © 2024 jithub.com. All rights reserved. // -import shared +import SharedKit import SwiftUI struct MokoView: View { diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index b7d3a75..06b1158 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -33,7 +33,7 @@ kotlin { ios.deploymentTarget = "13.0" podfile = project.file("../iosApp/Podfile") framework { - baseName = "shared" + baseName = "SharedKit" binaryOptions["bundleId"] = "com.jithub.app.shared" isStatic = true export(moko.resources) @@ -67,7 +67,7 @@ kotlin { } iosMain.dependencies { - // redwood + // Redwood implementation(libs.redwood.layout.uiview) } } diff --git a/shared/shared.podspec b/shared/shared.podspec index bf077ad..52a84ba 100644 --- a/shared/shared.podspec +++ b/shared/shared.podspec @@ -6,15 +6,15 @@ Pod::Spec.new do |spec| spec.authors = '' spec.license = '' spec.summary = 'Some description for the Shared Module' - spec.vendored_frameworks = 'build/cocoapods/framework/shared.framework' + spec.vendored_frameworks = 'build/cocoapods/framework/SharedKit.framework' spec.libraries = 'c++' spec.ios.deployment_target = '13.0' - if !Dir.exist?('build/cocoapods/framework/shared.framework') || Dir.empty?('build/cocoapods/framework/shared.framework') + if !Dir.exist?('build/cocoapods/framework/SharedKit.framework') || Dir.empty?('build/cocoapods/framework/SharedKit.framework') raise " - Kotlin framework 'shared' doesn't exist yet, so a proper Xcode project can't be generated. + Kotlin framework 'SharedKit' doesn't exist yet, so a proper Xcode project can't be generated. 'pod install' should be executed after running ':generateDummyFramework' Gradle task: ./gradlew :shared:generateDummyFramework @@ -24,7 +24,7 @@ Pod::Spec.new do |spec| spec.pod_target_xcconfig = { 'KOTLIN_PROJECT_PATH' => ':shared', - 'PRODUCT_MODULE_NAME' => 'shared', + 'PRODUCT_MODULE_NAME' => 'SharedKit', } spec.script_phases = [