Skip to content

Commit 4f0198d

Browse files
committed
rebuilt, fixed test imports
1 parent 56714e6 commit 4f0198d

File tree

17 files changed

+1809
-1551
lines changed

17 files changed

+1809
-1551
lines changed
Lines changed: 57 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,85 @@
1-
group = 'io.swagger'
2-
project.version = '1.0.0'
1+
group = 'io.swagger'
2+
project.version = '1.0.0'
33

44
buildscript {
5-
repositories {
6-
jcenter()
7-
}
8-
dependencies {
9-
classpath 'com.android.tools.build:gradle:1.2.2'
10-
11-
classpath 'com.github.dcendents:android-maven-plugin:1.2'
12-
13-
}
5+
repositories {
6+
jcenter()
7+
}
8+
dependencies {
9+
classpath 'com.android.tools.build:gradle:1.2.2'
10+
classpath 'com.github.dcendents:android-maven-plugin:1.2'
11+
}
1412
}
1513

1614
allprojects {
17-
repositories {
18-
jcenter()
19-
}
15+
repositories {
16+
jcenter()
17+
}
2018
}
2119

2220

2321
apply plugin: 'com.android.library'
24-
apply plugin: 'com.github.dcendents.android-maven'
22+
apply plugin: 'com.github.dcendents.android-maven'
2523

2624
android {
27-
compileSdkVersion 22
28-
buildToolsVersion '22.0.0'
29-
defaultConfig {
30-
minSdkVersion 14
31-
targetSdkVersion 22
32-
}
25+
compileSdkVersion 22
26+
buildToolsVersion '22.0.0'
27+
defaultConfig {
28+
minSdkVersion 14
29+
targetSdkVersion 22
30+
}
3331

34-
// Rename the aar correctly
35-
libraryVariants.all { variant ->
36-
variant.outputs.each { output ->
37-
def outputFile = output.outputFile
38-
if (outputFile != null && outputFile.name.endsWith('.aar')) {
39-
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
40-
output.outputFile = new File(outputFile.parent, fileName)
41-
}
42-
}
43-
}
32+
// Rename the aar correctly
33+
libraryVariants.all { variant ->
34+
variant.outputs.each { output ->
35+
def outputFile = output.outputFile
36+
if (outputFile != null && outputFile.name.endsWith('.aar')) {
37+
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
38+
output.outputFile = new File(outputFile.parent, fileName)
39+
}
40+
}
41+
}
4442
}
4543

4644

4745
ext {
48-
swagger_annotations_version = "1.5.0"
49-
gson_version = "2.3.1"
50-
httpclient_version = "4.3.3"
51-
junit_version = "4.8.1"
46+
swagger_annotations_version = "1.5.0"
47+
gson_version = "2.3.1"
48+
httpclient_version = "4.3.3"
49+
junit_version = "4.8.1"
5250
}
5351

5452
dependencies {
55-
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
56-
compile "com.google.code.gson:gson:$gson_version"
57-
compile "org.apache.httpcomponents:httpcore:$httpclient_version"
58-
compile "org.apache.httpcomponents:httpclient:$httpclient_version"
59-
compile("org.apache.httpcomponents:httpcore:$httpclient_version") {
60-
exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
61-
}
62-
compile("org.apache.httpcomponents:httpmime:$httpclient_version") {
63-
exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
64-
}
65-
testCompile "junit:junit:$junit_version"
53+
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
54+
compile "com.google.code.gson:gson:$gson_version"
55+
compile "org.apache.httpcomponents:httpcore:$httpclient_version"
56+
compile "org.apache.httpcomponents:httpclient:$httpclient_version"
57+
compile ("org.apache.httpcomponents:httpcore:$httpclient_version") {
58+
exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
59+
}
60+
compile ("org.apache.httpcomponents:httpmime:$httpclient_version") {
61+
exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
62+
}
63+
testCompile "junit:junit:$junit_version"
6664
}
6765

6866
afterEvaluate {
69-
android.libraryVariants.all { variant ->
70-
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
71-
task.description = "Create jar artifact for ${variant.name}"
72-
task.dependsOn variant.javaCompile
73-
task.from variant.javaCompile.destinationDir
74-
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
75-
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
76-
artifacts.add('archives', task);
77-
}
67+
android.libraryVariants.all { variant ->
68+
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
69+
task.description = "Create jar artifact for ${variant.name}"
70+
task.dependsOn variant.javaCompile
71+
task.from variant.javaCompile.destinationDir
72+
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
73+
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
74+
artifacts.add('archives', task);
75+
}
7876
}
7977

80-
task sourcesJar(type: Jar) {
78+
task sourcesJar(type: Jar) {
8179
from android.sourceSets.main.java.srcDirs
8280
classifier = 'sources'
83-
}
81+
}
8482

85-
artifacts {
83+
artifacts {
8684
archives sourcesJar
87-
}
85+
}

samples/client/petstore/android-java/pom.xml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>io.swagger</groupId>
@@ -77,7 +77,8 @@
7777
</goals>
7878
<configuration>
7979
<sources>
80-
<source>src/main/java</source>
80+
<source>
81+
src/main/java</source>
8182
</sources>
8283
</configuration>
8384
</execution>
@@ -89,7 +90,8 @@
8990
</goals>
9091
<configuration>
9192
<sources>
92-
<source>src/test/java</source>
93+
<source>
94+
src/test/java</source>
9395
</sources>
9496
</configuration>
9597
</execution>
@@ -100,7 +102,8 @@
100102
<artifactId>maven-compiler-plugin</artifactId>
101103
<version>2.3.2</version>
102104
<configuration>
103-
<source>1.6</source>
105+
<source>
106+
1.6</source>
104107
<target>1.6</target>
105108
</configuration>
106109
</plugin>
Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
package io.swagger.client;
22

33
public class ApiException extends Exception {
4-
int code = 0;
5-
String message = null;
4+
int code = 0;
5+
String message = null;
66

7-
public ApiException() {
8-
}
7+
public ApiException() {}
98

10-
public ApiException(int code, String message) {
11-
this.code = code;
12-
this.message = message;
13-
}
9+
public ApiException(int code, String message) {
10+
this.code = code;
11+
this.message = message;
12+
}
1413

15-
public int getCode() {
16-
return code;
17-
}
14+
public int getCode() {
15+
return code;
16+
}
1817

19-
public void setCode(int code) {
20-
this.code = code;
21-
}
18+
public void setCode(int code) {
19+
this.code = code;
20+
}
2221

23-
public String getMessage() {
24-
return message;
25-
}
22+
public String getMessage() {
23+
return message;
24+
}
2625

27-
public void setMessage(String message) {
28-
this.message = message;
29-
}
26+
public void setMessage(String message) {
27+
this.message = message;
28+
}
3029
}

0 commit comments

Comments
 (0)