diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f740ae9..b5b9487d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 5.7.0 +* 修复debug_logging在Android端不生效的问题 +* Fix #716 + # 5.6.0 * Android和iOS支持Emoj分享 * 文档完善 @@ -6,7 +10,6 @@ * 鸿蒙SDK升级到1.0.14 * 鸿蒙端支持分享视频 - # 5.5.4 * 分享到小程序时,增加scene字段,尽管微信只支持分享小程序到会话. diff --git a/android/build.gradle b/android/build.gradle index c98e181a..f7f48a0b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -78,9 +78,19 @@ android { } Map loadPubspec() { + File pubspecFile def yamlDir = rootProject.hasProperty('yamlDir') ? rootProject.ext.yamlDir : '' - def path = rootProject.projectDir.parent + File.separator +yamlDir +"pubspec.yaml" - InputStream input = new FileInputStream(new File(path)) + def pubspecPath = rootProject.projectDir.parent + File.separator +yamlDir +"pubspec.yaml" + if(file(pubspecPath).exists()) { + pubspecFile = new File(pubspecPath) + } else { + def currentGradleFileDir = file(".").absolutePath // 当前 build.gradle 所在目录 + def parentDir = new File(currentGradleFileDir).getParentFile() // 获取父目录 + pubspecFile = new File(parentDir, "pubspec.yaml") // 构建 pubspec.yaml 路径 + } + + + InputStream input = new FileInputStream(pubspecFile) Yaml yaml = new Yaml() Map projectConfig = yaml.load(input) @@ -88,6 +98,7 @@ Map loadPubspec() { } + tasks.register("generateFluwxHelperFile") { doFirst { Map config = loadPubspec() @@ -100,7 +111,7 @@ tasks.register("generateFluwxHelperFile") { if (android) { def iwr = android.get("interrupt_wx_request") if (iwr && iwr == "true" || iwr == "false") { - interruptWeChatRequestByFluwx = (String) iwr + interruptWeChatRequestByFluwx = (String) } def activity = android.get("flutter_activity") @@ -110,8 +121,8 @@ tasks.register("generateFluwxHelperFile") { } def logging = fluwx.get("debug_logging") - if (logging && logging == "true" || logging == "false") { - enableLogging = (String) logging + if ("${logging}" == "true" || "${logging}" == "false") { + enableLogging = "${logging}" } } diff --git a/pubspec.yaml b/pubspec.yaml index ff74f397..05b8f7d4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: fluwx description: The capability of implementing WeChat SDKs in Flutter. With Fluwx, developers can use WeChatSDK easily, such as sharing, payment, lanuch mini program and etc. -version: 5.6.0 +version: 5.7.0 homepage: https://github.com/OpenFlutter/fluwx environment: