为特定工件发布创建gradle任务

时间:2019-02-26 17:18:11

标签: android gradle android-gradle artifactory

到目前为止,这是我的伪造品:

artifactory {
  contextUrl = 'http://artifactory.mine.com/artifactory'
  publish {
      repository {
        repoKey = 'libs-release-local'

        if (System.getenv()["CI"]) {
            username = System.getenv("artifactory_username")
            password = System.getenv("artifactory_password")
        } else {
            username = "${artifactory_username}"
            password = "${artifactory_password}"
        }
      }
      defaults {
        publications('aarDebug', 'aarSnapshot')
        publishArtifacts = true

        properties = ['qa.level': 'basic', 'q.os': 'android', 'dev.team': 'core']
        publishPom = true
      }
   }
}

如您所见,我有2个出版物:“ aarDebug”和“ aarSnapshot”。 是否可以创建两个gradle任务-每个出版物一个?像artifactoryPublishDebugartifactoryPublishSnapshot之类的东西。

0 个答案:

没有答案