Gradle execute tasks for one spe
2021-02-10 本文已影响0人
JaedenKil
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