Sachinda Liyanaarachchi
08/18/2022, 9:01 AM.js
file in index.html
My current problem is that there are two build folders being created. 1 in project folder and one in shared folder.Oliver.O
08/18/2022, 10:08 AMSachinda Liyanaarachchi
08/18/2022, 10:14 AMplugins {
kotlin("multiplatform")
kotlin("native.cocoapods")
id("com.android.library")
id("com.google.devtools.ksp") version "1.6.10-1.0.2"
}
repositories {
mavenCentral()
maven("<https://s01.oss.sonatype.org/content/repositories/snapshots/>")
}
version = "1.0"
val fritz2Version = "1.0-RC1"
kotlin {
jvm()
js(IR) {
browser()
}.binaries.executable()
android()
iosX64()
iosArm64()
iosSimulatorArm64()
cocoapods {
summary = "Some description for the Shared Module"
homepage = "Link to the Shared Module homepage"
ios.deploymentTarget = "14.1"
podfile = project.file("../iosApp/Podfile")
framework {
baseName = "shared"
}
}
sourceSets {
val commonMain by getting {
dependencies {
implementation("dev.fritz2:core:$fritz2Version")
// implementation("dev.fritz2:headless:$fritz2Version") // optional
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val androidMain by getting
val androidTest by getting
val iosX64Main by getting
val iosArm64Main by getting
val iosSimulatorArm64Main by getting
val iosMain by creating {
dependsOn(commonMain)
iosX64Main.dependsOn(this)
iosArm64Main.dependsOn(this)
iosSimulatorArm64Main.dependsOn(this)
}
val jvmMain by getting {
dependencies {
}
}
val jsMain by getting {
dependsOn(commonMain)
dependencies {
// implementation("dev.fritz2:core:$fritz2Version")
// tailwind
implementation(npm("tailwindcss", "3.0.19"))
// implementation(npm("@tailwindcss/forms", "0.4.0")) // optional
// webpack
implementation(devNpm("postcss", "8.4.6"))
implementation(devNpm("postcss-loader", "6.2.1"))
implementation(devNpm("autoprefixer", "10.4.2"))
implementation(devNpm("css-loader", "6.6.0"))
implementation(devNpm("style-loader", "3.3.1"))
implementation(devNpm("cssnano", "5.0.17"))
}
}
val iosX64Test by getting
val iosArm64Test by getting
val iosSimulatorArm64Test by getting
val iosTest by creating {
dependsOn(commonTest)
iosX64Test.dependsOn(this)
iosArm64Test.dependsOn(this)
iosSimulatorArm64Test.dependsOn(this)
}
}
}
android {
compileSdk = 33
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
defaultConfig {
minSdk = 23
targetSdk = 33
}
}
/**
* KSP support - start
*/
dependencies {
add("kspMetadata", "dev.fritz2:lenses-annotation-processor:$fritz2Version")
}
kotlin.sourceSets.commonMain { kotlin.srcDir("build/generated/ksp/commonMain/kotlin") }
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>>().all {
if (name != "kspKotlinMetadata") dependsOn("kspKotlinMetadata")
}
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion = "16.0.0"
}
afterEvaluate {
rootProject.extensions.configure<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension> {
versions.webpackCli.version="4.10.0"
}
}
/**
* KSP support - end
*/
Big Chungus
08/18/2022, 11:12 AMSachinda Liyanaarachchi
08/18/2022, 11:16 AMBig Chungus
08/18/2022, 11:18 AMSachinda Liyanaarachchi
08/18/2022, 11:19 AM