Skip to content

Latest commit

 

History

History
72 lines (52 loc) · 1.73 KB

README.md

File metadata and controls

72 lines (52 loc) · 1.73 KB

[TOC]

Nexus 使用指南

使用私有仓库

gradle 使用私有仓库

要求

设置私有仓库

在Android Studio 工程的根目录build.gradle文件中配置

allprojects {
    repositories {
        jcenter()
        maven {
            url 'http://yournexus:port/nexus/content/repositories/android-releases/'
        }
    }
}

或者在需要使用的modulebuild.gradle中配置

    repositories {
        maven {
            url 'http://yournexus:port/nexus/content/repositories/android-releases/'
        }
    }

module 使用依赖

在module的 build.gradle 文件中使用

dependencies {
    // jar at taget version
    compile group: 'com.your.package', name: 'pacakge', version: '1.0.0'
    // aar at taget version
    compile group: 'com.your.package', name: 'pacakge', version: '1.0.1@aar'
    // last version with aar
    compile group: 'com.your.package', name: 'pacakge', version: 'latest.integration@aar'
}

发布推送

使用详情请点击

发布插件地址

// uploadArchives only jarLib
apply from: "https://github.com/sinlov/Gradle_Zoo/raw/master/nexus/nexus-publish-only-jarLib.gradle"

// uploadArchives without javadoc and Sources
apply from: "https://github.com/sinlov/Gradle_Zoo/raw/master/nexus/nexus-publish-no-doc-sources.gradle"

// uploadArchives without javadoc
apply from: "https://github.com/sinlov/Gradle_Zoo/raw/master/nexus/nexus-publish-no-javadoc.gradle"

// uploadArchives all
apply from: "https://github.com/sinlov/Gradle_Zoo/raw/master/nexus/nexus-publish-all.gradle"