1- apply plugin : ' com.android.library'
2- apply plugin : ' com.github.dcendents.android-maven'
31apply plugin : ' com.jfrog.bintray'
2+ apply plugin : ' java'
3+ apply plugin : ' idea'
4+ apply plugin : ' maven'
45
5- version = " 1.0.19"
6- group = " net.servicestack" // Maven Group ID for the artifact
7- String packageId = " client"
8-
9- android {
10- compileSdkVersion 21
11- buildToolsVersion " 21.1.2"
12-
13- defaultConfig {
14- minSdkVersion 15
15- targetSdkVersion 21
16- versionCode 1
17- versionName version
18- }
19- buildTypes {
20- release {
21- minifyEnabled false
22- proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
23- }
24- }
25- }
266
277dependencies {
288 compile ' com.google.code.gson:gson:2.3.1'
9+ compile ' org.apache.httpcomponents:httpmime:4.2.3'
10+ testCompile ' junit:junit:4.11'
11+ testCompile ' org.mockito:mockito-core:1.9.5'
2912}
3013
14+ version = " 1.0.21"
15+ group = " net.servicestack" // Maven Group ID for the artifact
16+ String packageId = " client"
17+
18+ String siteUrl = ' https://github.com/ServiceStack/ServiceStack.Java' // Homepage URL of the library
19+ String gitUrl = ' https://github.com/ServiceStack/ServiceStack.Java.git' // Git repository URL
20+
3121Properties properties = System . properties;
3222if (properties. getProperty(" bintray.user" , null ) == null ) {
3323 properties. load(project. file(' ./local.properties' ). newDataInputStream())
3424}
3525
26+ task createPom {
27+ pom {
28+ project {
29+ packaging ' jar'
30+
31+ // Add your description here
32+ name ' ServiceStack.Client'
33+ description ' A client library to call your ServiceStack webservices.'
34+ url siteUrl
35+
36+ // Set your license
37+ licenses {
38+ license {
39+ name ' The BSD 3-Clause License'
40+ url ' https://raw.githubusercontent.com/ServiceStack/Assets/master/docs/license/LICENSE-BSD3.txt'
41+ }
42+ }
3643
37- def siteUrl = ' https://github.com/ServiceStack/ServiceStack.Java' // Homepage URL of the library
38- def gitUrl = ' https://github.com/ServiceStack/ServiceStack.Java.git' // Git repository URL
44+ developers {
45+ developer {
46+ id ' mythz'
47+ name ' Demis Bellot'
48+ email ' team@servicestack.net'
49+ }
50+ developer {
51+ id ' layoric'
52+ name ' Darren Reid'
53+ email ' team@servicestack.net'
54+ }
55+ }
56+ scm {
57+ connection ' https://github.com/ServiceStack/ServiceStack.Java'
58+ developerConnection ' https://github.com/ServiceStack/ServiceStack.Java'
59+ url ' https://github.com/ServiceStack/ServiceStack.Java'
60+ }
61+ }
62+ }. writeTo(" pom.xml" )
63+ }
64+ build. dependsOn createPom
3965
4066bintray {
4167 user = properties. getProperty(" bintray.user" )
@@ -49,84 +75,21 @@ bintray {
4975 websiteUrl = siteUrl
5076 vcsUrl = gitUrl
5177 licenses = [" BSD 3-Clause" ]
52- publish = true
78+ publish = properties . getProperty( ' bintray.publish ' ) == ' true'
5379 }
5480}
5581
56- task makeJar (type : Copy ) {
57- from(' build/intermediates/bundles/release/' )
58- into(' build/libs/' )
59- include(' classes.jar' )
60- rename (' classes.jar' , packageId + ' -' + version + ' .jar' )
61- }
62-
63- install {
64- repositories. mavenInstaller {
65- // This generates POM.xml with proper parameters
66- pom {
67- project {
68- packaging ' jar'
69-
70- // Add your description here
71- name ' ServiceStack.Client'
72- description ' A client library to call your ServiceStack webservices.'
73- url siteUrl
74-
75- // Set your license
76- licenses {
77- license {
78- name ' The BSD 3-Clause License'
79- url ' https://raw.githubusercontent.com/ServiceStack/Assets/master/docs/license/LICENSE-BSD3.txt'
80- }
81- }
82-
83- developers {
84- developer {
85- id ' mythz'
86- name ' Demis Bellot'
87- email ' team@servicestack.net'
88- }
89- developer {
90- id ' layoric'
91- name ' Darren Reid'
92- email ' team@servicestack.net'
93- }
94- }
95- scm {
96- connection ' https://github.com/ServiceStack/ServiceStack.Java'
97- developerConnection ' https://github.com/ServiceStack/ServiceStack.Java'
98- url ' https://github.com/ServiceStack/ServiceStack.Java'
99- }
100- }
101- }
102- }
103- }. dependsOn makeJar
104-
105- task sourcesJar (type : Jar ) {
106- from android. sourceSets. main. java. srcDirs
82+ task sourcesJar (type : Jar , dependsOn : classes) {
10783 classifier = ' sources'
108- }
109-
110- task javadoc (type : Javadoc ) {
111- source = android. sourceSets. main. java. srcDirs
112- classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
84+ from sourceSets. main. allSource
11385}
11486
11587task javadocJar (type : Jar , dependsOn : javadoc) {
11688 classifier = ' javadoc'
11789 from javadoc. destinationDir
11890}
11991
120- task clearJar (type : Delete ) {
121- delete (" build/libs/" + packageId + ' -' + version + ' .jar' )
122- }
123-
12492artifacts {
125- archives javadocJar
12693 archives sourcesJar
127- archives file : new File (project. projectDir,' build/libs/' + packageId + ' -' + version + ' .jar' ), name : packageId, type : ' jar'
128- }
129-
130- task findConventions << {
131- println project. getConvention()
132- }
94+ archives javadocJar
95+ }
0 commit comments