Skip to content

Commit

Permalink
refactor(common-enums): migrate to Kotlin Multiplatform
Browse files Browse the repository at this point in the history
This removes the tight coupling to the Android ecosystem, and allows for
use outside of Kotlin/Android.

* Use the `jvm` target
  * Migrate `main`/`test` to `commonMain`/`commonTest` source-sets
* Remove `libraryType` declaration

No other source changes were made, and should* be compatible with
existing use cases(?)

Closes #14
  • Loading branch information
EdricChan03 committed Aug 23, 2023
1 parent 79ad8b4 commit f070235
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
32 changes: 15 additions & 17 deletions androidx/common/common-enums/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import io.github.edricchan03.plugin.library.extensions.LibraryType
import io.github.edricchan03.plugin.library.setConventions

plugins {
`android-library`
`kotlin-android`
`kotlin-multiplatform`
io.github.edricchan03.androidx.library
}

Expand All @@ -13,29 +11,29 @@ androidxKtx {
version = "0.1.0-SNAPSHOT"
}

libraryType = LibraryType.Android

name = "androidx-ktx-extras-common-enums"
description = "Common enum utilities for androidx-ktx-extras"
}

@Suppress("UnstableApiUsage")
android {
namespace = "io.github.edricchan03.androidx.common.enums"

testOptions {
unitTests.all {
it.useJUnitPlatform()
kotlin {
jvm {
testRuns["test"].executionTask.configure {
useJUnitPlatform()
}
}
}

dependencies {
testImplementation(libs.kotest.runner.junit5)
testImplementation(libs.kotest.assertions.core)
testImplementation(libs.kotest.property)
sourceSets {
commonTest {
dependencies {
implementation(libs.kotest.runner.junit5)
implementation(libs.kotest.assertions.core)
implementation(libs.kotest.property)
}
}
}
}

@Suppress("UnstableApiUsage")
publishing.publications {
// TODO: Remove in 0.1.0, see https://github.com/EdricChan03/androidx-ktx-extras/issues/6
val relocation by registering(MavenPublication::class) {
Expand Down
1 change: 0 additions & 1 deletion androidx/common/common-enums/src/main/AndroidManifest.xml

This file was deleted.

0 comments on commit f070235

Please sign in to comment.