-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #157 from Team-B1ND/feature/156-data-layer-modules…
…-kmm Data Layer Modules To Kotlin Multiplatform Module
- Loading branch information
Showing
78 changed files
with
254 additions
and
120 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
42 changes: 42 additions & 0 deletions
42
build-logic/src/main/kotlin/com/b1nd/dodam/primitive/MultiplatformKotlinPlugin.kt
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.b1nd.dodam.primitive | ||
|
||
import com.b1nd.dodam.dsl.android | ||
import com.b1nd.dodam.dsl.implementation | ||
import com.b1nd.dodam.dsl.kotlin | ||
import com.b1nd.dodam.dsl.kotlinOptions | ||
import com.b1nd.dodam.dsl.library | ||
import com.b1nd.dodam.dsl.libs | ||
import org.gradle.api.JavaVersion | ||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
import org.gradle.kotlin.dsl.assign | ||
import org.gradle.kotlin.dsl.dependencies | ||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
@OptIn(ExperimentalKotlinGradlePluginApi::class) | ||
class MultiplatformKotlinPlugin : Plugin<Project> { | ||
override fun apply(target: Project) { | ||
with(target) { | ||
tasks.withType(KotlinCompile::class.java) { | ||
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString() | ||
} | ||
|
||
kotlin { | ||
compilerOptions { | ||
freeCompilerArgs.addAll( | ||
listOf( | ||
"-opt-in=kotlin.RequiresOptIn", | ||
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi", | ||
"-Xcontext-receivers" | ||
) | ||
) | ||
} | ||
sourceSets.commonMain.dependencies { | ||
implementation(libs.library("kotlinx-coroutines-core")) | ||
implementation(libs.library("kotlinx-collections-immutable")) | ||
} | ||
} | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
common/src/commonMain/kotlin/com/b1nd/dodam/common/utiles/Extension.kt
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package com.b1nd.dodam.common.utiles | ||
|
||
expect fun String.Companion.javaFormat(format: String, vararg args: Any?): String |
6 changes: 6 additions & 0 deletions
6
common/src/iosMain/kotlin/com/b1nd/dodam/common/utiles/Extension.ios.kt
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.b1nd.dodam.common.utiles | ||
|
||
import platform.Foundation.NSString | ||
import platform.Foundation.stringWithFormat | ||
|
||
actual fun String.Companion.javaFormat(format: String, vararg args: Any?): String = NSString.stringWithFormat(format, args) |
3 changes: 3 additions & 0 deletions
3
common/src/main/java/com/b1nd/dodam/common/utiles/Extension.android.kt
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package com.b1nd.dodam.common.utiles | ||
|
||
actual fun String.Companion.javaFormat(format: String, vararg args: Any?): String = String.format(format, args) |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,20 +1,27 @@ | ||
import com.b1nd.dodam.dsl.android | ||
import com.b1nd.dodam.dsl.kotlin | ||
import com.b1nd.dodam.dsl.setIOS | ||
|
||
plugins { | ||
alias(libs.plugins.dodam.android) | ||
alias(libs.plugins.dodam.android.kotlin) | ||
alias(libs.plugins.dodam.koin) | ||
alias(libs.plugins.dodam.multiplatform) | ||
alias(libs.plugins.dodam.multiplatform.kotlin) | ||
alias(libs.plugins.dodam.multiplatform.koin) | ||
} | ||
|
||
kotlin { | ||
setIOS("data.bus") | ||
|
||
sourceSets.commonMain.dependencies { | ||
implementation(projects.common) | ||
implementation(projects.network.bus) | ||
} | ||
} | ||
|
||
|
||
android { | ||
namespace = "com.b1nd.dodam.data.bus" | ||
|
||
defaultConfig { | ||
consumerProguardFiles("consumer-rules.pro") | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(projects.common) | ||
implementation(projects.network.bus) | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.