kotlin-multiplatform-oidc
kotlin-multiplatform-oidc copied to clipboard
Building on Linux/Windows
I'm getting the following error when trying to build this project on Linux:
Caused by: java.io.IOException: Cannot run program "xcodebuild" (in directory "/home/keval/Documents/kotlin-multiplatform-oidc/oidc-crypto"): error=2, No such file or directory
Obviously I understand this is designed to be a cross-platform library, however I'd still like to run the sample app locally. Is there a way to disable the Apple-related components?
I've just tried
Index: oidc-crypto/build.gradle.kts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/oidc-crypto/build.gradle.kts b/oidc-crypto/build.gradle.kts
--- a/oidc-crypto/build.gradle.kts (revision 278a7e3c6f9993ed7b60a05d8e1c2809749595b3)
+++ b/oidc-crypto/build.gradle.kts (date 1715516785303)
@@ -29,19 +29,19 @@
}
}
- listOf(
- iosX64(),
- iosArm64(),
- iosSimulatorArm64(),
- ).forEach {
- it.compilations {
- val main by getting {
- cinterops {
- create("KCrypto")
- }
- }
- }
- }
+// listOf(
+// iosX64(),
+// iosArm64(),
+// iosSimulatorArm64(),
+// ).forEach {
+// it.compilations {
+// val main by getting {
+// cinterops {
+// create("KCrypto")
+// }
+// }
+// }
+// }
targets.withType<org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget> {
compilations["main"].compilerOptions.options.freeCompilerArgs.add("-Xexport-kdoc")
And it appears to have solved my problem.
Does this need a guard around it?
Building on Windows/Linux had no priority when I setup the project, but if you have an idea, you may open a Pull Request :)
Could be solved by using this trick: https://youtrack.jetbrains.com/issue/KT-30498
But this is out of scope of this library, if you want to build on windows, please just exclude the ios targets as the in comment above