robstoll
12/28/2020, 10:48 PMgr build
which fails due to failing test succeeds when I re-run it (without changing anything) -> jvmTest is skipped as it is up-to-date
(allTest is executed but does nothing besides generating a html report). How can I change this behaviour? => seems like it: https://blog.gradle.org/stop-rerunning-tests
2. ✔️How can I disable the Please initialize at least one Kotlin target in...
check? It was not there in 1.3.72 but is in 1.4.21. I have a root project which does not contain any source but several MPP sub-projects
3. ✔️ After the update to 1.4.21 I cannot longer run tests (via gradle), I get The root cause java.lang.UnsupportedOperationException was thrown at: org.jetbrains.kotlin.load.kotlin.TypeSignatureMappingKt.mapType(typeSignatureMapping.kt:99)
during compileTestKotlinJvm
is this a known problem?
4. ✔️ not really a problem as there is an easy workaround but out of curiosity why do js
targets need the extra definition of the dependency to kotlin-stdlib-js?Qracle
12/29/2020, 1:01 AMJoaquim Ley
12/29/2020, 4:33 PMsealed class Result<T> {
Success(val data: T): Result()
Error(val message: T): Result()
}
How would you switch case with a swift optional + handle both success and error cases?andylamax
12/30/2020, 4:08 AMcommonMain
which is obviously a good thing. However, I do end up including jvm
, android
and js
as compilation targets.
My question. Since the android
platform basically uses java
classes. Is there a need for me to keep including android
as a compilation target? coz I do have the java target and all.
Those who skipped compiling for the android
target, have you ever faced an issue during importing your library to an android
development?
Note: All targets are compiled using the IR
backendMichal Klimczak
12/30/2020, 8:44 AMsuspend
functions, but they don't have a stable signature, so I don't think it's possible.wuseal
12/31/2020, 10:53 AMAnimesh Sahu
12/31/2020, 11:04 AMJolas
12/31/2020, 1:15 PMC:\Users\vtouch\.konan\dependencies\msys2-mingw-w64-x86_64-clang-llvm-lld-compiler_rt-8.0.1/bin/clang++ command returned non-zero exit code: 1.
output:
C:\Users\vtouch\.konan\dependencies\msys2-mingw-w64-x86_64-clang-llvm-lld-compiler_rt-8.0.1\bin\ld: cannot find -lsqlite3
C:\Users\vtouch\.konan\dependencies\msys2-mingw-w64-x86_64-clang-llvm-lld-compiler_rt-8.0.1\bin\ld: cannot find -lcurl
Can someone please help resolving this issue.
I am nee to windows dev environment.Joaquim Ley
12/31/2020, 1:22 PM// This isLoggedInUseCase is a Kotlin suspend fun
isLoggedInUseCase.invoke { task, error in
switch task {
case let task as TaskResultSuccess<KotlinBoolean>:
// Callback style result here with true|false
break;
case _ as TaskResultError<KotlinBoolean>:
// Handle error
break;
default: break;
}
}
// What I wanted is to await the result of the usecase exec and
// Only then continue execution of the 'main' func
Jeff Lockhart
12/31/2020, 10:18 PMException in thread "main" java.lang.IllegalArgumentException: 'CBLQueryMeta' is going to be declared twice
at org.jetbrains.kotlin.native.interop.gen.KotlinFile.<init>(KotlinCodeModel.kt:257)
at org.jetbrains.kotlin.native.interop.gen.StubIrBridgeBuilder$kotlinFile$1.<init>(StubIrBridgeBuilder.kt:44)
at org.jetbrains.kotlin.native.interop.gen.StubIrBridgeBuilder.<init>(StubIrBridgeBuilder.kt:46)
at org.jetbrains.kotlin.native.interop.gen.StubIrDriver.run(StubIrDriver.kt:122)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:315)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:73)
at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:45)
at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:19)
at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:41)
build.gradle.kts:
plugins {
kotlin("multiplatform") version "1.4.21"
kotlin("native.cocoapods") version "1.4.21"
id("com.android.library")
}
...
kotlin {
android()
ios()
cocoapods {
summary = "TBD"
homepage = "TBD"
ios.deploymentTarget = "9.0"
pod("CouchbaseLite") {
version = "~> 2.8.1"
}
}
...
}
...
Any tips on getting this to work?birdsofparadise
01/02/2021, 11:18 PMremember
API in your "shared" module?dasralph
01/03/2021, 11:28 AM./gradlew clean compileProductionExecutableKotlinJs
. But compileProductionExecutableKotlinJs
does not appear in the ./gradlew tasks
list, so I assume it is not the right one.
Which Gradle task should I use?dasralph
01/03/2021, 11:40 AMIllegalStateException: Can't find name for declaration FUN name:Foo_init_$Create$ visibility:public modality:FINAL <> (bar:kotlin.String?, $mask0:<http://kotlin.Int|kotlin.Int>, $marker:kotlin.js.DefaultConstructorMarker?) returnType:api.model.Foo
.
I assume this is a bug but is there a small workaround for it? Or do I need to wait until it is fixed?
@ExperimentalJsExport
@JsExport
data class Foo(
val bar: String? = null
)
Animesh Sahu
01/05/2021, 5:08 AMtasks.withType<Test> {
testLogging {
exceptionFormat = TestExceptionFormat.FULL
showStandardStreams = true
showStackTraces = true
}
}
Alex
01/05/2021, 9:10 AMDragos Rachieru
01/05/2021, 11:12 AMIvy
01/05/2021, 12:42 PMHimanshu Singh
01/05/2021, 1:16 PMMd Hanif
01/05/2021, 6:19 PMjean
01/06/2021, 9:32 AMjvm
target for which the generated library was in kotlin and readable from my android app. Since a changed the target to android
both the debug and release libraries are in Java and not readable from android studio (it gives me the option to “Decompile to Java” which gives unclear/non-readable code, “Download sources” which does nothing and “Choose sources” for which I don’t know what to select. Isn’t there a simple config for the debug variant at least to make it readable just as the file from the shared library?Javier
01/06/2021, 12:25 PMgradlew allTests
is not running allTests
for androidTest
source set, so I have to use gradlew test
, is there a way to force allTests
to detect the android tests? I could do something like allTests dependsOn test but should be great allTest
just works by default with themJiri Bruchanov
01/06/2021, 2:11 PMPaulo Pinheiro
01/06/2021, 5:12 PMmax.cruz
01/07/2021, 12:10 PMBuilding for iOS Simulator, but linking in dylib built for iOS, file '/Users/.../Shared.framework/Shared' for architecture arm64
Jean Carlos
01/07/2021, 1:38 PMAmritansh
01/07/2021, 8:11 PM./gradlew build
Unresolved reference: UIKit
Unresolved reference: UIDevice
Unresolved reference: db
Unresolved reference: squareup
Unresolved reference: SqlDriver
Unresolved reference: NativeSqliteDriver
Unresolved reference: AppDatabase
It works fine when I run the app.
KotlinVerion = 1.4.2
sqldelight version =1.4.4dirk.dittert
01/08/2021, 1:19 PMMarcus
01/08/2021, 1:42 PMpod("AFNetworking")
to the cocoapods section in build.gradle.kts, I get
> Task :shared:cinteropAFNetworkingIosArm64 FAILED
Exception in thread "main" java.lang.Error: /var/folders/4g/3s9scp9d5593dphx7n_7nhk40000gn/T/tmp1272859169392324213.m:1:9: fatal error: module 'AFNetworking' not found
I'm trying this in an KMMApplication template from AndroidStudio 4.1.1 running Kotlin Plugin 1.4.21-release-Studio4.1.1, in which I've only modified build.gradle.kts to add
kotlin("native.cocoapods")
to the plugins, changed the
ios {
…
}
block to
ios()
to get rid of the
Caused by: java.lang.IllegalArgumentException: Cannot create binary debugFramework: binary with such a name already exists
error that appears when adding the Cocoapods plugin and added this
cocoapods {
pod("AFNetworking")
}
section. Am I missing something?drofwarcs
01/08/2021, 9:02 PMcleanIosTest iosTest
gradle tasks. I can edit the configuration of past tests to use a different gradle task but am curious if there is a way to have the tests that are started from the gutter to use a different gradle task?ludOS
01/09/2021, 1:34 PMludOS
01/09/2021, 1:34 PMalex009
01/09/2021, 3:40 PMludOS
01/09/2021, 6:52 PM