dai
11/02/2018, 3:30 PMaddamsson
11/03/2018, 2:00 PMjosephivie
11/03/2018, 4:53 PMjosephivie
11/03/2018, 5:35 PMkotlin_metadata
files.josephivie
11/03/2018, 5:57 PMjosephivie
11/04/2018, 6:58 AMaddamsson
11/04/2018, 10:17 AMaddamsson
11/04/2018, 6:16 PMkotlin-multiplatform
plugin?sendoav
11/05/2018, 2:50 PMkpgalligan
11/05/2018, 9:31 PMaddamsson
11/06/2018, 9:14 AMkotlin-multiplatform
this is not an option because they are not separate projects in Gradle.addamsson
11/06/2018, 10:13 AMkotlin-multiplatform
plugin?patjackson52
11/06/2018, 1:16 PMaddamsson
11/06/2018, 2:30 PMkotlin-multiplatform
plugin using Kotlin script (build.gradle.kts
)?
I have been struggling with this for quite some time now but I can't set this up properly:
plugins {
id("org.jetbrains.kotlin.multiplatform")
}
kotlin {
targets {
}
}
IDEA properly recognizes the kotlin
method but there are no docs about how to set it up even with the basic example we have:
targets {
fromPreset(presets.jvm, 'jvm')
fromPreset(presets.js, 'web')
configure([jvm]) {
tasks.getByName(compilations.main.compileKotlinTaskName).kotlinOptions {
jvmTarget = '1.8'
}
tasks.getByName(compilations.test.compileKotlinTaskName).kotlinOptions {
jvmTarget = '1.8'
}
}
configure([web]) {
tasks.getByName(compilations.main.compileKotlinTaskName).kotlinOptions {
sourceMap = true
}
}
}
there is no fromPreset
method for example defined on KotlinTarget
so I'm a bit puzzled.Nikky
11/06/2018, 8:11 PMNikolai
11/07/2018, 3:36 AMpatjackson52
11/07/2018, 6:12 PMNikolai
11/08/2018, 4:37 AMpajatopmr
11/08/2018, 9:12 AMyusuf3000
11/08/2018, 4:25 PMapply from
syntax in a build.gradle
file using the new multiplatform plugin?
I’m getting an error on this line: apply from: '../../../gradle/jacoco.gradle'
addamsson
11/08/2018, 8:39 PMkotlin-multiplatform
plugin?
My understanding was that I should use api
in my build.gradle
like this:
jvmMain {
dependencies {
api 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
api libraries.kotlin_reflect
api libraries.caffeine
api libraries.snakeyaml
api libraries.slf4j_api
api libraries.slf4j_simple
api libraries.trie_map
}
}
But when I reference this multiplatform project in another project in my multi-project build:
dependencies {
compile project(":zircon.core")
compile libraries.kotlin_stdlib
compile libraries.filters
testCompile libraries.junit
testCompile libraries.mockito
testCompile libraries.assertj
}
and publish this to a repository, when I add my project as dependency:
dependencies {
compile "org.hexworks.zircon:zircon.jvm.swing:$version"
}
only the contents of the org.hexworks.zircon:zircon.jvm.swing
are added to the classpath and I can't see stuff from zircon.core
. What could be the problem?Nikolai
11/09/2018, 6:16 AMmaven { url "<https://dl.bintray.com/kotlin/ktor/>" }
to repositories list.
Then I went through all sourceSets and add:
implementation "io.ktor:ktor-client-core:1.0.0-beta-3"
- for common module
implementation "io.ktor:ktor-client-android:1.0.0-beta-3"
- android
implementation "io.ktor:ktor-client-core-ios:1.0.0-beta-3"
- ios
run “assemble” task of the gradle, everything ok.
After that I add some simple code to common module:
private val client = io.ktor.client.HttpClient()
(btw I didn’t get any autocomplete or suggestions from IDE, but at least after I entered whole line it was ok).
After that I tried to run “assemble” again, but got an error :Nikolai
11/09/2018, 6:17 AMSabrina Namur
11/09/2018, 10:43 AMSlackbot
11/10/2018, 3:31 PMNikolai
11/12/2018, 5:51 AMprivate val client = io.ktor.client.HttpClient() {
install(JsonFeature) {
serializer = io.ktor.client.features.json.defaultSerializer()
}
expectSuccess = false
}
And during asseble compileKotlinIos fails with : error: unresolved reference: JsonFeature. Do I need to add additional dependency in iOS module, or this feature is not for multiplatform?
P.S. I tried to search something like : io.ktor:ktor-client-ios-json but no luck.kpgalligan
11/12/2018, 6:37 PMaddamsson
11/12/2018, 6:39 PMpatjackson52
11/12/2018, 11:40 PMaddamsson
11/13/2018, 7:36 AM