albertgao
05/14/2018, 4:42 AMcommon, and android for android lib, and ios for ios framework), but when I open this project in AppCode, nothing shows in the Project panel… I assume it might be something to do with the .idea folder between IDEA and AppCode is different. So, in order to make the multiplatform works for iOS, I need to create the projects in AppCode from scratch?olonho
05/14/2018, 7:00 AMVyacheslav Karpukhin [JB]
05/14/2018, 7:03 AMalbertgao
05/14/2018, 7:34 AMsettings.gradle in this AppCode template in order to import my common module?Vyacheslav Karpukhin [JB]
05/14/2018, 7:56 AMalbertgao
05/14/2018, 7:57 AMplatform-ios module, thanks. Will try it tomorrowalbertgao
05/14/2018, 12:36 PMKN framework, does it mean that I need to put my iOS app in this template too?Vyacheslav Karpukhin [JB]
05/14/2018, 12:38 PMalbertgao
05/14/2018, 11:41 PMx64 build but not the arm64, I want to generate this two builds at the same time. How to do that? This is my gradle settings
framework('kmoblib', targets: ['iphone', 'iphone_sim']) {
enableMultiplatform true
srcDir 'main'
enableDebug true
}
I just call the build from AppCode menualbertgao
05/14/2018, 11:48 PMVyacheslav Karpukhin [JB]
05/14/2018, 11:59 PMalbertgao
05/14/2018, 11:59 PMalbertgao
05/15/2018, 12:01 AM> Task :ios:compileKonanKmoblibIos_arm64
file or directory '/Users/albertgao/codes/work/kmoblib/common/src/main/kotlin', not found
T
Got this info in the output when using --info with gradle command.
It seems it expects the common module to follow the standard while I already set another rule in build.gradle in `common`:
sourceSets {
main.kotlin.srcDirs += 'main/'
test.kotlin.srcDirs += 'test/'
}
So, is this not found info fine to ignore? Seems it can still find the code in commonalbertgao
05/15/2018, 2:09 AMVyacheslav Karpukhin [JB]
05/15/2018, 7:35 AMalbertgao
05/15/2018, 7:37 AMexpect in common and link to the actual in the according module. But I can’t import any module from common module, the compiler will say can't resolve reference a.b.c, any ideas how?svyatoslav.scherbina
05/15/2018, 7:54 AMa.b.c declared and where do you try to use it?albertgao
05/15/2018, 7:55 AMcommon module. I added a settings.gradle to include this common module to the AppCode framework projectsvyatoslav.scherbina
05/15/2018, 8:02 AMa.b.c is declared in common module and imported into your platform iOS module (i.e. into framework project source)?albertgao
05/15/2018, 8:11 AMcommon there is a package a.b.c, and I try to import a.b.c in platform iOS modulesvyatoslav.scherbina
05/15/2018, 8:25 AMimport a.b.c.MyClass
or all of its members:
import a.b.c.*ilya.matveev
05/15/2018, 8:26 AM'/Users/albertgao/codes/work/kmoblib/common/src/main/kotlin', not found message. It is expected in your case. The main sourceset in the common project contains src/main/kotlin as a default source root. Then you add one more source directory into the sourceset but the default directory still remains in it. So when the Kotlin compiler compiles the sources, it iterates over all directories in the sourceset, face this default directory and cannot open it since it doesn't exist.
To remove the default directory you may use = instead of `+=`:
sourceSets {
main.kotlin.srcDirs = ['main/']
}albertgao
05/15/2018, 8:26 AMalbertgao
05/15/2018, 8:28 AMsvyatoslav.scherbina
05/15/2018, 8:30 AMbuild.gradle, settings.gradle, the declaration you import and the import statement itself?