Skip to content

Commit

Permalink
add native targets support
Browse files Browse the repository at this point in the history
  • Loading branch information
InsanusMokrassar committed Jul 16, 2024
1 parent 16945c5 commit 1f3a327
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## 0.5.2

* Add support for native targets

## 0.5.1

* `Versions`:
Expand Down
1 change: 1 addition & 0 deletions extensions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ allprojects {
}

mppProjectWithSerializationPresetPath = "${rootProject.projectDir.absolutePath}/mppProjectWithSerialization.gradle"
mppSampleProjectWithSerializationPresetPath = "${rootProject.projectDir.absolutePath}/mppSampleProjectWithSerialization.gradle"
mppJavaProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppJavaProject.gradle"
mppJsProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppJsProject.gradle"
mppAndroidProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppAndroidProject.gradle"
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kotlin-coroutines = "1.8.1"
kotlin-serialization = "1.6.3"
dokka = "1.9.20"

microutils = "0.21.0"
microutils = "0.21.4"
kslog = "1.3.4"
uuid = "0.8.4"

Expand All @@ -14,8 +14,8 @@ compose = "1.6.2"

dexcount = "4.0.0"
junit_version = "4.12"
test_ext_junit_version = "1.1.5"
espresso_core = "3.5.1"
test_ext_junit_version = "1.2.1"
espresso_core = "3.6.1"

android-gradle-plugin = "8.1.4"
android-minSdk = "21"
Expand Down
3 changes: 3 additions & 0 deletions mppProjectWithSerialization.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ kotlin {
androidTarget {
publishAllLibraryVariants()
}
linuxX64()
mingwX64()
linuxArm64()

sourceSets {
commonMain {
Expand Down
61 changes: 61 additions & 0 deletions mppSampleProjectWithSerialization.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
project.version = "$version"
project.group = "$group"

// apply from: "$publishGradlePath"

kotlin {
jvm {
compilations.main {
kotlinOptions {
jvmTarget = "17"
}
}
}
js (IR) {
browser()
nodejs()
}
androidTarget {
publishAllLibraryVariants()
}

sourceSets {
commonMain {
dependencies {
implementation libs.kotlin
api libs.kotlin.serialization
}
}
commonTest {
dependencies {
implementation libs.kotlin.test.common
implementation libs.kotlin.test.annotations.common
}
}
jvmTest {
dependencies {
implementation libs.kotlin.test.junit
}
}
jsTest {
dependencies {
implementation libs.kotlin.test.js
implementation libs.kotlin.test.junit
}
}
androidUnitTest {
dependencies {
implementation libs.kotlin.test.junit
implementation libs.android.test.junit
implementation libs.android.test.espresso.core
}
}
}
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

apply from: "$defaultAndroidSettingsPresetPath"
2 changes: 1 addition & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
alias(libs.plugins.compose)
}

apply from: "$mppProjectWithSerializationPresetPath"
apply from: "$mppSampleProjectWithSerializationPresetPath"

kotlin {
js(IR) {
Expand Down

0 comments on commit 1f3a327

Please sign in to comment.