From 5f27bf370a5ce10f74f2974060e28c59e10864bf Mon Sep 17 00:00:00 2001 From: ForteScarlet Date: Sun, 31 Dec 2023 23:38:27 +0800 Subject: [PATCH] For publish release --- gradle.properties | 2 +- simbot-component-miyoushe-villa-api/build.gradle.kts | 6 +++--- .../forte/simbot/miyoushe/api/image/MiyousheVillaOSS.kt | 2 +- simbot-component-miyoushe-villa-stdlib/build.gradle.kts | 5 ++--- 4 files changed, 7 insertions(+), 8 deletions(-) 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 {