Skip to content

Commit

Permalink
added bintray files
Browse files Browse the repository at this point in the history
  • Loading branch information
florent champigny committed Jul 17, 2017
1 parent d2e8c5b commit 05bc80a
Show file tree
Hide file tree
Showing 7 changed files with 221 additions and 13 deletions.
9 changes: 5 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
compileSdkVersion project.sdk
buildToolsVersion project.buildTools

defaultConfig {
minSdkVersion project.minSdk
targetSdkVersion project.sdk
applicationId "florent37.github.com.rxgraphql"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"

Expand Down
15 changes: 10 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
// 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:2.3.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
}
}

Expand All @@ -21,3 +18,11 @@ allprojects {
task clean(type: Delete) {
delete rootProject.buildDir
}

ext {
sdk = 25
buildTools = "25.0.0" //keep 25.0.0 for Continuous Integration
minSdk = 14
libraryVersion = "1.0.7"
supportVersion = "25.0.0"
}
5 changes: 5 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
deployment:
release:
tag: /v.*/
commands:
- ./gradlew :expectanim:bintrayUpload
64 changes: 64 additions & 0 deletions gradle/bintray-android-v1.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
apply plugin: 'com.jfrog.bintray'

version = libraryVersion

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
}

def _user = System.getenv("BINTRAY_USER")
def _key = System.getenv("BINTRAY_API_KEY")
def _passphrase = System.getenv("BINTRAY_PASSPHRASE")

if(project.rootProject.file('local.properties').exists() && (_user == null || _user.isEmpty())){
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

_user = properties.getProperty("bintray.user")
_key = properties.getProperty("bintray.apikey");
_passphrase = properties.getProperty("bintray.gpg.password")
}

// Bintray

bintray {
user = _user
key = _key

override = true
configurations = ['archives']
pkg {
repo = bintrayRepo
name = bintrayName
desc = libraryDescription
userOrg = orgName
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
publish = true
publicDownloadNumbers = true
version {
desc = libraryDescription
gpg {
sign = true //Determines whether to GPG sign the files. The default is false
passphrase = _passphrase
//Optional. The passphrase for GPG signing'
}
}
}
}
60 changes: 60 additions & 0 deletions gradle/bintray-java-v1.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
apply plugin: 'com.jfrog.bintray'

version = libraryVersion

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

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

// Bintray

def _user = System.getenv("BINTRAY_USER")
def _key = System.getenv("BINTRAY_API_KEY")
def _passphrase = System.getenv("BINTRAY_PASSPHRASE")

if(project.rootProject.file('local.properties').exists() && (_user == null || _user.isEmpty())){
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

_user = properties.getProperty("bintray.user")
_key = properties.getProperty("bintray.apikey");
_passphrase = properties.getProperty("bintray.gpg.password")
}

bintray {
user = _user
key = _key
override = true
configurations = ['archives']
pkg {
repo = bintrayRepo
name = bintrayName
desc = libraryDescription
userOrg = orgName
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = ['Apache-2.0']
publish = true
publicDownloadNumbers = true
version {
desc = libraryDescription
gpg {
sign = true //Determines whether to GPG sign the files. The default is false
passphrase = _passphrase
//Optional. The passphrase for GPG signing'
}
}
}
}

//from https://github.com/workarounds/bundler/blob/master/gradle/bintray-java-v1.gradle
44 changes: 44 additions & 0 deletions gradle/install-v1.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apply plugin: 'com.github.dcendents.android-maven'

group = publishedGroupId // Maven Group ID for the artifact

install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
groupId publishedGroupId
artifactId artifact

// Add your description here
name libraryName
description libraryDescription
url siteUrl

// Set your license
licenses {
license {
name licenseName
url licenseUrl
}
}
developers {
developer {
id developerId
name developerName
email developerEmail
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl

}
}
}
}
}

//from https://github.com/workarounds/bundler/blob/master/gradle/install-v1.gradle
37 changes: 33 additions & 4 deletions okgraphql/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
compileSdkVersion project.sdk
buildToolsVersion project.buildTools

defaultConfig {
minSdkVersion 15
targetSdkVersion 25
minSdkVersion project.minSdk
targetSdkVersion project.sdk
versionCode 1
versionName "1.0"
}
Expand All @@ -18,3 +18,32 @@ dependencies {
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.github.florent37:android-nosql:1.0.0'
}


ext {
bintrayRepo = 'maven'
bintrayName = 'ExpectAnim'
orgName = 'florent37'

publishedGroupId = 'com.github.florent37'
libraryName = 'OkGraphQl'
artifact = 'okgraphql'

libraryDescription = 'OkGraphQl'

siteUrl = 'https://github.com/florent37/OkGraphQl'
gitUrl = 'https://github.com/florent37/OkGraphQl.git'

libraryVersion = rootProject.ext.libraryVersion

developerId = 'florent37'
developerName = 'Florent Champigny'
developerEmail = '[email protected]'

licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}

apply from: rootProject.file('gradle/install-v1.gradle')
apply from: rootProject.file('gradle/bintray-android-v1.gradle')

0 comments on commit 05bc80a

Please sign in to comment.