android gradle 上传module aar 至nexus

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/a13069730106/article/details/54585280

前言

这里主要介绍一个android studio怎么使用gradle把自已写的一些module以aar包的方式上传到公司内部的nexus私服中。这样就即可以方便的进行代码复用,也可以保证代码的安全性,这样在使用时,就可以分出一个人来单独维护这个module.

详细配置

以下是gradle的详细配置,相对来说还是比较简单的。有点基础的应该都能看懂,这里就不详细介绍了。

// 在gradle的第一行加
apply plugin: 'maven'


uploadArchives {
    repositories {
        mavenDeployer {

            repository(url: "http://mynexus.com:8081/nexus/content/repositories/android") {
                authentication(userName: "admin", password: "admin123")
            }
            pom.version = "1.0.0"
            pom.artifactId = "tools"
            pom.groupId = "com.android.library"
            pom.name = "tools"
            pom.packaging = 'aar'
        }
    }
}

猜你喜欢

转载自blog.csdn.net/a13069730106/article/details/54585280
今日推荐