Dominaezzz
01/19/2019, 5:26 PMFloatArray
, IntArray
or other "primitive" array types. Instead of manually overriding equals
and hashCode
with the IDE. Why doesn't kotlin just generate the recommended implementation of equals
and hashCode
by itself?poohbar
02/04/2020, 3:26 PMClass#getConstructor(params)
method that will find a constructor by parameter types. What is the equivalent in Kotlin?Thierry
02/04/2020, 10:48 PMsteenooo
02/05/2020, 8:36 AMCzar
02/05/2020, 11:35 AMMikołaj Karwowski
02/05/2020, 4:08 PMgbaldeck
02/05/2020, 4:27 PMuser
02/06/2020, 1:43 PMuser
02/06/2020, 4:30 PMBarddo
02/07/2020, 3:13 AMgbaldeck
02/07/2020, 6:07 PMDoganmiketuran
02/08/2020, 3:27 PMFleshgrinder
02/08/2020, 6:20 PMSaood
02/09/2020, 1:42 PMFAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':SharedCode:cinteropAFNetworkingIos'.
> Cannot perform cinterop processing for AFNetworking: cannot determine headers location.
Probably the build is executed from command line.
Note that a Kotlin/Native module using CocoaPods dependencies can be built only from Xcode.
please find below Gradle file.
build.Gradle.kts
From a thread in #generalSaood
02/09/2020, 1:42 PMplugins {
kotlin("multiplatform")
kotlin("native.cocoapods")
}
kotlin {
//select iOS target platform depending on the Xcode environment variables
val iOSTarget: (String, KotlinNativeTarget.() -> Unit) -> KotlinNativeTarget =
if (System.getenv("SDK_NAME")?.startsWith("iphoneos") == true)
::iosArm64
else
::iosX64
iOSTarget("ios") {
binaries {
framework("Shared") {
baseName = "SharedCode"
}
}
}
jvm("android")
sourceSets["commonMain"].dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-common")
}
sourceSets["androidMain"].dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib")
}
version = "1.0.0"
cocoapods {
summary = "This is sample Summary"
homepage = "Home URL"
pod("AFNetworking", "~> 3.2.0")
}
}
val packForXcode by tasks.creating(Sync::class) {
group = "build"
//selecting the right configuration for the iOS framework depending on the Xcode environment variables
val mode = System.getenv("CONFIGURATION") ?: "DEBUG"
val framework = kotlin.targets.getByName<KotlinNativeTarget>("ios").binaries.getFramework(mode)
inputs.property("mode", mode)
dependsOn(framework.linkTask)
val targetDir = File(buildDir, "xcode-frameworks")
from({ framework.outputDirectory })
into(targetDir)
doLast {
val gradlew = File(targetDir, "gradlew")
gradlew.writeText("#!/bin/bash\nexport 'JAVA_HOME=${System.getProperty("java.home")}'\ncd '${rootProject.rootDir}'\n./gradlew \$@\n")
gradlew.setExecutable(true)
}
}
tasks.getByName("build").dependsOn(packForXcode)`
From a thread in #generalChills
02/09/2020, 4:26 PMAnimesh Sahu
02/10/2020, 3:44 AMuser
02/10/2020, 11:44 AMuser
02/10/2020, 12:03 PMDaniel Medeiros
02/10/2020, 8:26 PMuser
02/11/2020, 10:30 AMArkadii Ivanov
02/12/2020, 6:30 PMuser
02/12/2020, 6:33 PMAlessandro Tagliapietra
02/13/2020, 1:04 AMAlessandro Tagliapietra
02/13/2020, 1:04 AMAlessandro Tagliapietra
02/13/2020, 1:05 AMAlessandro Tagliapietra
02/13/2020, 1:05 AMjava.lang.ClassCastException: co.myapp.RawDumpHourlyPartitioner cannot be cast to io.confluent.connect.storage.partitioner.Partitioner
Thilak611
02/13/2020, 9:45 AMTim Malseed
02/14/2020, 4:37 AM"notes" to arrayOf(myElement)
viralshah
02/14/2020, 4:37 AM