1+ Pod ::Spec . new do |spec |
2+ spec . name = 'ComposeMediaPlayer'
3+ spec . version = 'null'
4+ spec . homepage = 'https://github.com/kdroidFilter/Compose-Media-Player'
5+ spec . source = { :http => '' }
6+ spec . authors = ''
7+ spec . license = ''
8+ spec . summary = 'A multiplatform video player library for Compose applications'
9+ spec . vendored_frameworks = 'build/cocoapods/framework/ComposeMediaPlayer.framework'
10+ spec . libraries = 'c++'
11+
12+
13+
14+ if !Dir . exist? ( 'build/cocoapods/framework/ComposeMediaPlayer.framework' ) || Dir . empty? ( 'build/cocoapods/framework/ComposeMediaPlayer.framework' )
15+ raise "
16+
17+ Kotlin framework 'ComposeMediaPlayer' doesn't exist yet, so a proper Xcode project can't be generated.
18+ 'pod install' should be executed after running ':generateDummyFramework' Gradle task:
19+
20+ ./gradlew :mediaplayer:generateDummyFramework
21+
22+ Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)"
23+ end
24+
25+ spec . xcconfig = {
26+ 'ENABLE_USER_SCRIPT_SANDBOXING' => 'NO' ,
27+ }
28+
29+ spec . pod_target_xcconfig = {
30+ 'KOTLIN_PROJECT_PATH' => ':mediaplayer' ,
31+ 'PRODUCT_MODULE_NAME' => 'ComposeMediaPlayer' ,
32+ }
33+
34+ spec . script_phases = [
35+ {
36+ :name => 'Build ComposeMediaPlayer' ,
37+ :execution_position => :before_compile ,
38+ :shell_path => '/bin/sh' ,
39+ :script => <<-SCRIPT
40+ if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then
41+ echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \" YES\" "
42+ exit 0
43+ fi
44+ set -ev
45+ REPO_ROOT="$PODS_TARGET_SRCROOT"
46+ "$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \
47+ -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \
48+ -Pkotlin.native.cocoapods.archs="$ARCHS" \
49+ -Pkotlin.native.cocoapods.configuration="$CONFIGURATION"
50+ SCRIPT
51+ }
52+ ]
53+ spec . resources = [ 'build/compose/cocoapods/compose-resources' ]
54+ end
0 commit comments