Guilherme Delgado
11/04/2021, 1:46 PMFAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':shared'.
> kotlin.native.cocoapods.target property was dropped in favor of kotlin.native.cocoapods.platform and kotlin.native.cocoapods.archs.
Podspec file might be outdated. Sync project with Gradle files or run the 'podspec' task manually to regenerate it.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at <https://help.gradle.org>
BUILD FAILED in 3s
6 actionable tasks: 6 up-to-date
Command PhaseScriptExecution failed with a nonzero exit code
Showing Recent Messages
REPO_ROOT="$PODS_TARGET_SRCROOT"
"$REPO_ROOT/../gradlew" -p "$REPO_ROOT" :shared:syncOrbitSwift -Pkotlin.native.cocoapods.target=$KOTLIN_TARGET -Pkotlin.native.cocoapods.configuration=$CONFIGURATION -Pkotlin.native.cocoapods.cflags="$OTHER_CFLAGS" -Pkotlin.native.cocoapods.paths.headers="$HEADER_SEARCH_PATHS" -Pkotlin.native.cocoapods.paths.frameworks="$FRAMEWORK_SEARCH_PATHS"
> Task :buildSrc:compileKotlin UP-TO-DATE
> Task :buildSrc:compileJava NO-SOURCE
> Task :buildSrc:compileGroovy NO-SOURCE
> Task :buildSrc:pluginDescriptors UP-TO-DATE
> Task :buildSrc:processResources NO-SOURCE
> Task :buildSrc:classes UP-TO-DATE
> Task :buildSrc:inspectClassesForKotlinIC UP-TO-DATE
> Task :buildSrc:jar UP-TO-DATE
> Task :buildSrc:assemble UP-TO-DATE
> Task :buildSrc:compileTestKotlin NO-SOURCE
> Task :buildSrc:pluginUnderTestMetadata UP-TO-DATE
> Task :buildSrc:compileTestJava NO-SOURCE
> Task :buildSrc:compileTestGroovy NO-SOURCE
> Task :buildSrc:processTestResources NO-SOURCE
> Task :buildSrc:testClasses UP-TO-DATE
> Task :buildSrc:test NO-SOURCE
> Task :buildSrc:validatePlugins UP-TO-DATE
> Task :buildSrc:check UP-TO-DATE
> Task :buildSrc:build UP-TO-DATE
I’ve run:
$ ./gradlew orbitPodSpec
> Configure project :shared
Kotlin Multiplatform Projects are an Alpha feature. See: <https://kotlinlang.org/docs/reference/evolution/components-stability.html>. To hide this message, add 'kotlin.mpp.stability.nowarn=true' to the Gradle properties.
To take advantage of the new functionality for Cocoapods Integration like synchronizing with the Xcode project
and supporting dependencies on pods, please install the `cocoapods-generate` plugin for CocoaPods
by calling `gem install cocoapods-generate` in terminal.
More details are available by <https://github.com/square/cocoapods-generate>
The following Kotlin source sets were configured but not added to any Kotlin compilation:
* androidAndroidTestRelease
* androidTestFixtures
* androidTestFixturesDebug
* androidTestFixturesRelease
You can add a source set to a target's compilation by connecting it with the compilation's default source set using 'dependsOn'.
See <https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#connecting-source-sets>
> Task :shared:orbitPodspec
Generated a podspec file at: /Users/.../shared/sharedOrbitSwift.podspec.
To include it in your Xcode project, check that the following dependency snippet exists in your Podfile:
pod 'sharedOrbitSwift', :path => '/Users/.../shared'
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See <https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings>
BUILD SUCCESSFUL in 2s
my podfile:
target 'iosApp' do
use_frameworks!
platform :ios, '14.1'
pod 'shared', :path => '../shared'
pod 'sharedOrbitSwift', :path => '../shared'
end
🤔appmattus
11/04/2021, 3:30 PMGuilherme Delgado
11/04/2021, 3:34 PMconst val kotlin = "1.5.30"
appmattus
11/04/2021, 3:34 PMGuilherme Delgado
11/04/2021, 3:34 PMappmattus
11/04/2021, 3:36 PMGuilherme Delgado
11/04/2021, 3:36 PMappmattus
11/04/2021, 3:38 PMGuilherme Delgado
11/04/2021, 3:38 PMappmattus
11/04/2021, 3:39 PMGuilherme Delgado
11/04/2021, 3:40 PMappmattus
11/04/2021, 3:43 PMGuilherme Delgado
11/04/2021, 3:46 PMappmattus
11/04/2021, 5:03 PMpod install
although i'm hitting a different issue to do with a modulemap that i've not seen before!
spec.pod_target_xcconfig = {
'KOTLIN_PROJECT_PATH' => ':shared',
'PRODUCT_MODULE_NAME' => 'shared',
}
spec.script_phases = [
{
:name => 'Build sharedOrbitSwift',
: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" $KOTLIN_PROJECT_PATH:syncOrbitSwift \
-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" \
-Pkotlin.native.cocoapods.paths.frameworks="$FRAMEWORK_SEARCH_PATHS"
SCRIPT
}
]
Guilherme Delgado
11/04/2021, 5:06 PMappmattus
11/04/2021, 5:14 PMGuilherme Delgado
11/04/2021, 5:31 PMappmattus
11/04/2021, 6:13 PMGuilherme Delgado
11/04/2021, 6:17 PMimport sharedOrbitSwift
Xcode says it can’t find this module, but i do have this:shared
doesn’t give me this warning 🤔@StateObject private var viewModel = ViewModels().myViewModel().asStateObject()
ViewModels().myViewModel
but not the asStateObject()
which I believe it’s an extension from the sharedOrbitSwift
module (am I right?)appmattus
11/10/2021, 10:35 AMGuilherme Delgado
11/10/2021, 10:36 AMappmattus
11/10/2021, 10:37 AMGuilherme Delgado
11/10/2021, 10:40 AMAnalyzing dependencies
Downloading dependencies
Installing sharedOrbitSwift 1.0
Generating Pods project
Integrating client project
Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.
appmattus
11/10/2021, 11:02 AMGuilherme Delgado
11/10/2021, 11:33 AMappmattus
11/10/2021, 11:40 AMGuilherme Delgado
11/10/2021, 11:53 AM* What went wrong:
Task 'syncOrbitSwift' not found in project ':shared'.
* Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at <https://help.gradle.org>
BUILD FAILED in 4s
6 actionable tasks: 6 up-to-date
Command PhaseScriptExecution failed with a nonzero exit code
spec.source_files = “build/cocoapods/orbit/sharedOrbitSwift/**/*.{h,m,swift}”🤔
appmattus
11/10/2021, 2:54 PMGuilherme Delgado
11/10/2021, 2:57 PM"$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncOrbitSwift \
it will throw saying that task doesn’t exists 🤔appmattus
11/10/2021, 4:34 PMGuilherme Delgado
11/12/2021, 6:04 PMinstall! 'cocoapods', :disable_input_output_paths => true
and commented this one:
# use_frameworks!
still fails with the same output 😒:
Task 'syncOrbitSwift' not found in project ':shared'.
But now I can see the swift files generated in the sharedOrbitSwift folderappmattus
11/25/2021, 4:14 PM