Alfred Lopez
12/16/2020, 7:43 PMTristan
12/16/2020, 10:30 PM1.4.21
, with
kotlin {
android()
ios()
cocoapods {
summary = "summary"
homepage = "homepage"
pod("AFNetworking") {
version = "~> 4.0.1"
}
}
// ...
carlos cdmp
12/17/2020, 2:30 PMAlfred Lopez
12/17/2020, 5:16 PMkevinskrei
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 pluginArtur Matsehor
12/18/2020, 12:12 PMEric Ampire [MOD]
12/18/2020, 4:39 PMRobert Jaros
12/18/2020, 11:14 PM./gradlew test
only JS tests are executed from the main project and subprojects. I can run ./gradlew jvmTest
to run JVM tests from the MPP subproject, but how can I run all tests with a single test
task?Sergio Pro
12/19/2020, 1:23 PMSarvesh Sharma
12/21/2020, 8:25 AMuli
12/21/2020, 4:17 PMArkadii Ivanov
12/21/2020, 7:44 PM1.4.20
the maven-publish
plugin uploads jar
files for root packages (named without any a suffix). But there is no sources.jar
uploaded. As a result I can't enable JCenter sync, since sources are mandatory for packages with jars
.
E.g. this package has a jar
file but does not have sources.jar
file: https://dl.bintray.com/arkivanov/maven/com/arkivanov/decompose/decompose/0.1.4/
But e.g. this coroutines package has everything: https://jcenter.bintray.com/org/jetbrains/kotlinx/kotlinx-coroutines-core/1.4.2/
Questions:
1. Why there is no jar
files uploaded for this package prior to Kotlin 1.4.20? (e.g. here). If there is no jar
then it's ok to not have sources.jar
.
2. Why there is no sources.jar
uploaded in this case. Sources are uploaded fine for other non-root packages, e.g. the decompose-jvm.Amritansh
12/22/2020, 11:32 PMOla Adolfsson
12/23/2020, 6:50 AM-jsLegacy
Naming Convention is incompatible with NPM
Libraries such as kotlinx.serialization
are exporting artifacts with a -jsLegacy
suffix when using the legacy compiler with Kotlin 1.4. NPM however, doesn’t allow capital letters in package names.”Eugeny Sentsov
12/23/2020, 9:21 AMJeff
12/23/2020, 10:03 AMA problem occurred configuring project ':shared'.
> Configuration with name 'testApi' not found.
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':shared'.
at..........
rb90
12/23/2020, 3:59 PMJakob K
12/24/2020, 12:22 PMScott Whitman
12/24/2020, 1:19 PMKClass.objectInstance
doesn't seem to be available on JS or Native, only JVM. Are there any workarounds or libraries that I can use with expext/actual to accomplish something similar to T::class.objectInstance
Md Hanif
12/24/2020, 3:38 PMBuildConfig
which we have in out android projects.Mustafa Ozhan
12/24/2020, 3:59 PMcommon
? And share it between Android and iOS? also supporting Dark/Light mode ?Mustafa Ozhan
12/24/2020, 4:00 PMcommon
and sharing across platforms ?widar
12/24/2020, 6:16 PMjaqxues
12/24/2020, 8:15 PMVlad Ivanov
12/24/2020, 8:16 PMdata class Foo(val bars: List<Bar>)
// create instance of Foo with bars on Swift side and pass it to some Kotlin Multiplatform class where I call
foo.freeze()
// now I expect that bars are frozen, but they are not
// as a workaround I use
foo.bars.forEach { it.freeze() }
When I do the same purely in Kotlin - everything works as expected, instance of Foo is frozen and all its propertiesQracle
12/25/2020, 5:00 AMRun
tab. I’m able to run the app from Xcode just fine too.Krotick
12/26/2020, 6:13 PMandylamax
12/26/2020, 7:41 PMNoSuchMethod
in jvm runtime.
It is multiplatform code that executes well in kotlin/js browser, but fails in jvm
implementation looks something like this
// in submodule common
interface ICommon
fun ICommon.greet(greeting: String, name: String)
// in submodule client
which depends on common
interface IClient : ICommon
class ClientImpl(): IClient
// my tests in submodule client
class
ClientImpl().greet("Hello","World");
Passes on js/browser, fails on jvm
using IR for both JVM and JSahmedre
12/28/2020, 11:32 AMApplication Specific Information:
abort() called
CoreSimulator 732.18.6 - Device: iPod touch (7th generation) (DE2D8C92-2BA3-4592-8CF0-D838EA741FBC) - Runtime: iOS 14.3 (18C61) - DeviceType: iPod touch (7th generation)
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff60c58462 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff60c91610 pthread_kill + 263
2 libsystem_c.dylib 0x00007fff200fab94 abort + 120
3 MorphologyWordView.2.preview-thunk.dylib 0x000000010f035b19 konan::abort() + 9
4 MorphologyWordView.2.preview-thunk.dylib 0x000000010f03598c RuntimeAssertFailed(char const*, char const*) + 156
5 MorphologyWordView.2.preview-thunk.dylib 0x000000010f04fa8f __Kotlin_ObjCExport_initialize_block_invoke + 1055
6 libdispatch.dylib 0x00007fff20106508 _dispatch_client_callout + 8
7 libdispatch.dylib 0x00007fff2010775d _dispatch_once_callout + 20
8 MorphologyWordView.2.preview-thunk.dylib 0x000000010f04f664 Kotlin_ObjCExport_initialize + 36
9 MorphologyWordView.2.preview-thunk.dylib 0x000000010eb1bab7 +[KotlinBase initialize] + 55
10 libobjc.A.dylib 0x00007fff20178453 CALLING_SOME_+initialize_METHOD + 17
11 libobjc.A.dylib 0x00007fff20179326 initializeNonMetaClass + 717
12 libobjc.A.dylib 0x00007fff201790b0 initializeNonMetaClass + 87
13 libobjc.A.dylib 0x00007fff2017a3ad initializeAndMaybeRelock(objc_class*, objc_object*, mutex_tt<false>&, bool) + 173
14 libobjc.A.dylib 0x00007fff20185b8f lookUpImpOrForward + 668
15 libobjc.A.dylib 0x00007fff2017421b _objc_msgSend_uncached + 75
16 MorphologyWordView.2.preview-thunk.dylib 0x000000010f39a73e type metadata accessor for SharedCodeWordMorphology + 30
17 net.cafesalam.QuranSearch 0x000000010c147d33 static MorphologyWordView_Previews.previews.getter + 115 (MorphologyWordView.swift:37)
18 net.cafesalam.QuranSearch 0x000000010c148489 protocol witness for static PreviewProvider.previews.getter in conformance MorphologyWordView_Previews + 9
actual app works fine on both Android and iOS - and in my case at least this is just a data class
that i am using in the preview / swift ui code that causes this crash. i saw a similar part of the crash reason in the case of PeopleInSpace also:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff60c58462 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff60c91610 pthread_kill + 263
2 libsystem_c.dylib 0x00007fff200fab94 abort + 120
3 ContentView.2.preview-thunk.dylib 0x000000010451b0d9 konan::abort() + 9
4 ContentView.2.preview-thunk.dylib 0x000000010451af4c RuntimeAssertFailed(char const*, char const*) + 156
5 ContentView.2.preview-thunk.dylib 0x000000010453504f __Kotlin_ObjCExport_initialize_block_invoke + 1055
6 libdispatch.dylib 0x00007fff20106508 _dispatch_client_callout + 8
7 libdispatch.dylib 0x00007fff2010775d _dispatch_once_callout + 20
8 ContentView.2.preview-thunk.dylib 0x0000000104534c24 Kotlin_ObjCExport_initialize + 36
9 ContentView.2.preview-thunk.dylib 0x0000000104532a02 (anonymous namespace)::initRuntime() + 194
10 ContentView.2.preview-thunk.dylib 0x00000001045325af Kotlin_initRuntimeIfNeeded + 31
11 ContentView.2.preview-thunk.dylib 0x0000000104003dbe -[NSArray(NSArrayToKotlin) toKotlin:] + 30
12 com.surrus.PeopleInSpaceSwiftUI 0x000000010108fc61 Kotlin_Interop_refFromObjC + 65
13 com.surrus.PeopleInSpaceSwiftUI 0x00000001011b0006 kfun:co.touchlab.sqliter.DatabaseFileContext#iosDirPath(kotlin.String){}kotlin.String + 566
anyone have any luck working around this or any ideas of what to look at?Michal Klimczak
12/28/2020, 3:19 PMLoadUserUseCase
in my Kotlin shared code.
In Swift i have a UserViewModel
which has the usecase injected. Now i want to write tests for this ViewModel, so I need to create a fake. But there is no protocol to conform to and of course Cannot inherit from non-open class 'LoadUserUseCase' outside of its defining module