From e3383702f3988ae52002a5c51e420265640ef9b8 Mon Sep 17 00:00:00 2001 From: Ivan Magda Date: Fri, 5 Jul 2024 11:50:42 +0900 Subject: [PATCH] Update shared/shared.podspec --- shared/shared.podspec | 59 +++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 36 deletions(-) diff --git a/shared/shared.podspec b/shared/shared.podspec index d4f1710c74..6b14a09071 100644 --- a/shared/shared.podspec +++ b/shared/shared.podspec @@ -1,38 +1,26 @@ Pod::Spec.new do |spec| - spec.name = 'shared' - spec.version = '1.0' - spec.homepage = 'https://github.com/hyperskill/mobile-app' - spec.source = { :http=> ''} - spec.authors = '' - spec.license = '' - spec.summary = 'Shared code between iOS and Android' - spec.vendored_frameworks = 'build/cocoapods/framework/shared.framework' - spec.libraries = 'c++' - spec.ios.deployment_target = '14.0' - - - if !Dir.exist?('build/cocoapods/framework/shared.framework') || Dir.empty?('build/cocoapods/framework/shared.framework') - raise " + spec.name = "shared" + spec.version = "1.0" + spec.homepage = "https://github.com/hyperskill/mobile-app" + spec.source = { :http => "" } + spec.authors = "" + spec.license = "" + spec.summary = "Shared code between iOS and Android" + spec.vendored_frameworks = "build/cocoapods/framework/shared.framework" + spec.libraries = "c++" + spec.ios.deployment_target = "14.0" - Kotlin framework 'shared' doesn't exist yet, so a proper Xcode project can't be generated. - 'pod install' should be executed after running ':generateDummyFramework' Gradle task: + spec.pod_target_xcconfig = { + "KOTLIN_PROJECT_PATH" => ":shared", + "PRODUCT_MODULE_NAME" => "shared", + } - ./gradlew :shared:generateDummyFramework - - Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)" - end - - spec.pod_target_xcconfig = { - 'KOTLIN_PROJECT_PATH' => ':shared', - 'PRODUCT_MODULE_NAME' => 'shared', - } - - spec.script_phases = [ - { - :name => 'Build shared', - :execution_position => :before_compile, - :shell_path => '/bin/sh', - :script => <<-SCRIPT + spec.script_phases = [ + { + :name => "Build shared", + :execution_position => :before_compile, + :shell_path => "/bin/sh", + :script => <<-SCRIPT, if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\"" exit 0 @@ -44,7 +32,6 @@ Pod::Spec.new do |spec| -Pkotlin.native.cocoapods.archs="$ARCHS" \ -Pkotlin.native.cocoapods.configuration="$CONFIGURATION" SCRIPT - } - ] - -end \ No newline at end of file + }, + ] +end