Blankj / Blankj/AndroidUtilCode

Busutils的一个小问题。或许不是bug

Open
#1,316 2 comments 0 reactions 1 assignee Claimed by @Blankj View on GitHub
bug
Dominant language
Java
Stars
33.6k
Forks
10.6k
PR merge metrics
No merged PRs in 30d

Description

## 描述 Bug

前提条件:项目中配置了多渠道(比如配置官方渠道和应用宝渠道)、dubug和release版本。打包会打4个包。
出错的地方:在打包的时候所有的渠道全部选择同时打包(如下图1),打包完成之后__bus__.json里面的内容会重复多行,然后bus接收的时候会收到多条消息

- AndroidUtilCode 的版本:utilcodex :1.29.0 com.blankj:bus-gradle-plugin:2.6

## 截图
图1
![image](https://user-images.githubusercontent.com/7905253/92198141-333f7500-eea6-11ea-9770-02b46172719b.png)

图2这是多个渠道一起打包之后的__bus__.json
![image](https://user-images.githubusercontent.com/7905253/92198774-dd6bcc80-eea7-11ea-90f3-9c1d398f5ab2.png)

图3 这是单个渠道打包的__bus__.json
![image](https://user-images.githubusercontent.com/7905253/92198900-36d3fb80-eea8-11ea-8f33-ebd0fe6f8416.png)

这个问题可能是Gradle打包引起的,可能不是个bug。暂时解决方案是多渠道打包时一个一个分开打包

附上Android Studio 和gradle信息
distributions/gradle-6.1.1-all.zip
com.android.tools.build:gradle:4.0.0
org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0

Android Studio 4.0.1
Build #AI-193.6911.18.40.6626763, built on June 25, 2020
Runtime version: 1.8.0_242-release-1644-b3-6222593 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.6
GC: ParNew, ConcurrentMarkSweep
Memory: 1981M
Cores: 8
Registry: ide.new.welcome.screen.force=true
Non-Bundled Plugins: org.jetbrains.kotlin, cn.yiiguxing.plugin.translate, com.google.services.firebase, com.wakatime.intellij.plugin, net.vektah.codeglance, wu.seal.tool.jsontokotlin

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.