Skip to content

Commit f33fe37

Browse files
committed
Merge pull request #2 from mutualmobile/development
Updated gradle files for bintray upload
2 parents c37288e + e0d5401 commit f33fe37

File tree

2 files changed

+77
-2
lines changed

2 files changed

+77
-2
lines changed

build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.0.0-alpha5'
8+
classpath 'com.android.tools.build:gradle:2.0.0-alpha7'
9+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
10+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
911

1012
// NOTE: Do not place your application dependencies here; they belong
1113
// in the individual module build.gradle files

cardstack/build.gradle

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'com.github.dcendents.android-maven'
3+
apply plugin: 'com.jfrog.bintray'
4+
5+
def siteUrl = 'https://github.com/mutualmobile/CardStackUI'
6+
def gitUrl = 'https://github.com/mutualmobile/CardStackUI.git'
7+
group = "com.mutualmobile.android"
8+
version = "0.1"
29

310
android {
411
compileSdkVersion 23
@@ -8,7 +15,7 @@ android {
815
minSdkVersion 14
916
targetSdkVersion 23
1017
versionCode 1
11-
versionName "1.0"
18+
versionName version
1219
}
1320
buildTypes {
1421
release {
@@ -18,7 +25,73 @@ android {
1825
}
1926
}
2027

28+
install {
29+
repositories.mavenInstaller {
30+
// This generates POM.xml with proper parameters
31+
pom {
32+
project {
33+
packaging 'aar'
34+
name 'card-stack-ui'
35+
url siteUrl
36+
37+
// Set your license
38+
licenses {
39+
license {
40+
name 'The Apache Software License, Version 2.0'
41+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
42+
}
43+
}
44+
developers {
45+
developer {
46+
id 'tushar-acharya'
47+
name 'Tushar Acharya'
48+
49+
}
50+
}
51+
scm {
52+
connection gitUrl
53+
developerConnection gitUrl
54+
url siteUrl
55+
56+
}
57+
}
58+
}
59+
}
60+
}
61+
2162
dependencies {
2263
compile fileTree(dir: 'libs', include: ['*.jar'])
2364
compile 'com.android.support:appcompat-v7:23.1.1'
2465
}
66+
67+
68+
task sourcesJar(type: Jar) {
69+
from android.sourceSets.main.java.srcDirs
70+
classifier = 'sources'
71+
}
72+
73+
artifacts {
74+
archives sourcesJar
75+
}
76+
77+
Properties properties = new Properties()
78+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
79+
80+
bintray {
81+
user = properties.getProperty("bintray.user")
82+
key = properties.getProperty("bintray.apikey")
83+
84+
configurations = ['archives']
85+
pkg {
86+
repo = "Android"
87+
name = "card-stack-ui"
88+
userOrg = "mutualmobile"
89+
websiteUrl = siteUrl
90+
vcsUrl = gitUrl
91+
licenses = ["Apache-2.0"]
92+
publish = true
93+
labels = ['aar', 'android', 'ui']
94+
publicDownloadNumbers = true
95+
}
96+
}
97+
apply plugin: 'maven'

0 commit comments

Comments
 (0)