Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

Add flavorMapChannel way to pack #106

Closed
wants to merge 1 commit into from
Closed

Conversation

Justson
Copy link

@Justson Justson commented Nov 18, 2017

新增了flavorMapChannel打包方式。

flavorMapChannel 打包结果和channelMap是一样的 。
虽然多个 flavor 打包需求少 , 但是遇上多flavor , 少channel的时候 ,channelMap 那么就需要建立多个 channels 文件 ,flavorMapChannel 允许在 gradle 里面指定 channel list 解决了该问题。

# header note.
#Sun Nov 19 00:58:53 CST 2017
ndk.dir=/Users/cenxiaozhong/Library/Android/sdk/ndk-bundle
sdk.dir=/Users/cenxiaozhong/Library/Android/sdk
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个文件不要提交上来

// snapshotRepository(url: getSnapshotRepositoryUrl()) {
// authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
// }
repository(url: uri('../tmp/repo/'))

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个文件部署用的,不能改动

repositories {
maven { url '/tmp/repo/' }
maven { url '../tmp/repo/' }
jcenter()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还有这里

@mcxiaoke
Copy link
Owner

@Justson 如果多个flavor的channels是一样的,不用多个文件,可以这样写:

    channelMap = [
            "free" : project.rootProject.file("channels.txt"),
            "paid" : project.rootProject.file("channels.txt"),
            "other": project.rootProject.file("channels.txt")
    ]

@Justson
Copy link
Author

Justson commented Nov 21, 2017

@mcxiaoke 是的 ,flavorMapChannel 是针对少些情况做了优化 ,我也是 clone 仓库下来 , 才发现库满足不了 , 相同 channels 没必要用 flavorMapChannelflavorMapChannel 是针对少量 channel 更便捷和灵活些 。

@mcxiaoke
Copy link
Owner

mcxiaoke commented Feb 2, 2018

冲突,重新提吧

@mcxiaoke mcxiaoke closed this Feb 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants