美文网首页Android
Gradle execute tasks for one spe

Gradle execute tasks for one spe

作者: JaedenKil | 来源:发表于2021-02-10 15:22 被阅读0次

    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
    

    相关文章

      网友评论

        本文标题:Gradle execute tasks for one spe

        本文链接:https://www.haomeiwen.com/subject/nwkkxltx.html