11apply 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
310android {
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+
2162dependencies {
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