Skip to content

Commit 9fd71dc

Browse files
committed
split into kmp-xlog-api and kmp-xlog modules
1 parent 4bd5a91 commit 9fd71dc

File tree

8 files changed

+85
-12
lines changed

8 files changed

+85
-12
lines changed

Diff for: buildSrc/src/main/kotlin/Constants.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
object Consts {
22
const val releaseGroup = "com.piasy"
33
const val releaseName = "kmp-xlog"
4-
const val releaseVersion = "1.3.4"
4+
const val releaseVersion = "1.3.5"
55

66
val androidNS = "$releaseGroup.${releaseName.replace('-', '.')}"
77
}

Diff for: example/iosApp/project.yml

-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,5 @@ targets:
1313
CLANG_WARN_DOCUMENTATION_COMMENTS: "NO"
1414
TARGETED_DEVICE_FAMILY: "1,2"
1515
ASSETCATALOG_COMPILER_APPICON_NAME: "AppIcon"
16-
ENABLE_BITCODE: "NO"
17-
DEVELOPMENT_TEAM: "32VR5PEEGQ"
1816
ONLY_ACTIVE_ARCH: "NO"
1917
VALID_ARCHS: "arm64"

Diff for: example/macApp/macApp/AppDelegate.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
2222
styleMask:NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskMiniaturizable | NSWindowStyleMaskResizable
2323
backing:NSBackingStoreBuffered
2424
defer:NO];
25-
self.mainWindow.title = @"kmp-webrtc";
25+
self.mainWindow.title = @"kmp-xlog";
2626

2727
self.viewController = [[ViewController alloc] initWithNibName:nil bundle:nil];
2828
self.mainWindow.contentView = self.viewController.view;

Diff for: gradle/libs.versions.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ndk = "21.3.6528147"
55
compileSdk = "35"
66
minSdk = "21"
77
targetSdk = "35"
8-
agp = "8.8.0"
8+
agp = "8.7.3"
99
kotlin = "2.1.0"
1010
mockk = "1.13.16"
1111
compose = "1.7.6"

Diff for: kmp-xlog-api/build.gradle.kts

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
import com.vanniktech.maven.publish.SonatypeHost
2+
3+
plugins {
4+
alias(libs.plugins.kmp)
5+
alias(libs.plugins.vanniktech.mavenPublish)
6+
}
7+
8+
version = Consts.releaseVersion
9+
group = Consts.releaseGroup
10+
11+
kotlin {
12+
jvm()
13+
14+
iosArm64()
15+
iosSimulatorArm64()
16+
iosX64()
17+
macosArm64()
18+
macosX64()
19+
20+
js(IR) {
21+
browser {
22+
}
23+
binaries.executable()
24+
}
25+
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
26+
wasmJs {
27+
browser {
28+
}
29+
binaries.executable()
30+
}
31+
32+
linuxX64()
33+
mingwX64()
34+
35+
applyDefaultHierarchyTemplate()
36+
sourceSets {
37+
commonMain {
38+
dependencies {
39+
implementation(libs.kotlinx.datetime)
40+
}
41+
}
42+
}
43+
}
44+
45+
mavenPublishing {
46+
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
47+
48+
signAllPublications()
49+
50+
coordinates(group.toString(), "kmp-xlog-api", version.toString())
51+
52+
pom {
53+
name = "kmp-xlog"
54+
description = "KMP wrapper for tencent mars xlog."
55+
inceptionYear = "2022"
56+
url = "https://github.com/HackWebRTC/kmp-xlog"
57+
licenses {
58+
license {
59+
name = "MIT"
60+
url = "https://opensource.org/licenses/MIT"
61+
distribution = "https://opensource.org/licenses/MIT"
62+
}
63+
}
64+
developers {
65+
developer {
66+
id = "Piasy"
67+
name = "Piasy Xu"
68+
69+
}
70+
}
71+
scm {
72+
url = "https://github.com/HackWebRTC/kmp-xlog"
73+
connection = "scm:git:git://github.com/HackWebRTC/kmp-xlog.git"
74+
developerConnection = "scm:git:git://github.com/HackWebRTC/kmp-xlog.git"
75+
}
76+
}
77+
}

Diff for: kmp-xlog/src/commonMain/kotlin/com/piasy/kmp/xlog/Logging.kt renamed to kmp-xlog-api/src/commonMain/kotlin/com/piasy/kmp/xlog/Logging.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ object Logging {
2626
}
2727
}
2828

29-
internal fun init(impl: LoggingImpl) {
29+
fun init(impl: LoggingImpl) {
3030
this.impl = impl
3131
}
3232

@@ -70,7 +70,7 @@ object Logging {
7070
}
7171
}
7272

73-
internal interface LoggingImpl {
73+
interface LoggingImpl {
7474
fun debug(tag: String, content: String)
7575

7676
fun info(tag: String, content: String)

Diff for: kmp-xlog/build.gradle.kts

+2-5
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,13 @@ kotlin {
5353
}
5454
binaries.executable()
5555
}
56+
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
5657
wasmJs {
5758
browser {
5859
}
5960
binaries.executable()
6061
}
6162

62-
// to include them in the KotlinMultiplatform module when publishing
63-
linuxX64 {}
64-
mingwX64 {}
65-
6663
linuxX64 {
6764
compilations.getByName("main") {
6865
cinterops {
@@ -201,7 +198,7 @@ kotlin {
201198

202199
commonMain {
203200
dependencies {
204-
implementation(libs.kotlinx.datetime)
201+
api(project(":kmp-xlog-api"))
205202
}
206203
}
207204

Diff for: settings.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ dependencyResolutionManagement {
1515
}
1616

1717
rootProject.name = "kmp-xlog"
18+
include(":kmp-xlog-api")
1819
include(":kmp-xlog")
1920

2021
include(":example:shared")

0 commit comments

Comments
 (0)