-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add cocoapods to :shared-compose-test
- Loading branch information
1 parent
453a0d0
commit 9166859
Showing
3 changed files
with
88 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
Pod::Spec.new do |spec| | ||
spec.name = 'iosComposeTestPod' | ||
spec.version = '1.0' | ||
spec.homepage = 'https://github.com/softartdev/NoteDelight' | ||
spec.source = { :http=> ''} | ||
spec.authors = '' | ||
spec.license = '' | ||
spec.summary = 'Tests for common UI-kit of the NoteDelight app' | ||
spec.vendored_frameworks = 'build/cocoapods/framework/iosComposeTestKit.framework' | ||
spec.libraries = 'c++' | ||
spec.ios.deployment_target = '14.1' | ||
spec.dependency 'SQLCipher', '4.5.4' | ||
|
||
if !Dir.exist?('build/cocoapods/framework/iosComposeTestKit.framework') || Dir.empty?('build/cocoapods/framework/iosComposeTestKit.framework') | ||
raise " | ||
Kotlin framework 'iosComposeTestKit' 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-compose-test: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-compose-test', | ||
'PRODUCT_MODULE_NAME' => 'iosComposeTestKit', | ||
} | ||
|
||
spec.script_phases = [ | ||
{ | ||
:name => 'Build iosComposeTestPod', | ||
: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 | ||
fi | ||
set -ev | ||
REPO_ROOT="$PODS_TARGET_SRCROOT" | ||
"$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" | ||
SCRIPT | ||
} | ||
] | ||
spec.resources = ['build/compose/ios/iosComposeTestKit/compose-resources'] | ||
end |