GarouDan
06/16/2020, 12:56 PMjs
, jvm
, macosX64
, etc.).
But when our client is consuming the library with:
implementation("com.company:project:1.0.0")
It cannot be automatically choose the correct one, for example, a jvm gradle kts project does not work with this from my tests.
Can we still use this way or need we publish everything separately? If we can use together, how can we do it?
implementation("com.company:project-jvm:1.0.0")
implementation("com.company:project-js:1.0.0")
implementation("com.company:project-macos_x64:1.0.0")
Peter Hsu
06/16/2020, 7:51 PMPablo Caviglia
06/16/2020, 9:52 PM> Task :android:compileDebugKotlin FAILED
e: /home/pablo/devel/projects/tool_framework_multi_platform/src/androidMain/kotlin/com/senaptec/toolframework/ui/Video.kt: (3, 1): The feature "multi platform projects" is experimental and should be enabled explicitly
I've added some extra options for the compiler in my build.gradle, but seems to dont have any effect on the error:Mananpoddarm
06/17/2020, 7:02 AMchristophsturm
06/17/2020, 9:48 AM./gradlew jvmRun &
and then ./gradlew jsRun
but is it possible with just one gradle task?Christian Sousa
06/17/2020, 2:16 PMexpect fun foo(font: UIFont)
I mean, having some platform specific parameter on the expect?
Or do I have to resort to use Any
?
Thanks!Benjamin Charais
06/17/2020, 5:42 PMdazza5000
06/17/2020, 10:57 PMTheo
06/18/2020, 6:44 AMzeugederunity
06/19/2020, 9:12 AMjanvladimirmostert
06/20/2020, 1:30 PM@JsExport
//@Serializable
@ExperimentalJsExport
data class Blah(
var name: String? = null,
)
or
//@JsExport
@Serializable
//@ExperimentalJsExport
data class Blah(
var name: String? = null,
)
With both of them, i get this error
e: java.lang.AssertionError: Properties without fields are not supported com.company.Blah.Companion_instance
christophsturm
06/22/2020, 11:11 AM@JSExport
annotation is only available in the js libjanvladimirmostert
06/22/2020, 11:48 AMMgj
06/23/2020, 11:45 AMJeff
06/24/2020, 6:55 PMMananpoddarm
06/25/2020, 5:05 AMMgj
06/25/2020, 1:30 PMtylerwilson
06/25/2020, 2:10 PMcoolcat
06/25/2020, 3:32 PMWeakReference
to hold a reference to a View object from Kotlin, to try and avoid memory leaks. But these objects do not seem to get deallocated immediately when they go out of scope. This is annoying for me as I use iOS UIViewController
as the view object, and the expectation is that these will have deinit
called as soon as they are dismissed.
I have tried the project icerockdev/moko-mvvm
. In their iOS sample project sample6
, the memory leak does not seem to occur, and the view has deinit
invoked immediately. I have read the moko-mvvm
source code and I think their implementation is the same as mine. I can’t understand this.streetsofboston
06/25/2020, 8:30 PMRohen Giralt
06/26/2020, 12:29 PMArkadii Ivanov
06/26/2020, 5:59 PMpackForXcode
Gradle task described here. But I'm getting the following error:
Unresolved reference: targets
. Basically kotlin.targets
is unresolved here 😞 Do you have any ideas how to solve it?Kurt Renzo Acosta
06/27/2020, 9:33 AM// Common
expect annotation class IgnoreExtraProperties()
// Android
actual typealias IgnoreExtraProperties = com.google.firebase.firestore.IgnoreExtraProperties
However, when I try to run it, I get a This class does not have a constructor
. I also did this but no luck. Maybe it's because the actual annotation is just an interface?
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
public @interface IgnoreExtraProperties {
}
Anyway, any help would be greatly appreciated!andylamax
06/28/2020, 4:24 PM> Task :generatePomFileForAndroidReleasePublication FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':generatePomFileForAndroidReleasePublication'.
> Could not apply withXml() to generated POM
> More than one variant of project :klock matches the consumer attributes:
- Configuration ':klock:releaseApiElements' variant android-aidl:
- Unmatched attributes:
- Found artifactType 'android-aidl' but wasn't required.
- Found com.android.build.api.attributes.VariantAttr 'release' but wasn't required.
- Compatible attributes:
- Required com.android.build.api.attributes.BuildTypeAttr 'release' and found compatible value 'release'.
- Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
- Required org.jetbrains.kotlin.platform.type 'androidJvm' and found compatible value 'androidJvm'.
- Configuration ':klock:releaseApiElements' variant android-manifest:
- Unmatched attributes:
- Found artifactType 'android-manifest' but wasn't required.
- Found com.android.build.api.attributes.VariantAttr 'release' but wasn't required.
- Compatible attributes:
- Required com.android.build.api.attributes.BuildTypeAttr 'release' and found compatible value 'release'.
- Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
- Required org.jetbrains.kotlin.platform.type 'androidJvm' and found compatible value 'androidJvm'.
- Configuration ':klock:releaseApiElements' variant android-renderscript:
- Unmatched attributes:
- Found artifactType 'android-renderscript' but wasn't required.
- Found com.android.build.api.attributes.VariantAttr 'release' but wasn't required.
- Compatible attributes:
- Required com.android.build.api.attributes.BuildTypeAttr 'release' and found compatible value 'release'.
- Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
- Required org.jetbrains.kotlin.platform.type 'androidJvm' and found compatible value 'androidJvm'.
- Configuration ':klock:releaseApiElements' variant android-symbol-with-package-name:
- Unmatched attributes:
- Found artifactType 'android-symbol-with-package-name' but wasn't required.
- Found com.android.build.api.attributes.VariantAttr 'release' but wasn't required.
- Compatible attributes:
- Required com.android.build.api.attributes.BuildTypeAttr 'release' and found compatible value 'release'.
- Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
- Required org.jetbrains.kotlin.platform.type 'androidJvm' and found compatible value 'androidJvm'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at <https://help.gradle.org>
BUILD FAILED in 1s
14 actionable tasks: 1 executed, 13 up-to-date
Patrick Jackson
06/29/2020, 7:53 PMMgj
06/30/2020, 9:10 AMNicolas Bourdin
06/30/2020, 9:22 AM- rootProject
- app
- iOS
- common
- src
- androidMain
- commonMain
- ...
- build.gradle
- otherKnLib
- src
- androidMain
- commonMain
- ...
- build.gradle
settings.gradle
build.gradle
I tried to import my lib in the differents sourceSets dependencies in the common module, but I suppose I also have to specify the "target" (common, android, ios) for each sourceSet
sourceSets {
val commonMain by getting {
implementation(project(":otherKnLib")
}
val androidMain by getting {
implementation(project(":otherKnLib")
}
val iosMain by getting {
implementation(project(":otherKnLib")
}
}
In this case, when i try to build, i got an Unresolved reference
Any idea ? Thanks in advance :)Carl Hickman
07/02/2020, 4:47 PMserebit
07/02/2020, 5:11 PMsaket
07/02/2020, 5:12 PMsaket
07/02/2020, 5:12 PMedenman
07/03/2020, 1:08 AMsaket
07/03/2020, 1:56 AMBruno Kongawi
07/04/2020, 9:02 PM