darkmoon_uk
08/09/2019, 2:58 PMjava
and android
plugins in the same multi-platform project?
Not being able to have targets for android and javafx desktop co-existing in my multi-platform client modules is really cramping my style...
I think a code change is probably necessary in the android
plugin to prevent it misbehaving in the presence of the java
one.Ricardo Meneghin
08/09/2019, 3:03 PMKirill Zhukov
08/09/2019, 6:55 PMExecution failed for task ':protos:kaptKotlin'.
> Could not resolve all files for configuration ':protos:_classStructurekaptKotlin'.
> Could not resolve com.squareup.wire:wire-runtime:3.0.0-rc01.
Required by:
project :protos
> Cannot choose between the following variants of com.squareup.wire:wire-runtime:3.0.0-rc01:
- jvm-api
- jvm-runtime
- metadata-api
All of them match the consumer attributes:
- Variant 'jvm-api' capability com.squareup.wire:wire-runtime:3.0.0-rc01:
- Unmatched attributes:
- Found org.gradle.status 'release' but wasn't required.
- Found org.gradle.usage 'java-api-jars' but wasn't required.
- Found org.jetbrains.kotlin.platform.type 'jvm' but wasn't required.
- Variant 'jvm-runtime' capability com.squareup.wire:wire-runtime:3.0.0-rc01:
- Unmatched attributes:
- Found org.gradle.status 'release' but wasn't required.
- Found org.gradle.usage 'java-runtime-jars' but wasn't required.
- Found org.jetbrains.kotlin.platform.type 'jvm' but wasn't required.
- Variant 'metadata-api' capability com.squareup.wire:wire-runtime:3.0.0-rc01:
- Unmatched attributes:
- Found org.gradle.status 'release' but wasn't required.
- Found org.gradle.usage 'kotlin-api' but wasn't required.
- Found org.jetbrains.kotlin.platform.type 'common' but wasn't required.
It seems to be caused by Kotlin annotation processor bug (https://youtrack.jetbrains.com/issue/KT-33206). As a workaround creating custom configuration and setting usage attribute for it works:```
configurations {
wire {
attributes.attribute(Usage.USAGE_ATTRIBUTE, getObjects().named(Usage, Usage.JAVA_RUNTIME))
}
}
dependencies {
wire deps.wire.runtime
}
```
However, originally this dependency is transitive and I need it to keep it this way. How would I do that?kpgalligan
08/09/2019, 8:49 PMmbonnin
08/10/2019, 7:50 PMkotlinx-io
support meta data ?wuseal
08/11/2019, 4:48 AM> Task :mpplib:cinteropAFNetworkingIosX64 FAILED
e: Could not find "ktor-http-cio" in [/Users/wuhaibao/IdeaProjects/Idle/iosApp/Pods, /Users/wuhaibao/.konan/klib, /Users/wuhaibao/.konan/kotlin-native-macos-1.3.1/klib/common, /Users/wuhaibao/.konan/kotlin-native-macos-1.3.1/klib/platform/ios_x64].
Anybody could give me some tips?😕
My Gradle Config show as next followAkram
08/11/2019, 12:27 PMrusshwolf
08/12/2019, 2:19 AMdarkmoon_uk
08/12/2019, 12:31 PMbuild
of a multi-platform module; it is natural that all variants are built. ✅
When including a multi-platform module as a project dependency, it's a reasonable default that all variants are built - since one expects any modules overall integrity to be verified in the build process. ✅
But as a heavy optimisation, wouldn't it make sense to have an easy option to build only the platform variant that's demanded by the project inclusion ❓Patrick Jackson
08/12/2019, 6:16 PMmyKtFun { dostuff()
return KotlinUnit() }
andreasmattsson
08/13/2019, 7:39 AMOverload Resolution Ambiguity
in the Android app modules of my MPP in cases where the disambiguity appears to only be in "comments" for the resolution of typealiases, see example snippet.
It compiles fine with gradle, however it would be nice to get syntax highlighting and autocomplete etc on these types... Any suggestions for ways to resolve this?Alan Camilo
08/14/2019, 2:48 PMFail
08/15/2019, 8:47 AMAndrey Stepankov
08/15/2019, 10:01 AMdarkmoon_uk
08/15/2019, 10:33 AMimplementation(project(name="someProj", configuration="variantDefault"))
...where 'variant' is the name of the variant to use.
This does not resolve correctly.
Gradle attributes have their own complications. Is there an easier way I'm missing?Akram
08/15/2019, 9:25 PMdarkmoon_uk
08/15/2019, 10:31 PMsaket
08/16/2019, 2:34 AM// Kotlin Native
expect class Feature
// Android
actual typealias Feature = AndroidFeature
where AndroidFeature is a class
// iOS
actual typealias Feature = iOSFeature
where iOSFeature is an interface
ptmt
08/16/2019, 9:04 AM@DontTouch
so your colleagues won’t delete them during refactoring?Alex
08/16/2019, 10:24 PMDominaezzz
08/17/2019, 11:02 AMsuspend
tests?Evan R.
08/19/2019, 12:59 AMdarkmoon_uk
08/19/2019, 9:55 PMThe 'java' plugin has been applied, but it is not compatible with the Android plugins.
...while trying to make an Multiplatform library with an Android and JavaFX target. The OpenJfx plugin putting a dependency on the Java application
plugin is causing it, in this file:
https://github.com/openjfx/javafx-gradle-plugin/blob/master/src/main/java/org/openjfx/gradle/tasks/ExecTask.java
This means it is not a trivial fix 😕
The crux of the issue is the way the Android Plugin refuses to execute in the presence of the java
plugin; I can see two routes to go here:
1) Make a PR vs the OpenJfx project to make the plugin it adheres to for execution more configurable.
2) Deal with the Android Plugin head on - while this seems like the more daunting task, as there may be deeper issues, @abreslav left a curious comment against a similar issue report, here:
https://discuss.kotlinlang.org/t/kotlin-android-gradle/789
"Since Andriod's Gradle is rather peculiar, we have to essentially build a separate Gradle plugin for Kotlin on Android. We are working on it, you can contribute if you feel like it."
...which suggests JB may have considered this back in '13, but the exclusion problem persists.Kris Wong
08/20/2019, 9:05 PMCLOVIS
08/21/2019, 4:03 PMapi("...:...core:...")
in their Multiplatform/core scope, the Gradle plugin will understand this is not an actual dependency but rather look at the links, and add for each platform the corresponding variant (if there's one).
If I understood correctly, that means I need to deploy:
- the ‘core’, I guess to jCenter?
- the JVM variant
- the JS variant
- the Linux, Windows... variants
Do they all need to be deployed to the same repository for the plugin to find them? I would expect the JS variant to be deployed to NPM or something similar, and the native variants to be deployed directly to Debian's, Arch's, etc's repos...CLOVIS
08/21/2019, 4:07 PMgumil
08/22/2019, 11:02 AMKris Wong
08/22/2019, 1:16 PMKris Wong
08/22/2019, 3:56 PMlinkerOpts
in a .def file works fine, and linkerOpts
as specified here does not: https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#configuring-binariesKris Wong
08/22/2019, 10:18 PMKris Wong
08/22/2019, 10:18 PMlouiscad
08/22/2019, 10:33 PMKris Wong
08/22/2019, 10:42 PMKonstantin Petrukhnov
08/23/2019, 6:42 AMKris Wong
08/23/2019, 1:41 PMsaket
08/23/2019, 3:22 PMKris Wong
08/23/2019, 3:29 PM