标签:




// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript {repositories {jcenter()}dependencies {classpath ‘com.android.tools.build:gradle:1.1.2‘classpath ‘com.github.dcendents:android-maven-plugin:1.2‘classpath ‘com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0‘// NOTE: Do not place your application dependencies here; they belong// in the individual module build.gradle files}}allprojects {repositories {jcenter()}}
apply plugin: ‘com.github.dcendents.android-maven‘apply plugin: ‘com.jfrog.bintray‘
def siteUrl = ‘https://github.com/linwoain/lin_library‘ // 项目的主页def gitUrl = ‘https://github.com/linwoain/lin_library.git‘ // Git仓库的urlgroup = "com.linwoain.library"// 项目的包名install {repositories.mavenInstaller {pom {project {packaging ‘aar‘name ‘Android Utils‘ //项目描述url siteUrllicenses {license {name ‘The Apache Software License, Version 2.0‘url ‘http://www.apache.org/licenses/LICENSE-2.0.txt‘}}developers {developer {id ‘linwoain‘ //填写的一些基本信息name ‘linwoain‘email ‘lin@linwoain.com‘}}scm {connection gitUrldeveloperConnection gitUrlurl siteUrl}}}}}task sourcesJar(type: Jar) {from android.sourceSets.main.java.srcDirsclassifier = ‘sources‘}task javadoc(type: Javadoc) {options.encoding = ‘UTF-8‘source = android.sourceSets.main.java.srcDirsclasspath += project.files(android.getBootClasspath().join(File.pathSeparator))}task javadocJar(type: Jar, dependsOn: javadoc) {classifier = ‘javadoc‘from javadoc.destinationDir}artifacts {archives javadocJararchives sourcesJar}Properties properties = new Properties()properties.load(project.rootProject.file(‘local.properties‘).newDataInputStream())bintray {user = properties.getProperty("bintray.user")key = properties.getProperty("bintray.apikey")configurations = [‘archives‘]pkg {repo = "maven"name = "Lin_library" //发布到JCenter上的项目名字websiteUrl = siteUrlvcsUrl = gitUrllicenses = ["Apache-2.0"]publish = true}}


点击include my package 查询到自己提交的包。点击后提交comment。然后等待通过即可。若未通过会发信息提示你。标签:
原文地址:http://www.cnblogs.com/linwoain/p/020a276b5754645bb2bd58101a6beb3b.html