kevinskrei
12/17/2020, 7:25 PMpod lib lint
on the podspec for a kotlin native mpp project? I have the framework built in the build/cocoapods/framework
folder successfully. I'm looking to deploy it to our private pod repo. I run pod lib lint
on the podspec and it errors out at:
- ERROR | xcodebuild: Returned an unsuccessful exit code.
/bin/sh -c /Users/kevinskrei/Library/Developer/Xcode/DerivedData/App-bvyatnpkzbcdlihdrsoatdifsqvt/Build/Intermediates.noindex/Pods.build/Release-watchsimulator/arccosAbShared.build/Script-46EB2E000002E0.sh
REPO_ROOT="$PODS_TARGET_SRCROOT"
"$REPO_ROOT/../gradlew" -p "$REPO_ROOT" :shared:syncFramework -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"
FAILURE: Build failed with an exception.
* What went wrong:
Gradle could not start your build.
> Could not create service of type CrossBuildFileHashCache using BuildSessionServices.createCrossBuildFileHashCache().
> Failed to create parent directory '/.gradle' when creating directory '/.gradle/6.4.1/fileHashes'
Has anyone run into this before when trying to publish a pod? This is using the pod spec from the cocoapods pluginArtyom Degtyarev [JB]
12/21/2020, 9:06 AM<ProjectDir>/.gradle
. Does this directory exist when you open the project directory with Finder?kevinskrei
12/21/2020, 4:30 PM.gradle
is folder is that the root of the project and I'm running pod lib lint
from the shared directory of the project where the podspec is. I wonder if that could be the issue. project/shared/podspec
REPO_ROOT="$PODS_TARGET_SRCROOT"
"$REPO_ROOT/../gradlew" -p "$REPO_ROOT" :shared:syncFramework
Do I need to change the REPO_ROOT path if running this from inside a shared directory?Artyom Degtyarev [JB]
12/22/2020, 8:29 AM$PODS_TARGET_SRCROOT
contents. As far as I can get, this should be resolved to project/shared
automatically. Found several issues on the CocoaPods GH(like this one: https://github.com/CocoaPods/CocoaPods/issues/7905), but I’m not sure how exactly this should be changed to work as expected.Vitor Prado
03/22/2021, 7:04 PMkevinskrei
03/22/2021, 8:58 PMVitor Prado
03/22/2021, 9:01 PMPod::Spec.new do |spec|
spec.name = '...'
spec.version = "1.0.0"
spec.homepage = '<https://github.com/org/name>'
spec.source = { :git => 'git@github.com:org/name.git',
:tag => "#{spec.version}"
}
spec.authors = { }
spec.summary = '...'
spec.static_framework = true
spec.vendored_frameworks = "pods/name.framework"
spec.framework = 'name'
spec.libraries = "c++"
spec.module_name = "#{spec.name}_umbrella"
spec.platform = :ios
spec.ios.deployment_target = '13.5'
spec.pod_target_xcconfig = {
'KOTLIN_TARGET[sdk=iphonesimulator*]' => 'ios_x64',
'KOTLIN_TARGET[sdk=iphoneos*]' => 'ios_arm'
}
spec.prepare_command = <<-SCRIPT
set -ev
./gradlew --no-daemon -Pframework=#{spec.name}.framework linkReleaseFrameworkIos --stacktrace --info
cp -R name/build/bin/ios/releaseFramework/name.framework pods/name.framework
SCRIPT
end
with this I can generate and push to private repo without problems