Skip to content

Commit

Permalink
add settings for bintray
Browse files Browse the repository at this point in the history
  • Loading branch information
jobot0 committed Jan 13, 2017
1 parent f1e88d3 commit bf3e4b4
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -23,3 +23,5 @@ before_install:

install: true

after_success:
- ./deploy.sh
5 changes: 4 additions & 1 deletion build.gradle
Expand Up @@ -6,7 +6,8 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'

classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand All @@ -16,6 +17,8 @@ allprojects {
repositories {
jcenter()
}
apply plugin: 'maven'
apply plugin: 'maven-publish'
}


Expand Down
5 changes: 5 additions & 0 deletions deploy.sh
@@ -0,0 +1,5 @@
#!/bin/bash
if [ "$TRAVIS_BRANCH" == "master" ]; then
echo $TRAVIS_BRANCH;
./gradlew install bintrayUpload;
fi
104 changes: 103 additions & 1 deletion trustkit/build.gradle
@@ -1,10 +1,30 @@

apply plugin: 'com.android.library'

ext {
userorg = ""
bintrayRepo = 'TrustKit-Android'
bintrayName = 'trustkit'

publishedGroupId = 'com.datatheorem.android.trustkit'
libraryName = 'TrustKit-Android'
artifact = 'trustkit'

libraryDescription = 'TrustKit Android is an open source library that makes it easy to deploy SSL public key ' +
'pinning and reporting in any Android App.'
gitUrl = 'https://github.com/datatheorem/TrustKit-Android'
websiteUrl = 'https://github.com/datatheorem/TrustKit-Android'

libraryVersion = trustkitVersionName

licenseName = 'The MIT License (MIT)'
licenseUrl = 'https://github.com/datatheorem/TrustKit-Android/blob/master/LICENSE'
allLicenses = ["MIT"]
}

repositories {
mavenCentral()
}

dependencies {
compile "com.android.support:support-annotations:$rootProject.libVersions.android.appCompat"
compile "com.android.support:support-v4:$rootProject.libVersions.android.appCompat"
Expand All @@ -30,3 +50,85 @@ android {
}
}


apply plugin: 'com.github.dcendents.android-maven'
group = publishedGroupId

install {
repositories.mavenInstaller {
pom {
project {
packaging 'aar'
groupId publishedGroupId
artifactId artifact

name libraryName
description libraryDescription
url websiteUrl

licenses {
license {
name licenseName
url licenseUrl
}
}

developers {
developer {
id 'nabla-c0d3'
name 'Alban Diquet'
email 'ad@datatheorem.com'
}

developer {
id 'jobot0'
name 'Jordan Bouellat'
email 'jb@datatheorem.com'
}
}

scm {
connection gitUrl
developerConnection gitUrl
url websiteUrl
}
}
}
}
}

apply plugin: 'com.jfrog.bintray'

version = libraryVersion
// Create artifacts from the source
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}

artifacts {
archives sourcesJar
}

bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
userorg = System.getenv('BINTRAY_USERORG')

configurations = ['archives']
pkg {
repo = bintrayRepo
name = bintrayName
userOrg = userorg
desc = libraryDescription
websiteUrl = websiteUrl
vcsUrl = gitUrl
licenses = allLicenses
publish = true
version {
name = libraryVersion
desc = libraryDescription
}
}
}

0 comments on commit bf3e4b4

Please sign in to comment.