xxfast
09/28/2021, 12:49 PMJim
09/28/2021, 5:36 PMtylerwilson
09/28/2021, 5:49 PMwatchos {
binaries {
framework {
baseName = "common"
embedBitcode("bitcode")
xcf.add(this)
}
}
}
Jim
09/28/2021, 6:15 PMkotlinNodeJsSetup
is using https://nodejs.org/dist, is there a way I can prevent it from using that url and instead use an internal repository?Matti MK
09/29/2021, 5:57 AMRan
09/29/2021, 7:36 AMFabio Bombardi
09/29/2021, 9:13 AMrobjperez
09/29/2021, 9:15 AMval isIdeaSyncing = System.getProperty("idea.sync.active") != null
if (isIdeaSyncing) {
iosX64("ios")
} else {
ios()
iosX64()
iosArm64()
}
Well, with that, when I try to run a test in iosTest
folder I got this error
FAILURE: Build failed with an exception.
* What went wrong:
Task 'cleanIosTest' not found in project ':sdk'.
Probably because on how I define the targets, but If remove above’s snippet with the iOS targets, then the code which is exclusive for simulator or device is not built
Any clues?? Thank you!Hossein Amini
09/29/2021, 9:24 AMPiotr Krzemiński
09/29/2021, 9:42 AMUncaught TypeError: e.defineModule is not a function
. When looking into my bundle, e.defineModule
occurs only once in such context:
e.defineModule("kotlinx-serialization-kotlinx-serialization-core-jsLegacy",t)
Indeed I want to use kotlinx.serialization. This happens on legacy JS backend, and on IR some misterious ClassCastException
occurs at runtime (maybe more changes would be required to make the project work with IR).Ran
09/29/2021, 10:05 AMxiaobailong24
09/29/2021, 11:04 AMKamilH
09/29/2021, 11:41 AMAbly
). My gradle sync fails on cinterop
task (shared:cinteropAblyIos
to be specific) with the message:
Exception in thread "main" java.lang.Error: /var/folders/2q/gjhd6ng16j51tnmw772w02k40000gp/T/5129966869508006261.m:1:9: fatal error: could not build module 'Ably'
I tried to check whether I’m able to import some other cocoapods dependency and for example I can import AFNetworking
and use it, but when I try to import Ably it doesn’t work
What is the reason it fails? It’s something wrong with the dependency itself?Waqas Tahir
09/29/2021, 5:07 PMAlfred Lopez
09/30/2021, 12:11 AMHamza Ahmad
09/30/2021, 7:57 AMIvanna Vasilkova
09/30/2021, 8:33 AMAlfred Lopez
09/30/2021, 4:08 PMconst kotlin = require("kotlin");
...
let identityContext = new kotlin.kotlin.collections.LinkedHashMap()
identityContext.put("mYKey","myValue");
but when I run this, I get the following error:
TypeError: identityContext.put is not a function
When I look at kotlin.js, I see the following definition of "put":
LinkedHashMap.prototype.put_xwzc9p$ = function (key, value)
I see that LinkedHashMap is an expect class, so I assumed that there's a JavaScript accept class with proper @JsName declarations. Is this not the case? Do I need to use the mangled function name?
Thankshsyogesh
09/30/2021, 4:22 PMJan
09/30/2021, 5:36 PMAnton Afanasev
09/30/2021, 6:41 PMhttps://www.youtube.com/watch?v=hrRqX7NYg3Q&t=1892s▾
Marco Righini
09/30/2021, 7:36 PMBrian G
10/01/2021, 12:00 AMHamza Ahmad
10/01/2021, 7:05 AMdeviant
10/01/2021, 10:14 AMcommonTest
? what platform will run it?Diana M
10/01/2021, 4:13 PM* What went wrong:
Could not determine the dependencies of task ':linkReleaseFrameworkIos'.
> Collection is empty.
* Try:
Run with --scan to get full insights.
* Exception is:
org.gradle.api.internal.tasks.TaskDependencyResolveException: Could not determine the dependencies of task ':linkReleaseFrameworkIos'.
at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.getDependencies(CachingTaskDependencyResolveContext.java:71)
at org.gradle.execution.plan.TaskDependencyResolver.resolveDependenciesFor(TaskDependencyResolver.java:46)
at org.gradle.execution.plan.LocalTaskNode.getDependencies(LocalTaskNode.java:161)
at org.gradle.execution.plan.LocalTaskNode.resolveDependencies(LocalTaskNode.java:129)
at org.gradle.execution.plan.DefaultExecutionPlan.doAddNodes(DefaultExecutionPlan.java:186)
at org.gradle.execution.plan.DefaultExecutionPlan.addEntryTasks(DefaultExecutionPlan.java:150)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph.addEntryTasks(DefaultTaskExecutionGraph.java:146)
This is the build.gradle snippit:
import org.jetbrains.kotlin.gradle.tasks.FatFrameworkTask
apply plugin: 'com.android.library'
apply plugin: 'kotlin-multiplatform'
apply plugin: 'maven-publish'
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31"
}
ext.ios_framework_name = 'customclassFramework'
}
repositories {
mavenCentral()
google()
jcenter()
}
group 'com.xyz.testApp'
version '0.0.1'
android {
compileSdkVersion 31
defaultConfig {
minSdkVersion 30
targetSdkVersion 31
versionCode 1
versionName '1.0'
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
debug {
debuggable true
}
release {
minifyEnabled true
}
}
sourceSets {
main {
manifest.srcFile 'src/androidMain/AndroidManifest.xml'
java.srcDirs = ['src/androidMain/kotlin']
res.srcDirs = ['src/androidMain/res']
}
}
}
kotlin {
targets {
fromPreset(presets.jvm, 'android')
iosX64('ios')
iosArm32('iosArm32')
iosArm64('iosArm64')
configure([iosArm32, iosArm64, ios]) {
binaries.framework {
baseName = "$ios_framework_name"
freeCompilerArgs += "-Xobjc-generics"
}
}
}
sourceSets {
commonMain.dependencies {
api 'org.jetbrains.kotlin:kotlin-stdlib-common'
}
androidMain.dependencies {
api 'org.jetbrains.kotlin:kotlin-stdlib'
}
iosMain.dependencies { }
configure([iosArm32Main, iosArm64Main]) {
dependsOn iosMain
}
configure([iosArm32Test, iosArm64Test]) {
dependsOn iosTest
}
}
task releaseFatFramework(type: FatFrameworkTask) {
baseName = ios_framework_name
destinationDir = file("$projectDir/xcode-framework")
from(
targets.ios.binaries.getFramework("RELEASE"),
targets.iosArm32.binaries.getFramework("RELEASE"),
targets.iosArm64.binaries.getFramework("RELEASE")
)
doLast {
new File(destinationDir, 'gradlew').with {
text = "#!/bin/bash\nexport 'JAVA_HOME=${System.getProperty("java.home")}'\ncd '${rootProject.rootDir}'\n./gradlew \$@\n"
setExecutable(true)
}
}
}
}
configurations {
compileClasspath
}
publishing {
repositories {
maven {
url "<path/to/private/maven>"
name 'customclass'
credentials {
username = "${vsts_user_publish}"
password = "${vsts_password_publish}"
}
}
}
publications {
maven(MavenPublication) {
groupId = 'com.xyz.testApp'
artifactId 'customclass'
version = version
artifact ("${project.buildDir}/outputs/aar/${project.name}-release.aar")
}
}
}
tasks.build.dependsOn releaseFatFramework
Alfred Lopez
10/01/2021, 7:08 PMFrancis Mariano
10/01/2021, 7:41 PMnative-mt
on iosMain module. Code in threadspierce7
10/02/2021, 4:26 AMAkram Bensalem
10/03/2021, 5:39 PMAkram Bensalem
10/03/2021, 5:39 PMMartin Rajniak
10/03/2021, 7:48 PM