@@ -34,10 +34,17 @@ kotlin {
3434 jvmToolchain(17 )
3535 androidTarget { publishLibraryVariants(" release" ) }
3636 jvm()
37+ js {
38+ browser()
39+ binaries.executable()
40+ }
41+
42+ @OptIn(ExperimentalWasmDsl ::class )
3743 wasmJs {
3844 browser()
3945 binaries.executable()
4046 }
47+
4148 iosX64()
4249 iosArm64()
4350 iosSimulatorArm64()
@@ -81,6 +88,7 @@ kotlin {
8188 implementation(libs.androidx.media3.exoplayer)
8289 implementation(libs.androidx.media3.ui)
8390 implementation(libs.androidx.activityCompose)
91+ implementation(libs.androidx.core)
8492 }
8593
8694 androidUnitTest.dependencies {
@@ -111,8 +119,10 @@ kotlin {
111119 implementation(libs.kotlinx.coroutines.test)
112120 }
113121
114- wasmJsMain.dependencies {
115- implementation(libs.kotlinx.browser.wasm.js)
122+ webMain.dependencies {
123+ implementation(libs.kotlinx.browser)
124+ implementation(compose.ui)
125+
116126 }
117127
118128 wasmJsTest.dependencies {
@@ -138,28 +148,32 @@ android {
138148 compileSdk = 36
139149
140150 defaultConfig {
141- minSdk = 21
151+ minSdk = 23
142152 }
143153}
144154
145155val buildMacArm: TaskProvider <Exec > = tasks.register<Exec >(" buildNativeMacArm" ) {
146156 onlyIf { System .getProperty(" os.name" ).startsWith(" Mac" ) }
147157 workingDir(rootDir)
148- commandLine(" swiftc" , " -emit-library" , " -emit-module" , " -module-name" , " NativeVideoPlayer" ,
158+ commandLine(
159+ " swiftc" , " -emit-library" , " -emit-module" , " -module-name" , " NativeVideoPlayer" ,
149160 " -target" , " arm64-apple-macosx14.0" ,
150161 " -o" , " mediaplayer/src/jvmMain/resources/darwin-aarch64/libNativeVideoPlayer.dylib" ,
151162 " mediaplayer/src/jvmMain/kotlin/io/github/kdroidfilter/composemediaplayer/mac/native/NativeVideoPlayer.swift" ,
152- " -O" , " -whole-module-optimization" )
163+ " -O" , " -whole-module-optimization"
164+ )
153165}
154166
155167val buildMacX64: TaskProvider <Exec > = tasks.register<Exec >(" buildNativeMacX64" ) {
156168 onlyIf { System .getProperty(" os.name" ).startsWith(" Mac" ) }
157169 workingDir(rootDir)
158- commandLine(" swiftc" , " -emit-library" , " -emit-module" , " -module-name" , " NativeVideoPlayer" ,
170+ commandLine(
171+ " swiftc" , " -emit-library" , " -emit-module" , " -module-name" , " NativeVideoPlayer" ,
159172 " -target" , " x86_64-apple-macosx14.0" ,
160173 " -o" , " mediaplayer/src/jvmMain/resources/darwin-x86-64/libNativeVideoPlayer.dylib" ,
161174 " mediaplayer/src/jvmMain/kotlin/io/github/kdroidfilter/composemediaplayer/mac/native/NativeVideoPlayer.swift" ,
162- " -O" , " -whole-module-optimization" )
175+ " -O" , " -whole-module-optimization"
176+ )
163177}
164178
165179val buildWin: TaskProvider <Exec > = tasks.register<Exec >(" buildNativeWin" ) {
0 commit comments