Skip to content

Commit

Permalink
++ver 1.4.5 Move some logic to kotlin-ext lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Sablin authored and Ivan Sablin committed Dec 29, 2021
1 parent 897e05d commit b13a353
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 104 deletions.
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/Modules.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ object Modules {
object MerseyLibs {
val archy = ":archy-core"
val utils = ":utils-core"
val kotlinExt = ":kotlin-ext"
}

val mppLibrary = ":mpp-library"
Expand Down
3 changes: 3 additions & 0 deletions buildSrc/src/main/kotlin/extensions/GradleExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ fun Project.isLocalDependencies(): Boolean =
fun Project.isLocalAndroidDependencies(): Boolean =
findTypedProperty("build.localAndroidDependencies")

fun Project.isLocalKotlinExtLibrary(): Boolean =
findTypedProperty("build.localKotlinExtLibrary")

inline fun <reified T: MinimalExternalModuleDependency> Any.toProvider(): Provider<T> {
return when (this) {
is Provider<*> -> this as Provider<T>
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/publication/Metadata.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
object Metadata {
const val groupId = "io.github.merseyside"
const val version = "1.4.4"
const val version = "1.4.5"
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ kotlin.code.style=official

build.localDependencies=false
build.localAndroidDependencies=false
build.localKotlinExtLibrary=false

#Enable commonizer
kotlin.mpp.enableGranularSourceSetsMetadata=true
Expand Down
14 changes: 10 additions & 4 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
enableFeaturePreview("VERSION_CATALOGS")
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

private val isLocalAndroidDependencies = false
private val isLocalKotlinExtLibrary = false

dependencyResolutionManagement {
repositories {
mavenCentral()
mavenLocal()
}

val catalogVersions = "1.2.1"
val catalogVersions = "1.2.2"
val group = "io.github.merseyside"
versionCatalogs {
val multiplatformLibs by creating {
Expand All @@ -16,7 +19,6 @@ dependencyResolutionManagement {

val androidLibs by creating {
from("$group:catalog-version-android:$catalogVersions")
version("merseyLib", "1.7.4")
}

val common by creating {
Expand All @@ -29,8 +31,6 @@ include(":archy-core")
include(":utils-core")
include(":archy-android")

private val isLocalAndroidDependencies = false

if (isLocalAndroidDependencies) {

include(":utils")
Expand All @@ -51,4 +51,10 @@ if (isLocalAndroidDependencies) {

}

if (isLocalKotlinExtLibrary) {
include(":kotlin-ext")
project(":kotlin-ext").projectDir =
File(rootDir.parent, "mersey-kotlin-ext/kotlin-ext")
}

rootProject.name = "kmm-support-library"
6 changes: 5 additions & 1 deletion utils-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ val merseyLibs = listOf(
)

dependencies {
commonMainApi(common.merseyLib.kotlin.ext)
if (isLocalKotlinExtLibrary()) {
commonMainApi(project(Modules.MultiPlatform.MerseyLibs.kotlinExt))
} else {
commonMainApi(common.merseyLib.kotlin.ext)
}
commonMainImplementation(multiplatformLibs.bundles.moko.mvvm)
mppLibs.forEach { commonMainImplementation(it) }

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit b13a353

Please sign in to comment.