timm
12/11/2018, 11:35 AMNikolai
12/11/2018, 1:35 PMmethod
property and using client.get method and when I trace those properties - all good. But in the Charles proxy tool is displayed like POST request and on server side I got wrong request exception because of that.
Did I missed something? I need to set/change something else to make request GET?
P.S Screenshot inside conversation.coletz
12/11/2018, 3:17 PMgradlew
. Is it normal? How should I generate it? I used Intellij Idea and created the project, nothing elseuntwisted
12/11/2018, 6:42 PMcompileKotlin2Js.kotlinOptions.moduleKind = "commonjs"
in the project’s build.gradle
, but Gradle is saying that it can’t find compileKotlin2Js
which I suspect is because this is multiplatform. Is there a way to specify this option in a multiplatform build?Robert
12/11/2018, 8:17 PMJacob Applin
12/11/2018, 11:46 PMjosephivie
12/12/2018, 3:26 AMapi "org.jetbrains.kotlinx:kotlinx-io-native:0.1.1"
to my native dependencies in build.gradle
, it doesn’t seem to actually add the library. IntelliJ nor Gradle recognizes it. Any ideas?Efe
12/12/2018, 10:02 AMtimm
12/12/2018, 3:54 PMimplementation project(':lib_project_multiplatform')
nor compile project(':lib_project_multiplatform')
seem to work. Gradle does list me a bunch of variants it cannot choose between. What do i have to do to make this work?timm
12/12/2018, 4:02 PMRobert
12/12/2018, 9:32 PMcoletz
12/12/2018, 9:52 PMkotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen <object>@839b6268
). The whole code is the same. Anyone ever had similar issue?timm
12/13/2018, 11:43 AMjvmTest/java
and test/java
with the java plugin applied but neither seem to worktimm
12/13/2018, 11:58 AMe: org.jetbrains.kotlin.util.KotlinFrontEndException: Front-end Internal error: Failed to analyze declaration JavaCode
Cause: fromIndex: 1, toIndex: 0
File being compiled at position: (5,1) in /Users/i13/Projekte/git/project-poc/src/commonMain/kotlin/path/JavaCode.kt
The root cause was thrown at: Collections.kt:49
at org.jetbrains.kotlin.resolve.ExceptionWrappingKtVisitorVoid.visitDeclaration(ExceptionWrappingKtVisitorVoid.kt:43)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitDeclaration(KtVisitorVoid.java:453)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitDeclaration(KtVisitorVoid.java:21)
h0tk3y
12/13/2018, 12:50 PMkotlin-multiplatform
plugin, along with some DSL improvements, such as simpler targets declaration.
You're welcome to try it and share your feedback!
See the details in the thread.Hauke Radtki
12/13/2018, 1:01 PMtimm
12/13/2018, 1:15 PMtimm
12/13/2018, 1:55 PMcoletz
12/13/2018, 3:18 PMgeatmo
12/13/2018, 3:21 PMplatform.UIKit.UIDevice
package that's used in the iosMain actual.kt file. So are those packages also not accessible for me from a Windows machine?manijshrestha
12/13/2018, 5:03 PMtargets {
fromPreset(presets.jvm, 'jvm')
// This preset is for iPhone emulator
// Switch here to presets.iosArm64 to build library for iPhone device
fromPreset(presets.iosX64, 'ios') {
compilations.main.outputKinds('FRAMEWORK')
}
}
This would only build x64 and have to switch to Arm 64. It would be ideal if I could have a framework with both so that I can use it for both simulator and real device.pajatopmr
12/13/2018, 7:41 PMimplementation "<http://com.pajato.io:KFile-jvm:0.0.1|com.pajato.io:KFile-jvm:0.0.1>"
or implementation "<http://com.pajato.io:KFile-native:0.0.1|com.pajato.io:KFile-native:0.0.1>"
but how should common
dependencies be written: implementation "<http://com.pajato.io:KFile:0.0.1|com.pajato.io:KFile:0.0.1>"
or implementation "<http://com.pajato.io:KFile-metadata:0.0.1|com.pajato.io:KFile-metadata:0.0.1>"
?kpgalligan
12/14/2018, 2:15 AMbdeg
12/14/2018, 1:15 PMRobert
12/14/2018, 8:37 PMjosephivie
12/14/2018, 9:48 PMatomicfu
dependency here a bug? Shouldn’t it refer to debug_ios_x64
?
http://central.maven.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core-native_debug_ios_x64/1.0.1/kotlinx-coroutines-core-native_debug_ios_x64-1.0.1.pomaddamsson
12/15/2018, 5:43 PMchristophsturm
12/16/2018, 11:24 PMrusshwolf
12/16/2018, 11:35 PMdigital.wup.android-maven-publish
to publish the android part of a kotlin-multiplatform
project. It’s not clear to me how that can be consumed by another kotlin-multiplatform
project. Is there a sample of that anywhere?nestserau
12/17/2018, 8:59 AMHttpClient
and runBlocking
, while the code itself compiles perfectly fine. What could be a reason for that?nestserau
12/17/2018, 8:59 AMHttpClient
and runBlocking
, while the code itself compiles perfectly fine. What could be a reason for that?gildor
12/17/2018, 9:02 AMmsink
12/17/2018, 9:18 AMbuild.gradle
nestserau
12/17/2018, 9:27 AMplugins {
id 'com.android.library'
id 'kotlin-multiplatform'
id 'maven-publish'
}
repositories {
google()
jcenter()
mavenCentral()
maven { url '<http://archiva.example.com:9080/repository/internal>' }
}
group 'com.example.multiplatform'
version '0.4.1'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 21
}
buildTypes {
release {
minifyEnabled true
}
}
}
ext.ktor_version = '1.0.+'
kotlin {
targets {
final def iosTarget = System.getenv('SDK_NAME')?.startsWith("iphoneos") ? presets.iosArm64 : presets.iosX64
fromPreset(iosTarget, 'ios') {
compilations.main.outputKinds('FRAMEWORK')
}
fromPreset(presets.android, 'android')
}
sourceSets {
all {
languageSettings {
languageVersion = '1.3'
useExperimentalAnnotation 'kotlin.ExperimentalUnsignedTypes'
}
}
commonMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
implementation "io.ktor:ktor-client:$ktor_version"
}
}
commonTest {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-test-common'
implementation 'org.jetbrains.kotlin:kotlin-test-annotations-common'
}
}
iosMain
iosTest
}
}
dependencies {
androidMainImplementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
androidMainImplementation "io.ktor:ktor-client-android:$ktor_version"
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'org.jetbrains.kotlin:kotlin-test'
androidTestImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
androidTestImplementation "io.ktor:ktor-client-android:$ktor_version"
iosMainImplementation "io.ktor:ktor-client-ios:$ktor_version"
}
configurations {
compileClasspath
}
task packForXCode(type: Sync) {
final File frameworkDir = new File(buildDir, "xcode-frameworks")
final String mode = project.findProperty("XCODE_CONFIGURATION")?.toUpperCase() ?: 'DEBUG'
inputs.property "mode", mode
dependsOn kotlin.targets.ios.compilations.main.linkTaskName("FRAMEWORK", mode)
from { kotlin.targets.ios.compilations.main.getBinary("FRAMEWORK", mode).parentFile }
into frameworkDir
doLast {
new File(frameworkDir, 'gradlew').with {
text = "#!/bin/bash\nexport 'JAVA_HOME=${System.getProperty("java.home")}'\ncd '${rootProject.rootDir}'\n./gradlew \$@\n"
setExecutable(true)
}
}
}
tasks.build.dependsOn packForXCode
task iosTest {
def device = project.findProperty("iosDevice")?.toString() ?: "iPhone 8"
dependsOn 'linkTestDebugExecutableIos'
group = JavaBasePlugin.VERIFICATION_GROUP
description = "Runs tests for target 'ios' on an iOS simulator"
doLast {
def binary = kotlin.targets.ios.compilations.test.getBinary('EXECUTABLE', 'DEBUG')
exec {
commandLine 'xcrun', 'simctl', 'spawn', device, binary.absolutePath
}
}
}
tasks.check.dependsOn iosTest
msink
12/17/2018, 9:33 AMext.ktor_version = '1.0.+'
- better use exact version.nestserau
12/17/2018, 9:36 AMgildor
12/17/2018, 9:36 AMnestserau
12/17/2018, 9:37 AMgildor
12/17/2018, 9:37 AMio.ktor:ktor-client-jvm
nestserau
12/17/2018, 9:42 AMmsink
12/17/2018, 9:46 AMgildor
12/17/2018, 9:49 AMmsink
12/17/2018, 9:52 AMnestserau
12/17/2018, 10:05 AMandroid
target, invalidated cache and restarted. No change.