Currently there are multiple modules in one project, and the scenario is: There are two modules both contain the gradle task uploadArchives
:
uploadArchives {
configuration = configurations.archives
repositories {
mavenDeployer {
repository(url: 'http://xxx/repository/AndroidTestMethods/') {
authentication(userName: 'username', password: 'password')
}
pom.project {
//Make sure to update version and execute gradle task to upload lib to Nexus repo manager
version "$commonVersionName"
artifactId "$artifactId"
groupId 'com.yyy.jk'
packaging 'aar'
description 'library'
}
}
}
}
Project-level settings.gradle
file:
include ':common-permission-handler'
include ':common-utils'
So if I need to execute this gradle task in the module common-permission-handler
:
./gradlew common-permission-handler:uploadArchives
// ./gradlew moduleName:taskName
网友评论