带有Gradle的Distribution Fabric beta apk

时间:2019-02-08 11:31:32

标签: android gradle google-fabric

我的自定义构建任务遇到了问题。我这样运行脚本任务

gradle buildDevelopAndPostToFabric --releaseNotes="Test Release Notes"

但是发行说明和beta组都没有出现在我的Fabric帐户中。

我从here提取的Gradle的结构变量

def app_name = 'My app'
def BETA_GROUP = "beta_publish"


def beforePublish() {
    ext.betaDistributionGroupAliases = "Android testers"
    ext.betaDistributionNotifications = true
}

slack {
    url 'SLACK_URL'
    dependsOnTasks 'buildRCAndPostToFabric', 'buildReleaseAndPostToFabric', 'buildDevelopAndPostToFabric'
    title app_name
}

import org.gradle.api.tasks.options.Option

class Note extends DefaultTask {
    @Option(option = "releaseNotes", description = "Release notes for build")
    String releaseNotes

    @TaskAction
    void setReleaseNotes() {
        ext.betaDistributionReleaseNotes = releaseNotes
    }
}

task buildRCAndPostToFabric(type: Note) {
    group = BETA_GROUP
    doFirst {
        beforePublish()
    }
    dependsOn 'cleanBuildCache'
    dependsOn 'assembleRc'
    finalizedBy 'crashlyticsUploadDistributionProductionRc'
}

0 个答案:

没有答案