Skip to content

Commit d76fbd6

Browse files
committed
remove wasmjs, adjust interface
1 parent 9129518 commit d76fbd6

File tree

22 files changed

+208
-208
lines changed

22 files changed

+208
-208
lines changed
Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,20 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
include:
22-
- cmd: "${GITHUB_WORKSPACE}/gradlew :kmp-xlog:testDebugUnitTest"
23-
os: macos-latest
24-
- cmd: "${GITHUB_WORKSPACE}/gradlew :example:androidApp:assembleDebug"
25-
os: macos-latest
26-
- cmd: "${GITHUB_WORKSPACE}/scripts/build_apple.sh && ${GITHUB_WORKSPACE}/gradlew runKmp_xlogDebugExecutableMacosX64"
27-
os: macos-latest
22+
- os: macos-latest
23+
cmd: "./gradlew :kmp-xlog:testDebugUnitTest"
24+
- os: macos-latest
25+
cmd: "./gradlew :example:androidApp:assembleDebug"
26+
- os: macos-latest
2827
dep: "brew update && brew install xcodegen"
29-
- cmd: "${GITHUB_WORKSPACE}/scripts/build_xlog_linux.sh && ${GITHUB_WORKSPACE}/gradlew runKmp_xlogDebugExecutableLinuxX64"
30-
os: ubuntu-22.04
28+
cmd: "./scripts/build_apple.sh && ./gradlew runKmp_xlogDebugExecutableMacosX64 && ./scripts/build_mac_demo.sh && ./scripts/build_ios_demo.sh"
29+
- os: ubuntu-22.04
3130
dep: "sudo apt-get update && sudo apt-get install zlib1g-dev"
32-
- cmd: "%GITHUB_WORKSPACE%\\gradlew runKmp_xlogDebugExecutableMingwX64"
33-
os: windows-latest
34-
- cmd: "${GITHUB_WORKSPACE}/gradlew :example:shared:jsBrowserDistribution"
35-
os: macos-latest
36-
- cmd: "${GITHUB_WORKSPACE}/gradlew :example:shared:wasmJsBrowserDistribution"
37-
os: macos-latest
31+
cmd: "./scripts/build_xlog_linux.sh && ./gradlew runKmp_xlogDebugExecutableLinuxX64"
32+
- os: windows-latest
33+
cmd: "./gradlew runKmp_xlogDebugExecutableMingwX64"
34+
- os: macos-latest
35+
cmd: "./gradlew :example:shared:jsBrowserDistribution"
3836
runs-on: ${{ matrix.os }}
3937

4038
steps:
@@ -54,10 +52,8 @@ jobs:
5452
cache: 'gradle'
5553
- name: Setup Gradle
5654
uses: gradle/actions/setup-gradle@v3
57-
- if: ${{ matrix.dep }}
55+
- name: Install deps
56+
if: ${{ matrix.dep }}
5857
run: ${{ matrix.dep }}
59-
- if: ${{ matrix.os == 'windows-latest' }}
60-
shell: cmd
61-
run: ${{ matrix.cmd }}
62-
- if: ${{ matrix.os != 'windows-latest' }}
58+
- name: Run it
6359
run: ${{ matrix.cmd }}

README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22

33
KMP wrapper for [tencent mars xlog](https://github.com/Tencent/mars).
44

5-
![Maven Central Version](https://img.shields.io/maven-central/v/com.piasy/kmp-xlog) ![Main branch status](https://github.com/HackWebRTC/kmp-xlog/actions/workflows/test_and_run_demo.yaml/badge.svg?branch=main)
5+
![Maven Central Version](https://img.shields.io/maven-central/v/com.piasy/kmp-xlog) ![Main branch status](https://github.com/HackWebRTC/kmp-xlog/actions/workflows/ci.yaml/badge.svg?branch=main)
66

77
## Supported platforms
88

99
| Platform | 🛠Builds🛠 + 🔬Tests🔬 |
1010
| :----------------: | :------------------: |
1111
| `JVM` 17 | 🚀 |
1212
| `JS` (Chrome) | 🚀 |
13-
| `WasmJS` (Chrome) | 🚀 |
1413
| `Android` | 🚀 |
1514
| `iOS` | 🚀 |
1615
| `macOS` | 🚀 |
@@ -128,12 +127,6 @@ pod install
128127
./gradlew :example:shared:jsBrowserRun
129128
```
130129

131-
### WASM JS
132-
133-
```bash
134-
./gradlew :example:shared:wasmJsBrowserRun
135-
```
136-
137130
### Linux
138131

139132
Install deps: `zlib1g-dev`.
Lines changed: 1 addition & 1 deletion
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.6"
4+
const val releaseVersion = "1.4.0"
55

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

example/macApp/macApp/ViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ - (void)viewDidLoad {
3030

3131
[self.view addSubview:self.label];
3232

33-
[Kmp_xlogLoggingKt initializeMarsXLogLevel:1 namePrefix:@"test" logToConsole:YES];
33+
[Kmp_xlogLoggingKt initializeMarsXLogLevel:1 namePrefix:@"test" debugLog:YES];
3434
[[Kmp_xlogLogging logging] infoTag:@"XXPXX" content:[NSString stringWithFormat:@"greeting from %@", [self getSystemVersion]]];
3535
[[Kmp_xlogLogging logging] errorTag:@"XXPXX" content:@"flush"];
3636
}

example/shared/build.gradle.kts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
2-
31
plugins {
42
alias(libs.plugins.kmp)
53

@@ -43,12 +41,6 @@ kotlin {
4341
}
4442
binaries.executable()
4543
}
46-
@OptIn(ExperimentalWasmDsl::class)
47-
wasmJs {
48-
browser {
49-
}
50-
binaries.executable()
51-
}
5244

5345
listOf(linuxX64(), mingwX64()).forEach {
5446
it.binaries {
@@ -77,11 +69,6 @@ kotlin {
7769
mingwX64Main {
7870
dependsOn(cppCommon)
7971
}
80-
wasmJsMain {
81-
dependencies {
82-
implementation(libs.kotlinx.browser)
83-
}
84-
}
8572
}
8673
}
8774

example/shared/src/jsMain/kotlin/com/piasy/kmp/xlog/example/Platform.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class JsPlatform : Platform {
1010
actual fun getPlatform(): Platform = JsPlatform()
1111

1212
fun main() {
13-
initializeConsoleLog()
13+
initializeConsoleLog(true)
1414

1515
document.getElementById("text")?.innerHTML = Greeting().greeting()
1616
}

example/shared/src/wasmJsMain/kotlin/com/piasy/kmp/xlog/example/Platform.kt

Lines changed: 0 additions & 13 deletions
This file was deleted.

example/shared/src/wasmJsMain/resources/index.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

gradle/libs.versions.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,22 @@ compileSdk = "35"
66
minSdk = "21"
77
targetSdk = "35"
88
agp = "8.7.3"
9-
kotlin = "2.1.0"
9+
kotlin = "2.1.10"
1010
mockk = "1.13.16"
11-
compose = "1.7.6"
12-
kotlinxBrowser = "0.3"
11+
compose = "1.7.8"
1312

1413
[libraries]
1514
kotlin-stdlib-js = { module = "org.jetbrains.kotlin:kotlin-stdlib-js", version.ref = "kotlin" }
1615
kotlinx-datetime = "org.jetbrains.kotlinx:kotlinx-datetime:0.6.1"
1716
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
1817
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
19-
kotlinx-browser = { module = "org.jetbrains.kotlinx:kotlinx-browser", version.ref = "kotlinxBrowser" }
2018
mockk = { module = "io.mockk:mockk", version.ref = "mockk" }
2119
androidx-compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
2220
androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
2321
androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
2422
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" }
2523
androidx-compose-material = { module = "androidx.compose.material:material", version.ref = "compose" }
26-
androidx-activity-compose = "androidx.activity:activity-compose:1.10.0"
24+
androidx-activity-compose = "androidx.activity:activity-compose:1.10.1"
2725

2826
[plugins]
2927
android-library = { id = "com.android.library", version.ref = "agp" }

kmp-xlog-api/build.gradle.kts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import com.vanniktech.maven.publish.SonatypeHost
2-
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
32

43
plugins {
54
alias(libs.plugins.kmp)
@@ -18,11 +17,10 @@ kotlin {
1817
macosArm64()
1918
macosX64()
2019

21-
@OptIn(ExperimentalWasmDsl::class)
22-
listOf(js(IR), wasmJs()).forEach {
23-
it.browser {
20+
js(IR) {
21+
browser {
2422
}
25-
it.binaries.executable()
23+
binaries.executable()
2624
}
2725

2826
linuxX64()

0 commit comments

Comments
 (0)