jeran
02/04/2021, 8:32 PMval commonMain by getting {
dependencies {
api(project(":kmmsharedmodule"))
}
}
And now my shared module can use all the code it wants from the kmmsharedmodule. great. Also you'll note I've used api
instead of implementation
, which means my Android app also has access to the kmmsharedmodule code. BUT, the kmmsharedmodule's api is not being exposed to the iOS app via the framework. from the iOS app I can only get access to the kmmsharedmodule if I use something from it in the public api of the shared module. for example if I had in the shared module something like:
fun doSomething(): SomeKmmSharedModuleClass {}
Then the SomeKmmSharedModuleClass would be accessible from the iOS app.
Anyone have any idea how to fix this?Kris Wong
02/04/2021, 8:46 PMJavier
02/04/2021, 11:30 PMDuplicate content roots detected: Path [.../lib] of module [....lib] was removed from modules [....lib]
Marc Dietrichstein
02/05/2021, 7:57 AMundefined is not an object (evaluating 't.length')
errors when I try to fetch data from a REST endpoint. The problem seems to be related to the buffer module that ktor uses (https://github.com/feross/buffer).
It only occurs when using the legacy js backend.
Kotlin: 1.4.21
Ktor: 1.5.1
Is anyone familiar with this issue?Andy Victors
02/05/2021, 10:46 AMGoku
02/05/2021, 10:54 AMbuild.gradle.kts
file:
version = "1.0-SNAPSHOT"
kotlin {
android()
ios()
cocoapods {
frameworkName = "shared"
ios.deploymentTarget = "13.0"
summary = "CocoaPods Test Library"
homepage = "<https://github.com/JetBrains/kotlin>"
pod("AFNetworking") {
version = "~> 4.0.1"
}
pod("PromisesSwift") {
moduleName = "Promises"
}
}
...
And the project builds, the pods are available in both Kotlin code and Swift (I’ve included a path to podspec file)
but the module (AFNetworking in this case) isn’t seen, yet it works.Jeff Lockhart
02/05/2021, 10:12 PMMichal Janos
02/05/2021, 11:18 PMinternal fun preparePartiesDataCalculation(
partiesCalculationEntryData: List<PartyCalculationEntryData>,
product: Product,
ridersMap: Map<String, RiderParametersAndCore>
): List<PartyPreparedForCalculation> {
return partiesCalculationEntryData.map { party ->
val professionsWithInternalParameters = party.professions.map {
MaxProfessionRiskGroupParameters(parameters = getInternalProfessionParams(it.parameters))
}
Generates problem in JS use
Where partiesCalculationEntryData is as JS arraywilliam
02/05/2021, 11:42 PM@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
available on multiplatform?Allen Eubank
02/06/2021, 12:04 AMfkrauthan
02/06/2021, 4:49 AMThe feature "multi platform projects" is experimental and should be enabled explicitly
for a shared lib. But I do have in my gradle file this
targets.all {
compilations.all {
kotlinOptions {
freeCompilerArgs = listOf("-Xmulti-platform")
}
}
}
but the error does not go away. It is running fine but super annoying. Anyone know what todo?Ali Albaali
02/07/2021, 6:51 PMPublishKotlinMultiplatform
task, I get this error:
Execution failed for task ':kamel-core:generateMetadataFileForKotlinMultiplatformPublication'.
> Invalid publication 'kotlinMultiplatform':
- Variants 'commonJvmApiElements-published' and 'desktopApiElements-published' have the same attributes and capabilities. Please make sure either attributes or capabilities are different.
- Variants 'commonJvmRuntimeElements-published' and 'desktopRuntimeElements-published' have the same attributes and capabilities. Please make sure either attributes or capabilities are different.
Anyone has an idea how to fix it?Piotr Krzemiński
02/07/2021, 7:25 PMYaniv Sosnovsky
02/08/2021, 2:03 PMAmritansh
02/08/2021, 10:15 PMEvan
02/09/2021, 12:56 AM* Where:
Initialization script '/private/var/folders/x6/7s_3dlx95fj03stb89dd02_40000gn/T/ijresolvers6.gradle' line: 152
* What went wrong:
Execution failed for task ':shared:testDebugUnitTest'.
> Could not get unknown property 'AndroidGreetingTest_testExample' for build 'MyApplication' of type org.gradle.invocation.DefaultGradle.
Thomas Flad
02/09/2021, 12:22 PMivano
02/09/2021, 1:53 PMShabinder Singh
02/09/2021, 2:26 PMNot Me
02/09/2021, 2:49 PMJack Darlington
02/09/2021, 4:22 PMgammax
02/09/2021, 7:35 PMmetadata
target with several compilations (e.g. both main
and commonMain
). More details are in this Github PR.
• I’m looking for someone that would be interested in trying Detekt in a KMM project in some form.Jeff Tycz
02/10/2021, 12:36 AMcom.tycz:library-android:0.2.0
Where library
is the module name in the project
I want to change it to something like this
com.tycz:myProject-android:0.2.0
How can I change the artifact name?Ilya Varnakin
02/10/2021, 9:35 AMJoost Klitsie
02/10/2021, 1:50 PMModifier 'external' is not applicable to 'class'
It looks (for example) like this:
external interface EventDetailsContractProps: BaseProps {
var eventId: UUID
var handler: EventDetailsContract.Handler
}
interface EventDetailsContract {
interface Handler: EventSummaryContract.Handler {
fun onEventDetailsFinished()
}
}
data class EventDetailsProps constructor(
override var eventId: UUID,
override var handler: EventDetailsContract.Handler
): EventDetailsContractProps
This code is shared between my javascript and android targets. Is there any way to resolve this? I could try:
expect interface EventDetailsContractProps {
var eventId: UUID
var handler: EventDetailsContract.Handler
}
And then make a platform specific actual
Interface, but that would mean a lot of boilerplate (As I would have to rewrite the interface 3 times).Javier
02/10/2021, 1:52 PMJawid
02/10/2021, 3:43 PMKunal Dabir
02/10/2021, 4:11 PMdave08
02/10/2021, 7:58 PMrocketraman
02/11/2021, 3:28 AMcocoapods {
summary = "x"
homepage = "x"
frameworkName = "shared"
ios.deploymentTarget = "13.0"
pod("FirebaseAuth", "~> 7.6.0")
}
but the build fails at linkDebugFrameworkIosX64
with:
error: Linking globals named 'cocoapods_FirebaseAuth_FIRAuthErrorDomain_getter_wrapper0': symbol multiply defined!
This was working fine with an older version of FirebaseAuth.