11apply plugin : ' com.android.library'
2+ apply plugin : ' com.github.dcendents.android-maven'
3+ apply plugin : ' com.jfrog.bintray'
4+
5+ version = " 0.0.2"
26
37android {
48 compileSdkVersion 21
@@ -8,7 +12,7 @@ android {
812 minSdkVersion 16
913 targetSdkVersion 21
1014 versionCode 1
11- versionName " 1.0 "
15+ versionName version
1216 }
1317 buildTypes {
1418 release {
@@ -18,8 +22,92 @@ android {
1822 }
1923}
2024
25+ Properties properties = new Properties ()
26+ properties. load(project. file(' ./local.properties' ). newDataInputStream())
27+
28+ def siteUrl = ' https://github.com/ServiceStack/ServiceStack.Java' // Homepage URL of the library
29+ def gitUrl = ' https://github.com/ServiceStack/ServiceStack.Java.git' // Git repository URL
30+ group = " net.servicestack" // Maven Group ID for the artifact
31+
32+ bintray {
33+ user = properties. getProperty(" bintray.user" )
34+ key = properties. getProperty(" bintray.apiKey" )
35+
36+ configurations = [' archives' ]
37+ pkg {
38+ repo = " maven"
39+ name = " JsonServiceClient"
40+ websiteUrl = siteUrl
41+ vcsUrl = gitUrl
42+ licenses = [" Apache-2.0" ]
43+ publish = true
44+ userOrg = ' servicestack'
45+ }
46+ }
47+
48+ install {
49+ repositories. mavenInstaller {
50+ // This generates POM.xml with proper parameters
51+ pom {
52+ project {
53+ packaging ' aar'
54+
55+ // Add your description here
56+ name ' A client library to call your ServiceStack webservices.'
57+ url siteUrl
58+
59+ // Set your license
60+ licenses {
61+ license {
62+ name ' The Apache Software License, Version 2.0'
63+ url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
64+ }
65+ }
66+
67+ developers {
68+ developer {
69+ id ' mythz'
70+ name ' Demis Bellot'
71+ email ' team@servicestack.net'
72+ }
73+ }
74+ scm {
75+ connection ' https://github.com/ServiceStack/ServiceStack.Java'
76+ developerConnection ' https://github.com/ServiceStack/ServiceStack.Java'
77+ url ' https://github.com/ServiceStack/ServiceStack.Java'
78+
79+ }
80+ }
81+ }
82+ }
83+ }
84+
85+
2186dependencies {
2287 compile fileTree(dir : ' libs' , include : [' *.jar' ])
2388 compile ' com.android.support:appcompat-v7:21.0.3'
2489 compile ' com.google.code.gson:gson:2.3.1'
2590}
91+
92+ task sourcesJar (type : Jar ) {
93+ from android. sourceSets. main. java. srcDirs
94+ classifier = ' sources'
95+ }
96+
97+ task javadoc (type : Javadoc ) {
98+ source = android. sourceSets. main. java. srcDirs
99+ classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
100+ }
101+
102+ task javadocJar (type : Jar , dependsOn : javadoc) {
103+ classifier = ' javadoc'
104+ from javadoc. destinationDir
105+ }
106+ artifacts {
107+ archives javadocJar
108+ archives sourcesJar
109+ }
110+
111+ task findConventions << {
112+ println project. getConvention()
113+ }
0 commit comments