美文网首页
Android 发布到阿里云私服

Android 发布到阿里云私服

作者: proud2008 | 来源:发表于2020-04-27 12:52 被阅读0次

    参考
    阿里云私服地址

    注册好后查看用户名密码


    查看username password

    maven上传脚本

    //maven_aliyun.gradle
    apply plugin: 'maven' //发布到maven 库中的插件
    
    ext {
        URL_RELEASE = "****"
        URL_SNAPSHOT = "****"
        URL_LOCAL = "file://E:/repository"
        URL_TYPE = 1 /*0本地路径 1 SNAPSHOT 2 RELEASE*/
        USER = "****"
        PASSWORD = "****"
        GROUPID = "****"
        ARTIFACTID = "****"
        VERSION = "1.0"
    }
    uploadArchives {
        repositories {
            mavenDeployer {
                repository(url: URL_TYPE == 0 ? URL_LOCAL : (URL_TYPE == 1 ? URL_SNAPSHOT : URL_RELEASE)) {
                    authentication(userName:USER , password: PASSWORD )
                }
                pom.project {
                    version VERSION
                    artifactId ARTIFACTID
                    groupId GROUPID
                    packaging 'aar'
                    description "****"
                }
            }
        }
    }
    
    

    在模块项目的build.gradle下添加
    apply from: 'maven_aliyun.gradle'

    在其任下


    image.png

    执行后即可打包

    相关文章

      网友评论

          本文标题:Android 发布到阿里云私服

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