-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add client unit tests * Fix build error * Refactor KSP fix * Add KPIs funnel * Support funnel UI * Run unit tests on JS * Improve analytics * Improve KPIs UI
- Loading branch information
1 parent
d70a969
commit 749f26e
Showing
20 changed files
with
321 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,118 +1,134 @@ | ||
import com.google.devtools.ksp.gradle.KspTask | ||
|
||
plugins { | ||
alias(libs.plugins.kotlinMultiplatform) | ||
alias(libs.plugins.androidApplication) | ||
alias(libs.plugins.composeMultiplatform) | ||
alias(libs.plugins.composeCompiler) | ||
alias(libs.plugins.ksp) | ||
idea | ||
alias(libs.plugins.kotlinMultiplatform) | ||
alias(libs.plugins.androidApplication) | ||
alias(libs.plugins.composeMultiplatform) | ||
alias(libs.plugins.composeCompiler) | ||
alias(libs.plugins.ksp) | ||
idea | ||
} | ||
|
||
kotlin { | ||
js(IR) { | ||
browser() | ||
binaries.executable() | ||
} | ||
js(IR) { | ||
browser() | ||
binaries.executable() | ||
} | ||
|
||
androidTarget { | ||
compilations.all { | ||
kotlinOptions { | ||
jvmTarget = "11" | ||
} | ||
} | ||
androidTarget { | ||
compilations.all { | ||
kotlinOptions { | ||
jvmTarget = "11" | ||
} | ||
} | ||
} | ||
|
||
jvm("desktop") | ||
jvm("desktop") | ||
|
||
listOf( | ||
iosX64(), | ||
iosArm64(), | ||
iosSimulatorArm64() | ||
).forEach { iosTarget -> | ||
iosTarget.binaries.framework { | ||
baseName = "ComposeApp" | ||
isStatic = true | ||
} | ||
listOf( | ||
iosX64(), | ||
iosArm64(), | ||
iosSimulatorArm64() | ||
).forEach { iosTarget -> | ||
iosTarget.binaries.framework { | ||
baseName = "ComposeApp" | ||
isStatic = true | ||
} | ||
} | ||
|
||
sourceSets { | ||
commonMain { | ||
kotlin.srcDirs("build/generated/ksp/commonMain/kotlin") | ||
} | ||
sourceSets { | ||
commonMain { | ||
kotlin.srcDirs("build/generated/ksp/commonMain/kotlin") | ||
} | ||
commonTest { | ||
kotlin.srcDir("build/generated/ksp/test/kotlin") | ||
} | ||
dependencies { | ||
ksp(libs.arrow.optics.ksp) | ||
} | ||
|
||
val desktopMain by getting | ||
val desktopMain by getting | ||
|
||
androidMain.dependencies { | ||
implementation(compose.preview) | ||
implementation(libs.androidx.activity.compose) | ||
} | ||
commonMain.dependencies { | ||
implementation(projects.shared) | ||
implementation(compose.runtime) | ||
implementation(compose.foundation) | ||
implementation(compose.material) | ||
implementation(compose.ui) | ||
implementation(compose.components.resources) | ||
implementation(compose.components.uiToolingPreview) | ||
implementation(libs.kotlin.immutableCollections) | ||
implementation(libs.thirdparty.lottieMultiplatform) | ||
implementation(libs.thirdparty.kamel) | ||
implementation(libs.bundles.arrow) | ||
} | ||
desktopMain.dependencies { | ||
implementation(compose.desktop.currentOs) | ||
} | ||
androidMain.dependencies { | ||
implementation(compose.preview) | ||
implementation(libs.androidx.activity.compose) | ||
} | ||
} | ||
|
||
dependencies { | ||
ksp(libs.arrow.optics.ksp) | ||
commonMain.dependencies { | ||
implementation(projects.shared) | ||
implementation(compose.runtime) | ||
implementation(compose.foundation) | ||
implementation(compose.material) | ||
implementation(compose.ui) | ||
implementation(compose.components.resources) | ||
implementation(compose.components.uiToolingPreview) | ||
implementation(libs.kotlin.immutableCollections) | ||
implementation(libs.thirdparty.lottieMultiplatform) | ||
implementation(libs.thirdparty.kamel) | ||
implementation(libs.bundles.arrow) | ||
} | ||
commonTest.dependencies { | ||
implementation(libs.bundles.test.kmp) | ||
} | ||
desktopMain.dependencies { | ||
implementation(compose.desktop.currentOs) | ||
} | ||
} | ||
} | ||
|
||
android { | ||
namespace = "ivy.learn" | ||
compileSdk = libs.versions.android.compileSdk.get().toInt() | ||
namespace = "ivy.learn" | ||
compileSdk = libs.versions.android.compileSdk.get().toInt() | ||
|
||
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") | ||
sourceSets["main"].res.srcDirs("src/androidMain/res") | ||
sourceSets["main"].resources.srcDirs("src/commonMain/resources") | ||
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") | ||
sourceSets["main"].res.srcDirs("src/androidMain/res") | ||
sourceSets["main"].resources.srcDirs("src/commonMain/resources") | ||
|
||
defaultConfig { | ||
applicationId = "ivy.learn" | ||
minSdk = libs.versions.android.minSdk.get().toInt() | ||
targetSdk = libs.versions.android.targetSdk.get().toInt() | ||
versionCode = 1 | ||
versionName = "1.0" | ||
} | ||
packaging { | ||
resources { | ||
excludes += "/META-INF/{AL2.0,LGPL2.1}" | ||
} | ||
defaultConfig { | ||
applicationId = "ivy.learn" | ||
minSdk = libs.versions.android.minSdk.get().toInt() | ||
targetSdk = libs.versions.android.targetSdk.get().toInt() | ||
versionCode = 1 | ||
versionName = "1.0" | ||
} | ||
packaging { | ||
resources { | ||
excludes += "/META-INF/{AL2.0,LGPL2.1}" | ||
} | ||
buildTypes { | ||
getByName("release") { | ||
isMinifyEnabled = false | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
buildTypes { | ||
getByName("release") { | ||
isMinifyEnabled = false | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
} | ||
|
||
compose.experimental { | ||
web.application {} | ||
web.application {} | ||
} | ||
|
||
// Configure KSP to output to the commonMain directory | ||
tasks.withType<KspTask> { | ||
doLast { | ||
copy { | ||
from("build/generated/ksp/js/jsMain/kotlin") | ||
into("build/generated/ksp/commonMain/kotlin") | ||
include("**/*.kt") | ||
} | ||
delete("build/generated/ksp/js/jsMain/kotlin") | ||
doLast { | ||
fixKspConflicts() | ||
} | ||
} | ||
|
||
fun fixKspConflicts() { | ||
fun fixTarget(target: String) { | ||
copy { | ||
from("build/generated/ksp/$target/${target}Main/kotlin") | ||
into("build/generated/ksp/commonMain/kotlin") | ||
include("**/*.kt") | ||
} | ||
delete("build/generated/ksp/$target/${target}Main/kotlin") | ||
} | ||
fixTarget("js") | ||
fixTarget("desktop") | ||
fixTarget("android") | ||
fixTarget("ios") | ||
fixTarget("native") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.