Skip to content

Commit

Permalink
KMP support (#54)
Browse files Browse the repository at this point in the history
* setup version catalog

* KMM support for library module and tests

* (KMM support) android sample

* (KMM support) desktop sample

* (KMM support) prepare wasm support

* fix illegal chars that can't appear in JavaScript identifier

* add wasmJs support

* use AndroidMain sourceset

* make UrlValidable as experimental

* setup wasm sample html and css file

* support web js

* (sample) : show snackbar instead of toast

* dumpApi

* remove UrlValidable, we have to make sure it works the same on all the platforms

* add ios support to the library

* add ios sample

* add ios sample

* remove wasm since has too many issues for now
  • Loading branch information
yveskalume authored Nov 13, 2024
1 parent 05b8a16 commit 72595e9
Show file tree
Hide file tree
Showing 117 changed files with 4,566 additions and 1,034 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
.externalNativeBuild
.cxx
local.properties
.kotlin
10 changes: 6 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
plugins {
id("com.android.application") version "8.4.0" apply false
id("com.android.library") version "8.4.0" apply false
id("org.jetbrains.kotlin.android") version "2.0.0" apply false
id("org.jetbrains.kotlin.plugin.compose") version "2.0.0" apply false
alias(libs.plugins.androidApplication).apply(false)
alias(libs.plugins.androidLibrary).apply(false)
alias(libs.plugins.compose.compiler).apply(false)
alias(libs.plugins.kotlinAndroid).apply(false)
alias(libs.plugins.kotlinMultiplatform).apply(false)
alias(libs.plugins.compose).apply(false)
}
5 changes: 0 additions & 5 deletions docs/validables/url.md

This file was deleted.

3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
kotlin.code.style=official
org.jetbrains.compose.experimental.jscanvas.enabled=true
55 changes: 55 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[versions]
agp = "8.5.0"
appcompat = "1.7.0"
composeBom = "2024.06.00"
coreKtx = "1.13.1"
espressoCore = "3.6.0"
junit = "4.13.2"
junitVersion = "1.2.0"
kotlin = "2.0.0"
compose = "1.6.8"
compose-material3 = "1.2.1"
androidx-activityCompose = "1.9.0"
detekt = "1.23.6"
binary-compatibilty-validator = "0.14.0"
kotlinTestWasmJs = "2.0.0"
lifecycleRuntimeKtx = "2.8.2"
material = "1.12.0"
maven-publish = "0.28.0"
compose-plugin = "1.6.11"
uiTestJunit4 = "1.6.8"

[libraries]
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "composeBom" }
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCore" }
androidx-junit = { module = "androidx.test.ext:junit", version.ref = "junitVersion" }
androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
androidx-material3 = { module = "androidx.compose.material3:material3" }
androidx-ui = { module = "androidx.compose.ui:ui" }
androidx-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "uiTestJunit4" }
androidx-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
androidx-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }
junit = { module = "junit:junit", version.ref = "junit" }
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" }
compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" }
compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "compose-material3" }
kotlin-test-wasm-js = { module = "org.jetbrains.kotlin:kotlin-test-wasm-js", version.ref = "kotlinTestWasmJs" }
material = { module = "com.google.android.material:material", version.ref = "material" }

[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }
androidLibrary = { id = "com.android.library", version.ref = "agp" }
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlinCocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" }
compose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
binaryCompatibiltyValidator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binary-compatibilty-validator" }
mavenPublish = { id = "com.vanniktech.maven.publish", version.ref = "maven-publish" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu May 30 17:19:08 EAT 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 72595e9

Please sign in to comment.