我在build.gradle
如下:如何告诉gradle在SNAPSHOT发行版上执行uploadArchives?
uploadArchives {
repositories {
mavenDeployer {
configuration = configurations.deployerJars
String keyFile = "/Users/myusername/.ssh/[email protected]"
repository(url: "scp://myhost.com/var/maven/repository") {
authentication(userName: "maven", privateKey: keyFile)
}
}
}
}
这个伟大的工程 - 有一点需要注意:它仅上传发布版本。我知道我可以指定snapshotRepository
来让它上传快照,但我真正想要的是知道如何调用此行为。我想我的快照转到相同的回购协议的发行版本(我认为这是默认的行为),但是当我做:
./gradlew uploadArchives
或./gradlew assembleDebug uploadArchives
它首先构建release
buildType,并上载这个。我怎么能告诉uploadArchives
我希望它上传快照构建(即调试)?