aaverin
01/13/2020, 11:54 AMJue
01/13/2020, 10:39 PMVasili
01/14/2020, 9:22 AMNetworkClient
in common code to be able to change this client in Swift or leave default?
class GetOrganizations(
private val network: NetworkClient = KtorNetworkClient()
) : Action<Params, List<Organization>>
sikri
01/14/2020, 9:51 AMcommon
code?
Being able to use keywords `expect`/`actual` only in pairing (Core Kotlin - target platform), are those words considered as part of some Core Kotlin, or as a part of that gradle mpp plugin, as there would be no sense to use it without that plugin?Big Chungus
01/14/2020, 2:09 PMDuplicate JVM class name
on MPP project with common
and JVM
sourceSets dectaring expect/actual
fun some(a:Int, b:Any)
. Any suggestions?dambakk
01/14/2020, 2:10 PM@JsonFormat(pattern = "yyyy-MM-dd")
?Sylvain Patenaude
01/14/2020, 7:03 PMyshrsmz
01/15/2020, 3:35 AMJoey
01/16/2020, 5:21 AMJoey
01/16/2020, 7:30 AMAndrei Marshalov
01/16/2020, 10:29 AMktor
in multiplatform (iOS/Android) library? I’m interested in downloading files with http client. Thank you in advance!Big Chungus
01/16/2020, 3:14 PMSylvain Patenaude
01/16/2020, 4:18 PM// File 'Name3.kt'
package name1.name2
object Name3 {
fun Function1(): String {...}
}
After, I removed the "object" layer, thinking I would simplify client calls. However, when calling my Android/jvm SDK from a Java client, for instance, it looks awkward since Java doesn't support package-level functions. So it looks like this from the Java client:
import name1.name2.Name3Kt;
void func() {
String s = Name3Kt.Function1();
}
Based on that, shouldn't I revert to my 1st solution of having my static functions wrapped in an object, so the client call (in Java) would look like this instead?
import name1.name2.Name3Kt; //SDK functions at package-level
import name1.name2.Name3; //SDK functions at object-level
String s = Name3Kt.Function1(); //SDK functions at package-level
String s = Name3.Function1(); //SDK functions at object-level
bod
01/16/2020, 6:03 PMcom.android.library
gradle plugin (to publish an aar artifact) or the com.android.application
one (to have a sample app) - but of course you can't apply both. Ideas?vanniktech
01/16/2020, 6:19 PM-Xobjc-generics
enabled. However when trying to run a release build I get: cannot specialize non-generic type
Seems like Kotlin Generics are only working for debug builds. Is there any additional config needed?Sam Schilling
01/16/2020, 7:33 PMbaz
must be abstract since it has no body:
class Foo {
fun bar() { ... }
expect fun baz(): Boolean
}
Arkadii Ivanov
01/16/2020, 11:13 PMjava-test-fixtures
plugin but it does not seem to work in MPP environment.Olenyov Kirill
01/17/2020, 4:29 PMTristan
01/17/2020, 5:43 PMif #available(iOS 9.0, *) {
// use UIStackView
} else {
// show sad face emoji
}
@available(iOS 9.0, *)
func useStackView() {
// use UIStackView
}
Lulu
01/18/2020, 1:04 AMWeakReference
but some of my team advised against it. Any suggestions or takes on this matter? We target JVM and Native.sikri
01/18/2020, 8:13 AMid("org.springframework.boot") version "2.2.3.RELEASE"
kotlin("plugin.spring") version "1.3.61"
kotlin("plugin.allopen") version "1.3.61"
kotlin("multiplatform")
kotlin("kapt")
id("kotlinx-serialization")
apply(plugin = "io.spring.dependency-management")
sourceSets:
sourceSets {
val jvmMain by getting {
kotlin.srcDir("src")
resources.srcDir("resources")
}
dependencies {
implementation(project(":common"))
implementation("org.springframework.boot:spring-boot-starter-web:2.2.3.RELEASE")
implementation("org.springframework.boot:spring-boot-configuration-processor:2.2.3.RELEASE")
configurations["kapt"].dependencies.add(
DefaultExternalModuleDependency(
"org.springframework.boot",
"spring-boot-configuration-processor",
"2.2.3.RELEASE"
)
)
}
}
Idea doesn’t see generated classes (fun main), theefore I’m running via custom run task:
task<JavaExec>("run") {
main = "com.example.mpp.backend.AppRunner"
val jvm by kotlin.targets.getting
val main: KotlinCompilation<KotlinCommonOptions> by jvm.compilations
val runtimeDependencies = (main as KotlinCompilationToRunnableFiles<KotlinCommonOptions>).runtimeDependencyFiles
classpath = files(main.output.allOutputs, runtimeDependencies)
}
But dependencies of Spring don’t see application.yml in this case, and therefore app cannot be startedOlenyov Kirill
01/18/2020, 10:51 AMfun test1(): List<Channel> {
}
fun test2(): MWResponse<List<Channel>> {
}
Where Channel and MWResponse are just data and sealed classes.
In generated obj-c header I see:
- (NSArray<CommonChannel *> *)test1 attribute((swift_name("test1()")));
- (CommonMWResponse<NSArray<CommonChannel *> *> *)test2 attribute((swift_name("test2()")));
Looks good. “List<Channel>” was converted to obj-c “NSArray<Channel>”
But in Swift these methods shown as:
[Channel] test1()
MWResponse<NSArray> test2()
So two questions:
1) Why it has two different “array” types: [] and NSArray?
2) Where is generic type for test2() method? It should be NSArray<Channel> i think..
Is it a problem in objc-swift interop or mpp problem?basher
01/18/2020, 9:20 PMkevin.cianfarini
01/18/2020, 11:30 PMkevin.cianfarini
01/18/2020, 11:38 PMOla Adolfsson
01/19/2020, 9:38 PMdarkmoon_uk
01/20/2020, 7:36 AMsikri
01/20/2020, 10:06 PMMaurice Jouvet
01/21/2020, 7:39 AMnrobi
01/21/2020, 7:45 AMUnable to resolve dependency for ':common@debug/compileClasspath': Could not resolve io.ktor:ktor-client-ios:1.3.0.
nrobi
01/21/2020, 7:45 AMUnable to resolve dependency for ':common@debug/compileClasspath': Could not resolve io.ktor:ktor-client-ios:1.3.0.
Joey
01/21/2020, 7:47 AMio.ktor:ktor-client-native:1.3.0
?nrobi
01/21/2020, 7:48 AMio.ktor:ktor-client-ios:1.0.1
Maurice Jouvet
01/21/2020, 7:56 AMnrobi
01/21/2020, 10:19 AMKris Wong
01/21/2020, 1:57 PM