drofwarcs
02/04/2019, 6:38 AMld: framework not found OCMockitoIOS
which is a linker error. Updated my gradle script with linker options in the framework block like:
framework {
embedBitcode("disable")
def productsDir = new File("").absolutePath
linkerOpts = ["-F${productsDir}/common/libs"]
}
which points to the directory where that framework is located. This change gets me past the part where it failed before, but throws a new error error: compilation failed: Collection has more than one element.
Am I using the wrong linker options or is this a bug in compiler?Edouard Goossens
02/04/2019, 2:35 PMgalex
02/04/2019, 3:27 PMModule not found: Error: Can't resolve 'ktor-client-core'
and Module not found: Error: Can't resolve 'ktor-http'
. What am I expected to do to have those transitive dependencies taken care of?raniejade
02/04/2019, 9:29 PMjvm
only module depending on a mpp
module? They are in the same project ( implementation project('mpp-module)
). Classes in the mpp
module can't be resolved by IJ in the jvm
only module. Though, compiling with gradle works as usual.galex
02/05/2019, 7:24 AMTzahi Moyal
02/05/2019, 7:31 AMsirrah
02/05/2019, 7:56 AMiosX64
target:
ld: '/Users/.../.konan/dependencies/libffi-3.2.1-2-darwin-ios_sim/lib/libffi.a(ffi64_x86_64.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture x86_64
Which seems to be a result of bitcode being enabled by default in Kotlin 1.3.20. So I've tried disabling it for all my iOS targets by adding the following to each target:
binaries {
framework {
embedBitcode('disable')
}
}
Unfortunately this doesn't resolve the error. I'd appreciate any suggestions on what to try next?wakingrufus
02/05/2019, 2:07 PMmy-game-jvm-terminal
to depend on the mpp text-adventure-terminal
and I am getting e: /home/rufus/code/text-adventure/my-game-jvm-terminal/src/main/kotlin/com/github/wakingrufus/mygame/Main.kt: (5, 5): Unresolved reference: playInTerminal
coolcat
02/05/2019, 3:26 PMfromPreset(iOSTarget, 'iOS') {
binaries {
framework {
baseName = 'myname'
}
}
compilations.main.outputKinds('FRAMEWORK')
}
I see myname.framework
present in build/bin/iOS/debugFramework
and releaseFramework
. But the build/xcode-frameworks
folder generated by the packForXCode
task still contains main.framework
.
Should I now be pointing my Xcode project directly to build/bin/iOS/debugFramework
and releaseFramework
? Or is it basically simplest to suck it up and rename the references in my iOS code to main
instead of myname
?josephivie
02/05/2019, 4:47 PMgalex
02/05/2019, 7:59 PMgalex
02/05/2019, 8:17 PMRobert
02/05/2019, 9:40 PMinsert
(or prepend
) to the StringBuilder
class? There already is append
wollnyst
02/06/2019, 2:20 PMwakingrufus
02/06/2019, 3:30 PMbinaries
section of a native targetjosephivie
02/06/2019, 10:52 PMjosephivie
02/06/2019, 11:08 PMTzahi Moyal
02/07/2019, 6:21 AMthana
02/07/2019, 8:15 AMspring-boot-starter-web
in jvmMain
but want to exclude spring-boot-starter-tomcat
spierce7
02/07/2019, 10:52 PMGarouDan
02/08/2019, 6:14 PMsourceSets {
val jvmMain by getting {
kotlin.srcDir("src/main/kotlin")
resources.srcDir("src/main/resources")
filterPackages("com.company.project.jvm") // filtering packages here
}
My motivation is to try to join all sources in the same folder, for example src/main/kotlin
. If we are to do this we could create some packages like:
com.company.project.common
, com.company.project.js
, com.company.project.jvm
Where all of them could be inside the src/main/kotlin
.orangy
02/09/2019, 1:10 PMPath
object as if it is nio
instance (essentially, an actual typealias), or you have to do toJavaPath
? Being compatible is nice, but it comes at a cost of non-idiomatic APIs, and then limiting what other platforms (JS, Native) can do.vpriscan
02/09/2019, 2:24 PMError:Kotlin: Unsupported plugin option: org.jetbrains.kotlin.android:enabled=true
when trying to build the project. I tried removing .idea and all .iml files but no luck. Please help!tvede
02/09/2019, 4:15 PMvpriscan
02/09/2019, 4:29 PMjw
02/09/2019, 5:46 PMaddamsson
02/09/2019, 6:18 PMkotlin-multiplatform
plugin which includes Dokka and Maven Central deploymentaddamsson
02/09/2019, 6:21 PMjosephivie
02/09/2019, 6:29 PMrusshwolf
02/11/2019, 4:26 AMcommonMain
and commonTest
will be present in project.kotlin.sourceSets
? If not, is there a way to dynamically detect the common sources? I was looking at the metadata
target but it only has a main
compilation and no test
.russhwolf
02/11/2019, 4:26 AMcommonMain
and commonTest
will be present in project.kotlin.sourceSets
? If not, is there a way to dynamically detect the common sources? I was looking at the metadata
target but it only has a main
compilation and no test
.josephivie
02/11/2019, 7:11 AMGarouDan
02/11/2019, 10:31 AMThese are the default source set names for the production and test sources for the targets configured above. The source sets commonMain and commonTest are included into production and test compilations, respectively, of all targets. Note that the dependencies for common source sets commonMain and commonTest are the common artifacts, and the platform libraries go to the source sets of the specific targets.
Also you can do something like:
js().compilations.main.defaultSourceSet { /* ... */ }
js().compilations.test.defaultSourceSet { /* ... */ }
I don’t know what about using project.kotlin.sourceSets, but I think it should work.kotlin.targets."$target".compilations.main
where I got this from:
task copyFramework {
def buildType = project.findProperty('kotlin.build.type') ?: 'DEBUG'
def target = project.findProperty('kotlin.target') ?: 'ios'
dependsOn kotlin.targets."$target".compilations.main.linkTaskName('FRAMEWORK', buildType)
doLast {
def srcFile = kotlin.targets."$target".compilations.main.getBinary('FRAMEWORK', buildType)
def targetDir = getProperty('configuration.build.dir')
copy {
from srcFile.parent
into targetDir
include 'app.framework/**'
include 'app.framework.dSYM'
}
}
}
h0tk3y
02/11/2019, 12:25 PMcommonMain
and commonTest
source sets are always created by the kotlin-multiplatform
plugin, you can expect them to be there if that plugin is applied. However, other plugins that create the kotlin
extension don't create these source sets, so you should check if they are present unless you are targeting MPP only.russhwolf
02/11/2019, 2:25 PM