Skip to content

Commit

Permalink
[DEV] Enable Bintray upload
Browse files Browse the repository at this point in the history
  • Loading branch information
djavan-bertrand committed Aug 10, 2016
1 parent db626b2 commit d904e51
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 1 deletion.
93 changes: 93 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'

classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand All @@ -15,4 +18,94 @@ allprojects {
repositories {
jcenter()
}
}

subprojects { proj ->

if (proj.name != "example")
{
proj.afterEvaluate {

proj.apply plugin: 'com.github.dcendents.android-maven'
proj.apply plugin: 'com.jfrog.bintray'

def gitUrl = "https://github.com/djavan-bertrand/JCVD"

proj.install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'

// Add your description here
name 'JCVD library: an Awareness API helper'

// Set your license
licenses {
license {
name 'MIT'
url 'https://github.com/djavan-bertrand/JCVD/LICENSE'
}
}
developers {
developer {
id 'Sousoum'
name 'SousoumProd'
email '[email protected]'
}
}
scm {
connection gitUrl
developerConnection gitUrl

}
}
}
}
}

proj.bintray {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
user = properties.getProperty('bintray.user')
key = properties.getProperty('bintray.apikey')
pkg {
repo = 'maven'
name = "com.sousoum:jcvd"

licenses = ['MIT']
vcsUrl = gitUrl
version {
name = rootProject.version
desc = 'JCVD library: an Awareness API helper'
vcsTag = rootProject.releaseTag
}
}
configurations = ['archives']
}

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

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

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

artifacts {
archives generateJavadocsJar
archives generateSourcesJar
}
}
}
}
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@
# When configured, Gradle will run in incubating parallel mode.
# 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
# org.gradle.parallel=true
group=com.sousoum
version=0.0.1
releaseTag=version_0_0_1

0 comments on commit d904e51

Please sign in to comment.