albertgao
01/31/2018, 1:47 AMimport platform.Foundation.*
, IDEA said cant resolve platform
. I think maybe it’s because I have not setup the dependencies
in the build.gradle
? But can’t find them in the kotlin-conf
and KN samples
either, I can’t get the auto-completion there, but at least they seem to resolve the kotlin native libs without problem. Basically the same build.gradle
. Anything I missed here?gildor
01/31/2018, 2:01 AMalbertgao
01/31/2018, 2:02 AMgildor
01/31/2018, 2:05 AMalbertgao
01/31/2018, 3:17 AMgildor
01/31/2018, 3:17 AMalbertgao
01/31/2018, 3:18 AMplatform
platform.*
Because it can’t resolve the dependencies of platform
gildor
01/31/2018, 3:30 AMimport platform.Foundation
only in K/N sources?albertgao
01/31/2018, 3:30 AMwarning: directory not found for option ‘-F/Users/albertgao/Library/Developer/Xcode/DerivedData/konan-eagojejctmwfaofzoiynfjarikts/Build/Products/Debug-iphoneos’
ld: framework not found helperlib
error: linker invocation reported errors
olonho
01/31/2018, 6:01 AMalbertgao
01/31/2018, 7:41 AMbuild.gradle
.
https://gist.github.com/Albert-Gao/10c3d8c801b5d303ca81202847cc1976
Via this settings, I could generate iOS framework, and consumes from the Swift side without any problem. But the limitation is that I could only use API which resides in kotlin-std-lib. Today I want to implement some library which using kotlin native api, something like platform.Foundation.*
But via this settings, I don’t know how to add project dependencies for kotlin native lib. Such that:
1. IDEA can’t resolve the platform.Foundation.*
API, no auto completion.
2. Gradle can’t build because it can’t resolve the platform.Foundation.*
as wellolonho
01/31/2018, 9:11 AMgradlew bundle
if you use your own build of Kotlin/Nativealbertgao
01/31/2018, 10:27 AMbundle
command, it will generate a file named kotlin-native-macos-0.5.tar.gz
? How to use that? I currently created a project which is not inside the kotlin native repo/samples
folder. Is it possible? I saw there is a buildSamplesWithPlatformLibs
in the KN repo, but it’s just some dependsOn
, don’t how to use that bundle file. Any hints?olonho
01/31/2018, 11:40 AM