Skip to content

Commit 9258ac9

Browse files
JarvanMoJarvan Zhang
andauthored
Bugfix (#717)
Co-authored-by: Jarvan Zhang <[email protected]>
1 parent ebd9548 commit 9258ac9

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 5.7.0
2+
* 修复debug_logging在Android端不生效的问题
3+
* Fix #716
4+
15
# 5.6.0
26
* Android和iOS支持Emoj分享
37
* 文档完善
@@ -6,7 +10,6 @@
610
* 鸿蒙SDK升级到1.0.14
711
* 鸿蒙端支持分享视频
812

9-
1013
# 5.5.4
1114
* 分享到小程序时,增加scene字段,尽管微信只支持分享小程序到会话.
1215

android/build.gradle

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,27 @@ android {
7878
}
7979

8080
Map loadPubspec() {
81+
File pubspecFile
8182
def yamlDir = rootProject.hasProperty('yamlDir') ? rootProject.ext.yamlDir : ''
82-
def path = rootProject.projectDir.parent + File.separator +yamlDir +"pubspec.yaml"
83-
InputStream input = new FileInputStream(new File(path))
83+
def pubspecPath = rootProject.projectDir.parent + File.separator +yamlDir +"pubspec.yaml"
84+
if(file(pubspecPath).exists()) {
85+
pubspecFile = new File(pubspecPath)
86+
} else {
87+
def currentGradleFileDir = file(".").absolutePath // 当前 build.gradle 所在目录
88+
def parentDir = new File(currentGradleFileDir).getParentFile() // 获取父目录
89+
pubspecFile = new File(parentDir, "pubspec.yaml") // 构建 pubspec.yaml 路径
90+
}
91+
92+
93+
InputStream input = new FileInputStream(pubspecFile)
8494
Yaml yaml = new Yaml()
8595
Map projectConfig = yaml.load(input)
8696

8797
return projectConfig
8898
}
8999

90100

101+
91102
tasks.register("generateFluwxHelperFile") {
92103
doFirst {
93104
Map config = loadPubspec()
@@ -100,7 +111,7 @@ tasks.register("generateFluwxHelperFile") {
100111
if (android) {
101112
def iwr = android.get("interrupt_wx_request")
102113
if (iwr && iwr == "true" || iwr == "false") {
103-
interruptWeChatRequestByFluwx = (String) iwr
114+
interruptWeChatRequestByFluwx = (String)
104115
}
105116

106117
def activity = android.get("flutter_activity")
@@ -110,8 +121,8 @@ tasks.register("generateFluwxHelperFile") {
110121
}
111122

112123
def logging = fluwx.get("debug_logging")
113-
if (logging && logging == "true" || logging == "false") {
114-
enableLogging = (String) logging
124+
if ("${logging}" == "true" || "${logging}" == "false") {
125+
enableLogging = "${logging}"
115126
}
116127
}
117128

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: fluwx
22
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.
3-
version: 5.6.0
3+
version: 5.7.0
44
homepage: https://github.com/OpenFlutter/fluwx
55

66
environment:

0 commit comments

Comments
 (0)