Kris Wong
03/25/2020, 8:50 PMspierce7
03/26/2020, 4:45 AMmultiplatform
plugin seems to get confused by Android flavor source sets with expect / actual.
i.e. I have an expected declaration inside of src/commonMain
, and then for Android I have actual declarations inside of src/internal
and src/production
(the folders for Android Flavors). I’m seeing the following error:
Actual object <class name> has no corresponding `expected` declaration.
Redeclaration <class name>
Does anyone know of a solution? The error is only in the IDE. The app compiles fine.Stefan Beyer
03/26/2020, 8:56 AM@JsExport
annotation is throwning a wrench into my project. Maybe you folks have an idea on how to do this correctly?
My goal is to have a Kotlin common sorce set, which should be compiled to js and jvm. This will be a common library, that will be used by the frontend (React with TypeScript) and the backend (Spring Boot with Kotlin) and will contain common data structures, validation logic and some particularly complex bits of business logic that need to be executed on both platforms.
Now my train of thought was to just implement all of this in the commonMain source set and leave the jsMain and jvmMain source sets empty. This works fine for the jvm target: I get a .jar file with all the classes and functions defined in the common code. But for js, everything that should be exported needs to be annotated with @JsExport
for it to actually being compiled to js. Does this mean I have to populate the jsMain source set with a wrapper for each class and function that exists in commonMain, just to be able to compile this to js? This does not sound very pragmatic. is there maybe a way to tell the compiler to always export classes and functions from a certain package?mbonnin
03/26/2020, 1:35 PMbintray
these days ? For regular JVM projects, I'm able to publish with maven-publish
by using the bintray API and <https://api.bintray.com/maven/subject/repo/package>
as url but this doesn't work anymore on multiplatform projects since a project (in the gradle meaning) will have multiple packages (in the Bintray meaning), one for each arch.Derek Ellis
03/26/2020, 1:40 PMKris Wong
03/26/2020, 2:23 PMspierce7
03/26/2020, 2:43 PMKris Wong
03/26/2020, 6:27 PMfatFramework
task every time it reimports the gradle files. it's so strangeOrhan Tozan
03/27/2020, 12:09 AMrnentjes
03/27/2020, 2:17 PMe: java.lang.RuntimeException: No INDEXED_LVALUE_GET for ARRAY_ACCESS_EXPRESSION: KtParenthesizedExpression:
Anyone know what causes this?jeggy
03/28/2020, 6:42 PMsean
03/28/2020, 8:47 PMversion
becomes the artifactId
and the version
becomes null
. The same upload works on sonatype nexusIgor Drozdov
03/29/2020, 12:17 PMorg.jetbrains.kotlin.konan.MissingXcodeException: An error occurred during an xcrun execution. Make sure that Xcode and its command line tools are properly installed.
Besides at the same time I’m able to compile and run it from Xcode
What could be configured wrong?Dave Leeds
03/29/2020, 9:00 PMGunslingor
03/30/2020, 12:15 AMGunslingor
03/30/2020, 6:33 AMMikołaj Kąkol
03/30/2020, 7:01 AMkotlinx.serialization
was build with 1.3.70 so can I use it with 1.3.71?Fabian de Almeida Ramos
03/31/2020, 7:57 AMDefault interface methods are only supported starting with Android N (--min-api 24)
Been looking around, and it seems I have to set the sourceCompatibility
and targetCompatability
in compileOptions
.. it’s just that I don’t know where to do that, as the android { … }
closure is not found. Using kotlin gradle btw.Christian Sousa
03/31/2020, 11:34 AMMyLib-release.kotlin_module
and not any of the classes.
Sorry if it’s not the right place to ask this but since I can only see the *.kotlin_module
on my External Libraries I thought this would be the best place to ask.KamilH
03/31/2020, 3:07 PMspierce7
03/31/2020, 8:47 PMnative-mt
version of kotlinx.coroutines. I’ve been stuck on this for a while now. Can anyone point me in the right direction for how to fix this?
It’s throwing an error on the emit(defaultValue)
.
Caused by: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen kotlinx.coroutines.flow.internal.SafeCollector@f506be8
yshrsmz
04/01/2020, 8:00 AMe: Could not find "kotlinx-serialization-runtime" in [/Users/yshrsmz/repos/github.com/yshrsmz/kgql, /Users/yshrsmz/.konan/klib, /Users/a12897/.konan/kotlin-native-macos-1.3.71/klib/common, /Users/yshrsmz/.konan/kotlin-native-macos-1.3.71/klib/platform/ios_x64].
Here's the repo
https://github.com/yshrsmz/kgql/tree/kotlin1.3.71-builderror
If you run $ ./gradlew build
at the root directory, The generate task is a dependency of multiplatform ios target - X64
test fails.
https://github.com/yshrsmz/kgql/blob/kotlin1.3.71-builderror/kgql-gradle-plugin/src/test/kotlin/com/codingfeline/kgql/gradle/KgqlPluginTest.kt#L166-L181
The weirdest part is, this test some time passes. It fails almost all the time, but sometimes it succeeds.Orhan Tozan
04/01/2020, 8:15 AMaiidziis
04/01/2020, 9:16 AMcommonTest
?curioustechizen
04/01/2020, 10:46 AMcocoapods
plugin such that it publishes the compiled .framework
file to a (private) remote repo?
My goal is to be able to consume the .framework
file remotely instead of from the local file system. I've seen some examples on the cocoapods website but most of the examples talk about publishing the source (looks like cocoapods builds the framework from source). This is not what I want.Christian Sousa
04/01/2020, 4:49 PMkotlin {
cocoapods {
// Configure a dependency on AFNetworking.
// The CocoaPods version notation is supported.
// The dependency will be added to all macOS and iOS targets.
pod("AFNetworking", "~> 3.2.0")
}
}
?
Because I did that and then on my ios part I cant import it because it says that AFNetworking is an unresolved referencejw
04/01/2020, 6:52 PMjvm { withJava() }
target?Gunslingor
04/02/2020, 12:15 AMjvm() {
compilations {
val main by getting
tasks {
register<JavaExec>("run") {
setMain("com.project.MainAppKt")
println(main.output.classesDirs)
classpath = main.output.classesDirs
}
}
}
}
phldavies
04/02/2020, 1:46 PMChristian Sousa
04/02/2020, 4:06 PMmoko-resources
?
I’m trying to build my project but it always gives me the following: Object 'MR' has several compatible actual declarations in modules...
It seems that it’s generating code for iosx64 and iosarm64.
Anyone had a problem like this?