Siggi Gunnarss
10/13/2020, 1:15 PM(Cannot access class...)
The project compiles and runs as expected and Java files are not affected.
It started with the kotlin plugin version 1.4 and it's still an issue with 1.4.20-M1. Using an older plugin, 1.3.72 fixes the issue, but the project is on Kotlin 1.4 so that's not a good workaround.
The project is a kotlin multiplatform project so I suspect that's the issue
Before I raise an issue with Jetbrains I want to understand the problem better, has anyone encountered this?jean
10/14/2020, 7:07 AMplugins {
kotlin("multiplatform") version "1.4.10"
id("com.squareup.sqldelight")
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0")
classpath ("com.squareup.sqldelight:gradle-plugin:1.4.3")
}
}
sqldelight {
database("MyDatabase") {
packageName = "com.my.package.name.sqldelight"
}
}
I also created a News.sq
file in src/commonMain/sqldelight/com/my/package/name/sqldelight
Running gradlew build
succeed but I can’t see that MyDatabase
class is generated.
Am I suppose to do anything more?Mikołaj Kąkol
10/14/2020, 12:05 PMcompile "org.jetbrains.kotlinx:atomicfu-common:0.14.4"
now my build on ios fails, any suggestion
Execution failed for task ':shared:compileKotlinIos'.
> Could not resolve all files for configuration ':shared:iosCompileKlibraries'.
> Could not resolve org.jetbrains.kotlinx:atomicfu-common:0.14.4.
Required by:
project :shared
> No matching variant of org.jetbrains.kotlinx:atomicfu-common:0.14.4 was found. The consumer was configured to find a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native', attribute 'org.jetbrains.kotlin.native.target' with value 'ios_x64' but:
- Variant 'metadata-api' capability org.jetbrains.kotlinx:atomicfu-common:0.14.4:
- Incompatible because this component declares a usage of 'kotlin-metadata' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_x64')
- Variant 'metadata-commonMainMetadataElements' capability org.jetbrains.kotlinx:atomicfu-common:0.14.4 declares a usage of 'kotlin-api' of a component:
...
altavir
10/14/2020, 4:59 PMСоловьев Георгий
10/15/2020, 11:48 AMAleksandr Ivanov
10/15/2020, 12:24 PMmyrronth
10/15/2020, 1:17 PMactual var listener: WeakReference<T>? = null
and updated my calls to listener?.get()?.method()
. But once I use my shared code in Swift, the listener
variable is not the expected weak var listener: T
but a wrapped KotlinWeakReference
. If I use this, it is the same as without – the value assigned to listener, a UIViewController, does not get deallocated once all the references in the concrete implementation are gone (the view controller gets dismissed and should not receive further messages from the listener)Elka
10/15/2020, 2:39 PMrequest
, I never get a result
as if some “deadlock” occurred.
val requestBuilder = HttpRequestBuilder().takeFrom(context.request)
val result: HttpResponse = context.client!!.request(requestBuilder)
Any idea? Anyone implemented a RefreshToken feature that works with latest Ktor?rsetkus
10/15/2020, 4:15 PMAnvith
10/16/2020, 5:58 AMlinkDebugFrameworkIosSim
to throw an error Could not find <project-name> in …
I’ve attached the relevant trace for completeness. How do I resolve this or am I missing something?sendoav
10/16/2020, 8:25 AMaleksey.tomin
10/16/2020, 11:20 AMBig Chungus
10/16/2020, 12:53 PM@jetbrains
Could we have kotlin version added to gradle metadata attributes, please? This would be useful in determining library compatibilities.
Also would play a key role when consuming it and deciding which schema/attributes to expect, since those seem to be quite volatile between versionsbasher
10/16/2020, 9:12 PMkartik1712
10/17/2020, 3:59 PMrocketraman
10/17/2020, 4:39 PMMarc Knaup
10/17/2020, 5:53 PMSystem.identityHashCode(…)
and on native there is Any?.identityHashCode()
.william
10/17/2020, 9:38 PMDuplicate JVM class name
Am I depending on the multiplatform module incorrectly? i am doing
implementation(project(":mobile"))
Even André Fiskvik
10/18/2020, 8:29 PMAleksandr Ivanov
10/18/2020, 9:24 PM> Failed to notify project evaluation listener.
> Kotlin target 'android' tried to set up publishing for Android build variants that are not library variants or do not exist:
* release
Check the 'publishLibraryVariants' property, it should point to existing Android library variants. Publishing of application and test variants is not supported.
> Kotlin target 'android' tried to set up publishing for Android build variants that are not library variants or do not exist:
* release
Check the 'publishLibraryVariants' property, it should point to existing Android library variants. Publishing of application and test variants is not supported.
Dana Haukoos
10/19/2020, 5:17 PMUgi
10/19/2020, 9:14 PMmac
, trying to resolve the dependancy for a sample project on linux
machine will fail because it's missing links to artifacts in latest module:
No matching variant of com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.1.1-SNAPSHOT:20201019.205459-4 was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
- Variant 'iosArm32-api' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.1.1-SNAPSHOT:
- Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed an API of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'
- Other compatible attribute:
- Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
And vice versa.
I haven't faced this behavior before, so is it something new, or am I doing something stupid because I'm tired?chi
10/20/2020, 12:57 AMunable to enhance gradle daemon classloader with idea_rt.jar
org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':shared:debugUnitTestRuntimeClasspath'.
...
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find org.junit.jupiter:junit-jupiter:.
Required by:
project :shared
rocketraman
10/20/2020, 6:49 AMFirebase/Auth
dependency. I keep getting the dreaded code 65 error: Executing of 'xcodebuild -project Pods.xcodeproj -scheme Firebase -sdk iphonesimulator -configuration Release' failed with code 65 and message
. Anyone have this working?rocketraman
10/20/2020, 5:18 PMkotlin.native.concurrent.AtomicReference
in commonMain
is failing when I build it on my Linux box with Unresolved reference: AtomicReference
, but working on my Mac. According to the docs, AtomicReference
is available in Common
.Mikołaj Kąkol
10/21/2020, 10:49 AMsuspendCoroutine
broken in 1.3.9-native-mt-2
? I'm getting an error like on iOS:
Uncaught Kotlin exception: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen kotlin.coroutines.SafeContinuation@368d808
<unknown>:0: error: -[Example_iOS_Tests.SharedModuleTests testSharedModule] : Unexpected Failure
/Users/jenkins4/workspace/q-lib-branch_feature_screensArch/Example/Example-iOS/Example-Tests/SharedModuleTests.swift:113: error: -[Example_iOS_Tests.SharedModuleTests testSharedModule] : Failed due to unwaited expectation 'Test Shared Module'.
Test Case '-[Example_iOS_Tests.SharedModuleTests testSharedModule]' failed (0.190 seconds).
jeggy
10/21/2020, 2:21 PMimplementation(project(":kgraphql"))
within jvmMain, but it's not possible to get the jvmTest from that project to it's side project. Are there any solutions for this except just copy and paste it?rsetkus
10/21/2020, 3:31 PMiosX64("ios")
to ios()
and now need to create modules iosArm64Main and iosX64Main. Is there any way to point both targets to iosMain sourceset only? Does it mean that now I would need duplicate actual
implementation for each target?Kris Wong
10/21/2020, 4:18 PMUmar Ata
10/21/2020, 6:22 PM*cd* "$SRCROOT/.."
./gradlew :shared:packForSimulator -PXCODE_CONFIGURATION=${CONFIGURATION}
shared is the name of my multiplatform module
I am sharing the common code between Android and iOS
so the problem is that whenever I run above command from runScript of XCode it actually builds the framework for Selected device like either iPhone device or iPhone Simulator and it never gives me one framework that runs on both iOS device and simulatorUmar Ata
10/21/2020, 6:22 PM*cd* "$SRCROOT/.."
./gradlew :shared:packForSimulator -PXCODE_CONFIGURATION=${CONFIGURATION}
shared is the name of my multiplatform module
I am sharing the common code between Android and iOS
so the problem is that whenever I run above command from runScript of XCode it actually builds the framework for Selected device like either iPhone device or iPhone Simulator and it never gives me one framework that runs on both iOS device and simulatorKris Wong
10/21/2020, 6:38 PMUmar Ata
10/21/2020, 6:44 PMKris Wong
10/21/2020, 6:44 PMUmar Ata
10/21/2020, 6:47 PMimplementation project(':shared')
and for iOS I use script to generate xcode-frameworksval packForXCode by tasks.creating(Sync::class) {
group = "build"
val mode = System.getenv("CONFIGURATION") ?: "DEBUG"
//val sdkName = System.getenv("SDK_NAME") ?: "iphonesimulator"
val targetName = "iosArm64"//+ if (sdkName.startsWith("iphoneos")) "Arm64" else "X64"
val framework = kotlin.targets.getByName<KotlinNativeTarget>(targetName).binaries.getFramework(mode)
inputs.property("mode", mode)
dependsOn(framework.linkTask)
val targetDir = File(buildDir, "xcode-frameworks")
from({ framework.outputDirectory })
into(targetDir)
}
val packForSimulator by tasks.creating(Sync::class) {
group = "build"
val mode = System.getenv("CONFIGURATION") ?: "DEBUG"
val sdkName = /*System.getenv("SDK_NAME") ?: */"iphonesimulator"
val targetName = "ios" +/*+ if (sdkName.startsWith("iphoneos")) "Arm64" else*/ "X64"
val framework = kotlin.targets.getByName<KotlinNativeTarget>(targetName).binaries.getFramework(mode)
inputs.property("mode", mode)
dependsOn(framework.linkTask)
val targetDir = File(buildDir, "xcode-frameworks")
from({ framework.outputDirectory })
into(targetDir)
}
georg
10/21/2020, 7:03 PMKris Wong
10/21/2020, 7:21 PMgeorg
10/21/2020, 7:25 PMKris Wong
10/21/2020, 7:25 PMgeorg
10/21/2020, 7:29 PMUmar Ata
10/21/2020, 7:32 PMgeorg
10/21/2020, 7:37 PMUmar Ata
10/21/2020, 7:38 PM