Skip to content

Commit bf3e4b4

Browse files
author
jobot0
committed
add settings for bintray
1 parent f1e88d3 commit bf3e4b4

File tree

4 files changed

+114
-2
lines changed

4 files changed

+114
-2
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ before_install:
2323

2424
install: true
2525

26+
after_success:
27+
- ./deploy.sh

build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ buildscript {
66
}
77
dependencies {
88
classpath 'com.android.tools.build:gradle:2.2.3'
9-
9+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
10+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
1011
// NOTE: Do not place your application dependencies here; they belong
1112
// in the individual module build.gradle files
1213
}
@@ -16,6 +17,8 @@ allprojects {
1617
repositories {
1718
jcenter()
1819
}
20+
apply plugin: 'maven'
21+
apply plugin: 'maven-publish'
1922
}
2023

2124

deploy.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
if [ "$TRAVIS_BRANCH" == "master" ]; then
3+
echo $TRAVIS_BRANCH;
4+
./gradlew install bintrayUpload;
5+
fi

trustkit/build.gradle

Lines changed: 103 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,30 @@
11

22
apply plugin: 'com.android.library'
33

4+
ext {
5+
userorg = ""
6+
bintrayRepo = 'TrustKit-Android'
7+
bintrayName = 'trustkit'
8+
9+
publishedGroupId = 'com.datatheorem.android.trustkit'
10+
libraryName = 'TrustKit-Android'
11+
artifact = 'trustkit'
12+
13+
libraryDescription = 'TrustKit Android is an open source library that makes it easy to deploy SSL public key ' +
14+
'pinning and reporting in any Android App.'
15+
gitUrl = 'https://github.com/datatheorem/TrustKit-Android'
16+
websiteUrl = 'https://github.com/datatheorem/TrustKit-Android'
17+
18+
libraryVersion = trustkitVersionName
19+
20+
licenseName = 'The MIT License (MIT)'
21+
licenseUrl = 'https://github.com/datatheorem/TrustKit-Android/blob/master/LICENSE'
22+
allLicenses = ["MIT"]
23+
}
24+
425
repositories {
526
mavenCentral()
627
}
7-
828
dependencies {
929
compile "com.android.support:support-annotations:$rootProject.libVersions.android.appCompat"
1030
compile "com.android.support:support-v4:$rootProject.libVersions.android.appCompat"
@@ -30,3 +50,85 @@ android {
3050
}
3151
}
3252

53+
54+
apply plugin: 'com.github.dcendents.android-maven'
55+
group = publishedGroupId
56+
57+
install {
58+
repositories.mavenInstaller {
59+
pom {
60+
project {
61+
packaging 'aar'
62+
groupId publishedGroupId
63+
artifactId artifact
64+
65+
name libraryName
66+
description libraryDescription
67+
url websiteUrl
68+
69+
licenses {
70+
license {
71+
name licenseName
72+
url licenseUrl
73+
}
74+
}
75+
76+
developers {
77+
developer {
78+
id 'nabla-c0d3'
79+
name 'Alban Diquet'
80+
81+
}
82+
83+
developer {
84+
id 'jobot0'
85+
name 'Jordan Bouellat'
86+
87+
}
88+
}
89+
90+
scm {
91+
connection gitUrl
92+
developerConnection gitUrl
93+
url websiteUrl
94+
}
95+
}
96+
}
97+
}
98+
}
99+
100+
apply plugin: 'com.jfrog.bintray'
101+
102+
version = libraryVersion
103+
// Create artifacts from the source
104+
task sourcesJar(type: Jar) {
105+
classifier = 'sources'
106+
from android.sourceSets.main.java.srcDirs
107+
}
108+
109+
artifacts {
110+
archives sourcesJar
111+
}
112+
113+
bintray {
114+
user = System.getenv('BINTRAY_USER')
115+
key = System.getenv('BINTRAY_KEY')
116+
userorg = System.getenv('BINTRAY_USERORG')
117+
118+
configurations = ['archives']
119+
pkg {
120+
repo = bintrayRepo
121+
name = bintrayName
122+
userOrg = userorg
123+
desc = libraryDescription
124+
websiteUrl = websiteUrl
125+
vcsUrl = gitUrl
126+
licenses = allLicenses
127+
publish = true
128+
version {
129+
name = libraryVersion
130+
desc = libraryDescription
131+
}
132+
}
133+
}
134+

0 commit comments

Comments
 (0)