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.rocketraman
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.cocoapods
section (as I have some platform-specific code in iosMain in my shared lib), and there was a symbol conflict of some type. May also be related to how Firebase is linked: https://github.com/firebase/firebase-ios-sdk/blob/master/docs/firebase_in_libraries.md.
Removing FirebaseAuth
from my cocoapods definition has solved the problem.clark
06/30/2022, 2:31 PMPodfile
in my ios
directory does not specify any pod dependencies. In my shared build.gradle.kts
I specify pod("FirebaseAuth", "~> 8.14.0")
because it seems that that is the version being used by GitLive Firebase Kotlin SDK in v1.6.10 (link for reference).
When I don't include that pod in my build.gradle file, and I try to build for iOS, I get:
ld: framework not found FirebaseAuth
When I do include it and try to build for iOS, I get:
e: Compilation failed: Linking globals named 'kniprot_cocoapods_FirebaseAuth0': symbol multiply defined!
Any further guidance on how you solved this issue would be greatly appreciated!rocketraman
06/30/2022, 2:35 PMcocoapods
section in our shared `build.gradle.kts`:
// We don't reference FirebaseAuth here, because firebase-kotlin-sdk references and there appears to be some
// strangeness happening at link time when adding the dependency here also:
// error: Linking globals named 'cocoapods_FirebaseAuth_FIRAuthErrorDomain_getter_wrapper0': symbol multiply defined!
// -- the build appears to work fine without this here, though I'm not exactly sure why as we have code that
// references it.
// see also: <https://github.com/GitLiveApp/firebase-kotlin-sdk/issues/111>
//pod("FirebaseAuth", "~> 8.11.0")
pod 'Firebase/Auth', '~> 8.11.0'
clark
06/30/2022, 2:45 PMPodfile
This is my current cocoapods configuration in build.gradle.kts
. I have tried every combination of having both of the commented out lines being enabled or not and nothing working quite yet.
cocoapods {
summary = "*"
homepage = "*"
framework {
isStatic = false // for SwiftUI preview
}
// pod("FirebaseAuth", "~> 8.14.0")
ios.deploymentTarget = "13.5"
// podfile = project.file("../ios/Podfile")
}
Using kotlin version 1.7.0
8.11.0
instead of 8.14.0
?rocketraman
06/30/2022, 2:46 PMisStatic = false
. In your podfile do you have use_frameworks!
?clark
06/30/2022, 2:50 PMuse_frameworks!
in my Podfile.rocketraman
06/30/2022, 2:50 PMdev.gitlive:firebase-auth
in your commonMain
source set?clark
06/30/2022, 2:54 PMval commonMain by getting {
.
.
.
// Firebase KMP (3rd party OSS)
implementation("dev.gitlive:firebase-auth:1.6.1")
}
rocketraman
06/30/2022, 2:57 PM1.4.3
.clark
06/30/2022, 2:58 PMrocketraman
06/30/2022, 2:59 PMrm -rf ~/Library/Developer/Xcode/DerivedData/
rm -rf ~/Library/Caches/CocoaPods/
cd iosApp
pod deintegrate
rm -rf iosApp.xcworkspace/
pod update
clark
06/30/2022, 3:01 PMpod deintegrate
step and cleaning gradle buildspackForXcode
gradle task?rocketraman
06/30/2022, 3:02 PMpackForXcode
if you use cocoapodsclark
06/30/2022, 3:03 PMrocketraman
06/30/2022, 3:06 PMcocoapods
in build.gradle.kts:
cocoapods {
framework {
baseName = "shared"
}
}
and then in `Podfile`:
target 'iosApp' do
pod 'shared', :path => '../shared'
...
end
clark
06/30/2022, 3:12 PMbuild.gradle.kts
then I get the
ld: framework not found FirebaseAuth
But if I do include it, then I start getting some other weird error:
Exception in thread "main" java.lang.Error: /var/folders/sy/kt1x1x3s7tnc93dj8b1bzbdc0000gn/T/6822736881599445461.m:1:9: fatal error: module 'Firebase' not found