diff --git a/gradle.properties b/gradle.properties index b799c82..0efdcc8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ kotlin.code.style=official kotlin.js.compiler=ir -kotlin.js.ir.output.granularity=per-file +#kotlin.js.ir.output.granularity=per-file org.gradle.jvmargs=-Dfile.encoding=utf-8 diff --git a/simbot-component-miyoushe-villa-api/build.gradle.kts b/simbot-component-miyoushe-villa-api/build.gradle.kts index da35c60..582486f 100644 --- a/simbot-component-miyoushe-villa-api/build.gradle.kts +++ b/simbot-component-miyoushe-villa-api/build.gradle.kts @@ -8,6 +8,7 @@ plugins { `miyoushe-multiplatform-maven-publish` kotlin("plugin.serialization") `miyoushe-dokka-partial-configure` + `simbot-miyoushe-suspend-transform` } setup(P) @@ -53,13 +54,11 @@ kotlin { js(IR) { useEsModules() nodejs() - generateTypeScriptDefinitions() + //generateTypeScriptDefinitions() binaries.library() compilations.all { // Enables ES6 classes generation kotlinOptions { - suppressWarnings - freeCompilerArgs = freeCompilerArgs + listOf("-Xsuppress:NON_EXPORTABLE_TYPE") useEsClasses = true } } @@ -122,6 +121,7 @@ kotlin { dependencies { api(simbotAnnotations) api(libs.ktor.client.js) + implementation("love.forte.plugin.suspend-transform:suspend-transform-annotation:${suspendTransform.annotationDependencyVersion}") } } jsTest { diff --git a/simbot-component-miyoushe-villa-api/src/commonMain/kotlin/love/forte/simbot/miyoushe/api/image/MiyousheVillaOSS.kt b/simbot-component-miyoushe-villa-api/src/commonMain/kotlin/love/forte/simbot/miyoushe/api/image/MiyousheVillaOSS.kt index b044df1..eb3fc90 100644 --- a/simbot-component-miyoushe-villa-api/src/commonMain/kotlin/love/forte/simbot/miyoushe/api/image/MiyousheVillaOSS.kt +++ b/simbot-component-miyoushe-villa-api/src/commonMain/kotlin/love/forte/simbot/miyoushe/api/image/MiyousheVillaOSS.kt @@ -164,5 +164,5 @@ public suspend fun uploadToOssData( ext: String, decoder: Json = MiyousheVilla.DefaultJson ): OSSResponse { - return uploadToOssResult(client, token, data, ext).dataIfSuccess + return uploadToOssResult(client, token, data, ext, decoder).dataIfSuccess } diff --git a/simbot-component-miyoushe-villa-stdlib/build.gradle.kts b/simbot-component-miyoushe-villa-stdlib/build.gradle.kts index 42c5bd9..1c51d18 100644 --- a/simbot-component-miyoushe-villa-stdlib/build.gradle.kts +++ b/simbot-component-miyoushe-villa-stdlib/build.gradle.kts @@ -54,13 +54,11 @@ kotlin { js(IR) { useEsModules() nodejs() - generateTypeScriptDefinitions() + //generateTypeScriptDefinitions() binaries.library() compilations.all { // Enables ES6 classes generation kotlinOptions { - suppressWarnings - freeCompilerArgs = freeCompilerArgs + listOf("-Xsuppress:NON_EXPORTABLE_TYPE") useEsClasses = true } } @@ -123,6 +121,7 @@ kotlin { dependencies { api(simbotAnnotations) api(libs.ktor.client.js) + implementation("love.forte.plugin.suspend-transform:suspend-transform-annotation:${suspendTransform.annotationDependencyVersion}") } } jsTest {