Skip to content

Commit e0ac925

Browse files
committed
Add Bintray publishing support
Adding support for Bintray uploading
1 parent 31b0064 commit e0ac925

File tree

2 files changed

+50
-4
lines changed

2 files changed

+50
-4
lines changed

build.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ buildscript {
1414
}
1515
}
1616

17+
plugins {
18+
id "com.jfrog.bintray" version "1.8.4"
19+
}
20+
1721
allprojects {
1822
repositories {
1923
google()

library/build.gradle

+46-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'com.github.dcendents.android-maven'
3+
apply plugin: 'com.jfrog.bintray'
4+
apply plugin: 'maven-publish'
35

4-
group='com.github.codepath'
6+
group='com.codepath.libraries'
7+
8+
ext {
9+
ARTIFACT = "asynchttpclient"
10+
POM_NAME = "CodePath Async Http Client"
11+
POM_DESC = "Async Http Client wrapper using OkHttp"
12+
POM_SCM_URL = 'https://github.com/codepath/AsyncHttpClient'
13+
BASE_VERSION = 1
14+
VERSION_NAME = "0.1"
15+
}
16+
17+
version = VERSION_NAME
18+
archivesBaseName = ARTIFACT
519

620
android {
721
compileSdkVersion 29
822

9-
1023
defaultConfig {
1124
minSdkVersion 21
1225
targetSdkVersion 29
13-
versionCode 1
14-
versionName "1.0"
26+
versionCode BASE_VERSION
27+
versionName VERSION_NAME
1528

1629
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1730

@@ -36,3 +49,32 @@ dependencies {
3649
androidTestImplementation 'androidx.test:runner:1.2.0'
3750
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
3851
}
52+
53+
bintray {
54+
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
55+
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
56+
configurations = ['archives']
57+
58+
pkg {
59+
repo = 'maven'
60+
name = 'asynchttpclient'
61+
userOrg = 'codepath'
62+
licenses = ['Apache-2.0']
63+
vcsUrl = POM_SCM_URL
64+
version {
65+
name = BASE_VERSION
66+
desc = POM_NAME
67+
released = new Date()
68+
}
69+
}
70+
71+
}
72+
73+
task sourcesJar(type: Jar) {
74+
from android.sourceSets.main.java.srcDirs
75+
archiveClassifier.set("sources")
76+
}
77+
78+
artifacts {
79+
archives sourcesJar
80+
}

0 commit comments

Comments
 (0)