Skip to content

Commit

Permalink
add to jcenter
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonXiao001 committed Nov 16, 2016
1 parent f907642 commit 19327c7
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 71 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.1'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
93 changes: 93 additions & 0 deletions easyplayerlib/bintray.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

group = PROJ_GROUP
version = PROJ_VERSION
project.archivesBaseName = PROJ_ARTIFACTID

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives javadocJar
archives sourcesJar

}

javadoc {
options{
encoding "UTF-8"
charSet 'UTF-8'
author true
version true
links "http://docs.oracle.com/javase/7/docs/api"
}
}

install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom.artifactId = PROJ_ARTIFACTID
pom {
project {
description PROJ_DESCRIPTION
packaging 'aar'
name PROJ_NAME
url PROJ_WEBSITEURL
licenses {
license {
name LICENSE_NAME
url LICENSE_URL
}
}
developers {
developer {
id DEVELOPER_ID
name DEVELOPER_NAME
email DEVELOPER_EMAIL
}
}
scm {
connection PROJ_VCSURL
developerConnection PROJ_VCSURL
url PROJ_WEBSITEURL
}
}
}
}
}

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")


configurations = ['published','archives']
publish = true

pkg {
repo = "maven"
name = PROJ_NAME
desc = PROJ_DESCRIPTION
websiteUrl = PROJ_WEBSITEURL
issueTrackerUrl = PROJ_ISSUETRACKERURL
vcsUrl = PROJ_VCSURL
licenses = ["Apache-2.0"]
publicDownloadNumbers = true
}
}
72 changes: 2 additions & 70 deletions easyplayerlib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
// This is the library version used when deploying the artifact
version = "1.0.0"


android {
compileSdkVersion 24
Expand Down Expand Up @@ -48,69 +45,4 @@ dependencies {
testCompile 'junit:junit:4.12'
}

def siteUrl = 'https://github.com/zhengxiaopeng/BounceProgressBar' // 项目的主页
def gitUrl = 'https://github.com/zhengxiaopeng/BounceProgressBar.git' // Git仓库的url
group = "org.rocko.bpb" // Maven Group ID for the artifact,一般填你唯一的包名
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
// Add your description here
name 'Android BounceProgressBar Widget' //项目描述
url siteUrl
// Set your license
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'zhengxiaopeng' //填写的一些基本信息
name 'Rocko'
email '[email protected]'
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives 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 = "BounceProgressBar" //发布到JCenter上的项目名字
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = ["Apache-2.0"]
publish = true
}
}
apply from: 'bintray.gradle'
17 changes: 17 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,20 @@ org.gradle.jvmargs=-Xmx1536m
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true


PROJ_GROUP=cn.jx
PROJ_VERSION=0.0.1
PROJ_NAME=EasyPlayer
PROJ_WEBSITEURL=https://github.com/JasonXiao001/easyPlayer
PROJ_ISSUETRACKERURL=https://github.com/JasonXiao001/easyPlayer/issues
PROJ_VCSURL=https://github.com/JasonXiao001/easyPlayer.git
PROJ_DESCRIPTION=Android player based on FFMpeg
PROJ_ARTIFACTID=easyplayerlib

LICENSE_NAME='The Apache Software License, Version 2.0'
LICENSE_URL='http://www.apache.org/licenses/LICENSE-2.0.txt'

DEVELOPER_ID=jasonxiao
DEVELOPER_NAME=jasonxiao
DEVELOPER_EMAIL=[email protected]

0 comments on commit 19327c7

Please sign in to comment.