Skip to content

Commit

Permalink
[commonize] #496 Commonize :data-source:core
Browse files Browse the repository at this point in the history
  • Loading branch information
Him188 committed Jul 28, 2024
1 parent d0c0a3f commit e360445
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
44 changes: 30 additions & 14 deletions data-sources/core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,44 @@
*/

plugins {
kotlin("jvm")
kotlin("multiplatform")
`android-library`
kotlin("plugin.compose")
id("org.jetbrains.compose")
// 注意! 前几个插件顺序非常重要, 调整后可能导致 compose multiplatform resources 生成错误
kotlin("plugin.serialization")

`ani-mpp-lib-targets`

// for @Stable and @Immutable
// Note: we actually can avoid this, by using a `compose_compiler_config.conf`
// See https://developer.android.com/develop/ui/compose/performance/stability/fix#configuration-file
// But for simplicity, we just include compose here.
id("org.jetbrains.compose")
kotlin("plugin.compose")
`flatten-source-sets`
`ani-compose-hmpp`
}

android {
namespace = "me.him188.ani.data.sources.core"
}

dependencies {
api(libs.kotlinx.coroutines.core)
api(projects.dataSources.api)
kotlin {
sourceSets.commonMain {
dependencies {
api(libs.kotlinx.coroutines.core)
api(projects.dataSources.api)

implementation(libs.kotlinx.serialization.json)
api(projects.utils.ktorClient)
api(projects.utils.io)
implementation(projects.utils.logging)

implementation(libs.kotlinx.serialization.json)
testImplementation(libs.kotlinx.coroutines.test)
api(projects.utils.ktorClient)
// api(libs.kotlinx.io.core)
api(projects.utils.io)
implementation(projects.utils.logging)
implementation(compose.runtime) // required by the compose compiler
}
}

implementation(compose.runtime) // required by the compose compiler
sourceSets.commonTest {
dependencies {
implementation(libs.kotlinx.coroutines.test)
}
}
}
File renamed without changes.

0 comments on commit e360445

Please sign in to comment.