Skip to content

Commit 25a8886

Browse files
committed
New bintray upload setup
1 parent cb90085 commit 25a8886

File tree

3 files changed

+62
-7
lines changed

3 files changed

+62
-7
lines changed

build.gradle

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ buildscript {
55
}
66
dependencies {
77
classpath 'com.android.tools.build:gradle:4.0.1'
8+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
89
}
910
}
1011

@@ -20,13 +21,6 @@ task clean(type: Delete) {
2021
}
2122

2223
ext {
23-
userOrg = 'yarolegovich'
24-
groupId = 'com.yarolegovich'
25-
uploadName = 'SlidingRootNav'
26-
description = 'DrawerLayout-like ViewGroup, where a "drawer" is hidden under the content view, which can be shifted to make the drawer visible.'
27-
publishVersion = '1.1.0'
28-
licences = ['Apache-2.0']
29-
3024
compileSdkVersion = 29
3125
buildToolsVersion = '29.0.2'
3226
minSdkVersion = 16

library/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'com.android.library'
2+
apply from: rootProject.file('release-bintray.gradle')
23

34
android {
45
compileSdkVersion rootProject.ext.compileSdkVersion

release-bintray.gradle

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
apply plugin: 'maven-publish'
2+
apply plugin: 'com.jfrog.bintray'
3+
4+
def upload = [
5+
user : 'yarolegovich',
6+
artifactId : 'sliding-root-nav',
7+
userOrg : 'yarolegovich',
8+
repository : 'maven',
9+
groupId : 'com.yarolegovich',
10+
uploadName : 'SlidingRootNav',
11+
description: 'DrawerLayout-like ViewGroup, where a "drawer" is hidden under the content view, which can be shifted to make the drawer visible.',
12+
version : '1.1.1',
13+
licences : ['Apache-2.0']
14+
]
15+
16+
task androidSourcesJar(type: Jar) {
17+
archiveClassifier.set('sources')
18+
from android.sourceSets.main.java.srcDirs
19+
}
20+
21+
version upload.version
22+
23+
afterEvaluate {
24+
25+
publishing {
26+
publications {
27+
LibRelease(MavenPublication) {
28+
from components.release
29+
30+
artifact androidSourcesJar
31+
32+
artifactId upload.artifactId
33+
groupId upload.groupId
34+
version upload.version
35+
}
36+
}
37+
}
38+
39+
Properties localProps = new Properties()
40+
localProps.load(project.rootProject.file('local.properties').newDataInputStream())
41+
42+
bintray {
43+
user = upload.user
44+
key = localProps.getProperty('bintray.api_key')
45+
publications = ['LibRelease']
46+
configurations = ['archives']
47+
pkg {
48+
name = upload.uploadName
49+
repo = upload.repository
50+
userOrg = upload.userOrg
51+
licenses = upload.licences
52+
publish = true
53+
dryRun = false
54+
version {
55+
name = upload.version
56+
desc = upload.description
57+
}
58+
}
59+
}
60+
}

0 commit comments

Comments
 (0)