eygraber
11/29/2022, 11:26 PMSergio Casero
11/30/2022, 9:57 AMjs(IR) {
binaries.executable()
browser {
commonWebpackConfig {
outputFileName = "wpi.js"
outputPath = File(buildDir, "outputs")
}
}
}
and it generates
(function (root, factory) {
if (typeof define === 'function' && define.amd)
define(['exports'], factory);
else if (typeof exports === 'object')
factory(module.exports);
else
root['wpi-wpi'] = factory(typeof this['wpi-wpi'] === 'undefined' ? {} : this['wpi-wpi']);
}(this, function (_) {
'use strict';
//region block: pre-declaration
//endregion
return _;
}));
//# sourceMappingURL=wpi-wpi.js.map
Artifacts for android and ios are correctly generatedMendess
11/30/2022, 1:45 PMandroidTest
as it wouldn't make sense outside the android source set? I've tried searching for this but I could not find an example that I can understand/worksMychael Koelfat
11/30/2022, 2:02 PMUnresolved Reference
error over the multiplatform method I had made. I feel like it has something to do with my gradle, but I am not quite sure how to fix this. Does anyone have some insight on this? I apologize for if this explanation was too unclear|
A bit of more information: Trying to run gradlew build
I get the error No matching variant of project :shared was found.
Any insight?KotlinLeaner
11/30/2022, 2:15 PMxxfast
11/30/2022, 10:40 PMStefan Oltmann
12/01/2022, 12:34 AMfun main() {
OpenCV.loadLocally()
val image = Imgcodecs.imread("/Users/sol/Pictures/Testfotos/photo_1.jpg")
val targetImage = Mat(image.height(), image.width(), image.type())
Imgproc.cvtColor(image, targetImage, Imgproc.COLOR_RGB2GRAY)
Imgcodecs.imwrite("photo_1_opencv.png", targetImage)
}
And this is the way I do it in SKIA:
fun main() {
val file = "/Users/sol/Pictures/Testfotos/photo_1.jpg"
val image = Image.makeFromEncoded(File(file).readBytes())
val surface = Surface.makeRasterN32Premul(image.width, image.height)
surface.canvas.drawImageRect(
image,
Rect(0f, 0f, image.width.toFloat(), image.height.toFloat()),
Paint().apply {
colorFilter = ColorFilter.makeMatrix(
ColorMatrix(
0.299000F, 0.587000F, 0.114000F, 0F, 0F,
0.299000F, 0.587000F, 0.114000F, 0F, 0F,
0.299000F, 0.587000F, 0.114000F, 0F, 0F,
0F, 0F, 0F, 1F, 0F
)
)
}
)
val newImage = surface.makeImageSnapshot()
File("photo_1_skia.png").writeBytes(
newImage.encodeToData()!!.bytes
)
}
According to https://docs.opencv.org/4.x/de/d25/imgproc_color_conversions.html this should be the right color matrix.
But the result differs. The SKIA version is a bit brighter. I want it to have the same pixel values.
What is my mistake here?Daniel
12/01/2022, 12:51 PMKartik Prakash
12/01/2022, 9:45 PMCrashlyticsLogWriter
https://github.com/touchlab/Kermit/pull/308Corey
12/02/2022, 12:06 AM*Test
with the actual target's test? For example, I would like to provide a fake database driver (Sqldelight) to my ios/Test
target so I can unit test my presentation layer accordingly.
Since I do have a Presenter
in the native platform which injects a ...Query
I would like to know if I can fake it from my iosTest
and get from the actual Test
target I have locally.Jose Flavio
12/02/2022, 3:10 AMiosSimulatorArm64
sourceSet in the gradle file in order to generate de Framework and compile the project in XCode
Or maybe is there something that I'm missing?Michael Paus
12/02/2022, 9:17 AMNinoosvanidze
12/02/2022, 10:38 AMElio Maroun
12/02/2022, 11:11 AMhfhbd
12/02/2022, 12:34 PMBonsible Hou
12/02/2022, 2:38 PMSteve Malek
12/03/2022, 1:59 AMsteve@OrionMachine
~ % kdoctor
[v] System
OS:
macOS (13.0.1)
CPU:
Apple M1
[v] Java
Java
(openjdk version "19.0.1" 2022-10-18)
Location:
/Library/Java/JavaVirtualMachines/zulu-19.jdk/Contents/Home/bin/java JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-19.jdk/Contents/Home *
Note that, by default, Android Studio uses bundled JDK for Gradle tasks
execution.
Gradle
JDK can be configured in Android Studio Preferences under Build, Execution,
Deployment -> Build Tools -> Gradle section[v] Android Studio
Android
Studio (2021.2)
Location:
/Applications/Android <http://Studio.app|Studio.app>
Bundled
Java: openjdk 11.0.12 2021-07-20
Kotlin
Plugin: 212-1.7.10-release-333-AS5457.46
Kotlin
Multiplatform Mobile Plugin: 0.3.4(212-1.7.11-357-IJ)-116[v] Xcode
Xcode
(14.1)
Location:
/Applications/Xcode.app[x] Cocoapods
ruby
(ruby 2.7.7p221 (2022-11-24 revision 168ec2b1e5)
[arm64-darwin22]) ruby gems
(3.1.6) cocoapods (1.11.3) *
cocoapods-generate plugin not found
Get
cocoapods-generate from <https://github.com/square/cocoapods-generate#installationFailures>:
1
KDoctor has
diagnosed one or more problems while checking your environment.
Please check
the output for problem description and possible solutions.
I installed cocoapods-generate via the following command:
gem install
cocoapods-generate
Successfully
installed cocoapods-generate-2.2.2
Parsing
documentation for cocoapods-generate-2.2.2
Done
installing documentation for cocoapods-generate after 0 seconds
1 gem
installed
I checked to see if it is installed via the following command:
gem list
*** LOCAL
GEMS ***
benchmark
(default: 0.1.0)
bigdecimal
(default: 2.0.0)
bundler
(default: 2.1.4)
cgi (default:
0.1.0.2)
cocoapods-disable-podfile-validations
(0.1.1)
cocoapods-generate
(2.2.2)
csv (default:
3.1.2)
My MacBook pro is Apple M1 chipset running Ventura 13.0.1
At this point I am not sure what the problem is, the ruby version is below 3.0.0 as recommended by kdoctor so don't understand what's causing this error.
Any help is appreciated, thank you.zt
12/03/2022, 4:21 AMPath [/home/zt/Documents/Projects/Hyperion/innertube/src/androidTestDebug/assets] of module [Hyperion.innertube.unitTest] was removed from modules [Hyperion.innertube.androidTest]" Also 13 more paths were deduplicated. See idea log for details
@file:Suppress("UnstableApiUsage")
plugins {
kotlin("multiplatform")
kotlin("plugin.serialization")
id("com.android.library")
}
kotlin {
android()
sourceSets {
val ktorVersion = "2.1.3"
val commonMain by getting {
dependencies {
// Kotlinx
val kotlinxSerializationVersion = "1.4.1"
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinxSerializationVersion")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-protobuf:$kotlinxSerializationVersion")
// Ktor
implementation("io.ktor:ktor-client-core:$ktorVersion")
implementation("io.ktor:ktor-client-cio:$ktorVersion")
implementation("io.ktor:ktor-client-encoding:$ktorVersion")
implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion")
}
}
val androidMain by getting {
dependencies {
implementation("io.ktor:ktor-client-android:$ktorVersion")
}
}
}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "11"
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlinx.serialization.ExperimentalSerializationApi"
}
}
android {
namespace = "com.zt.innertube"
compileSdk = 33
defaultConfig {
minSdk = 21
targetSdk = 33
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}
Anmol Verma
12/03/2022, 2:54 PMAlberto
12/03/2022, 4:40 PMUndefined symbol: _OBJC_CLASS_$__TtC11MqttWrapper17BinderWillMessage
it seems that when i try to publish the library, ios don't export her dependencies, Does anyone has some ideas?Alberto
12/03/2022, 4:42 PMkotlin {
android {
publishLibraryVariants("release")
}
val xcf = XCFramework(rootProject.name)
val nativeTargets = listOf(iosArm64(),iosX64())
nativeTargets.forEach { target ->
target.binaries.framework {
baseName = rootProject.name
xcf.add(this)
transitiveExport = true
}
target.binaries.staticLib {
baseName = rootProject.name
}
target.binaries.all {
linkerOpts("-framework","MqttWrapper","-F/build/cocoapods/publish/release/shared.xcframework")
}
}
cocoapods {
summary = "Some description for the Shared Module"
homepage = "Link to the Shared Module homepage"
ios.deploymentTarget = "14.1"
podfile = project.file("../appIos/Podfile")
framework {
baseName = "shared"
isStatic = true
embedBitcode(org.jetbrains.kotlin.gradle.plugin.mpp.BitcodeEmbeddingMode.DISABLE)
}
pod("MqttWrapper") {
version = "0.1.9"
}
}
sourceSets {
val commonMain by getting {
dependencies {
implementation(libs.kotlin.coroutinesCore)
implementation(libs.kotlin.datetime)
}
}
val commonTest by getting {
dependencies {
implementation(libs.kotlin.testCoroutines)
implementation(kotlin("test"))
implementation(kotlin("test-common"))
}
}
val androidMain by getting {
dependencies{
implementation(libs.hivemq)
}
}
val androidTest by getting
//val iosSimulatorArm64Main by getting
val iosArm64Main by getting
val iosX64Main by getting
val iosMain by creating {
dependsOn(commonMain)
//iosSimulatorArm64Main.dependsOn(this)
iosArm64Main.dependsOn(this)
iosX64Main.dependsOn(this)
}
val iosTest by creating {
dependsOn(commonTest)
}
}
}
František Jeřábek
12/04/2022, 4:18 PMPablo
12/04/2022, 8:45 PMEugene Maksymenko
12/04/2022, 11:49 PMapvasanth03
12/05/2022, 2:09 AMRaphael TEYSSANDIER
12/05/2022, 2:27 PMDaniel
12/05/2022, 7:20 PMDaniel
12/05/2022, 7:23 PMVojtěch Pešek
12/06/2022, 7:29 AModay
12/06/2022, 9:04 AModay
12/06/2022, 9:04 AMSebastien Leclerc Lavallee
12/07/2022, 3:57 AModay
12/07/2022, 9:29 AM