mirror of
https://github.com/Matte23/circolapp.git
synced 2025-12-05 23:19:10 +00:00
Update dependencies
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
kotlin("native.cocoapods")
|
||||
@@ -30,7 +28,7 @@ kotlin {
|
||||
// KotlinX
|
||||
implementation(Dependencies.Kotlin.coroutinesCore) {
|
||||
version {
|
||||
strictly("1.4.2-native-mt")
|
||||
strictly("1.5.2-native-mt")
|
||||
}
|
||||
}
|
||||
implementation(Dependencies.Kotlin.serializationJson)
|
||||
@@ -106,18 +104,3 @@ sqldelight {
|
||||
sourceFolders = listOf("sqldelight")
|
||||
}
|
||||
}
|
||||
|
||||
val packForXcode by tasks.creating(Sync::class) {
|
||||
group = "build"
|
||||
val mode = System.getenv("CONFIGURATION") ?: "DEBUG"
|
||||
val sdkName = System.getenv("SDK_NAME") ?: "iphonesimulator"
|
||||
val targetName = "ios" + if (sdkName.startsWith("iphoneos")) "Arm64" else "X64"
|
||||
val framework = kotlin.targets.getByName<KotlinNativeTarget>(targetName).binaries.getFramework(mode)
|
||||
inputs.property("mode", mode)
|
||||
dependsOn(framework.linkTask)
|
||||
val targetDir = File(buildDir, "xcode-frameworks")
|
||||
from({ framework.outputDirectory })
|
||||
into(targetDir)
|
||||
}
|
||||
|
||||
tasks.getByName("build").dependsOn(packForXcode)
|
||||
|
||||
@@ -7,7 +7,6 @@ Pod::Spec.new do |spec|
|
||||
spec.license = ''
|
||||
spec.summary = 'Shared module for Circolapp'
|
||||
|
||||
spec.static_framework = true
|
||||
spec.vendored_frameworks = "build/cocoapods/framework/Shared.framework"
|
||||
spec.libraries = "c++"
|
||||
spec.module_name = "#{spec.name}_umbrella"
|
||||
@@ -17,13 +16,8 @@ Pod::Spec.new do |spec|
|
||||
spec.dependency 'HTMLKit', '~> 3.1.0'
|
||||
|
||||
spec.pod_target_xcconfig = {
|
||||
'KOTLIN_TARGET[sdk=iphonesimulator*]' => 'ios_x64',
|
||||
'KOTLIN_TARGET[sdk=iphoneos*]' => 'ios_arm',
|
||||
'KOTLIN_TARGET[sdk=watchsimulator*]' => 'watchos_x64',
|
||||
'KOTLIN_TARGET[sdk=watchos*]' => 'watchos_arm',
|
||||
'KOTLIN_TARGET[sdk=appletvsimulator*]' => 'tvos_x64',
|
||||
'KOTLIN_TARGET[sdk=appletvos*]' => 'tvos_arm64',
|
||||
'KOTLIN_TARGET[sdk=macosx*]' => 'macos_x64'
|
||||
'KOTLIN_PROJECT_PATH' => ':shared',
|
||||
'PRODUCT_MODULE_NAME' => 'shared',
|
||||
}
|
||||
|
||||
spec.script_phases = [
|
||||
@@ -32,10 +26,15 @@ Pod::Spec.new do |spec|
|
||||
:execution_position => :before_compile,
|
||||
:shell_path => '/bin/sh',
|
||||
:script => <<-SCRIPT
|
||||
if [ "YES" = "$COCOAPODS_SKIP_KOTLIN_BUILD" ]; then
|
||||
echo "Skipping Gradle build task invocation due to COCOAPODS_SKIP_KOTLIN_BUILD environment variable set to \"YES\""
|
||||
exit 0
|
||||
fi
|
||||
set -ev
|
||||
REPO_ROOT="$PODS_TARGET_SRCROOT"
|
||||
"$REPO_ROOT/../gradlew" -p "$REPO_ROOT" :shared:syncFramework \
|
||||
-Pkotlin.native.cocoapods.target=$KOTLIN_TARGET \
|
||||
"$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \
|
||||
-Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \
|
||||
-Pkotlin.native.cocoapods.archs="$ARCHS" \
|
||||
-Pkotlin.native.cocoapods.configuration=$CONFIGURATION \
|
||||
-Pkotlin.native.cocoapods.cflags="$OTHER_CFLAGS" \
|
||||
-Pkotlin.native.cocoapods.paths.headers="$HEADER_SEARCH_PATHS" \
|
||||
|
||||
Reference in New Issue
Block a user