Skip to content

Commit 7f5cdba

Browse files
committed
rebuilt
1 parent 295af57 commit 7f5cdba

File tree

15 files changed

+140
-194
lines changed

15 files changed

+140
-194
lines changed
Lines changed: 19 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,11 @@
1-
group = 'io.swagger'
2-
version = '1.0.0'
1+
apply plugin: 'java'
2+
apply plugin: 'maven'
33

4-
buildscript {
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-
}
12-
}
4+
sourceCompatibility = JavaVersion.VERSION_1_7
5+
targetCompatibility = JavaVersion.VERSION_1_7
136

147
repositories {
15-
jcenter()
16-
}
17-
18-
19-
if(hasProperty('target') && target == 'android') {
20-
21-
apply plugin: 'com.android.library'
22-
apply plugin: 'com.github.dcendents.android-maven'
23-
24-
android {
25-
compileSdkVersion 22
26-
buildToolsVersion '22.0.0'
27-
defaultConfig {
28-
minSdkVersion 14
29-
targetSdkVersion 22
30-
}
31-
compileOptions {
32-
sourceCompatibility JavaVersion.VERSION_1_7
33-
targetCompatibility JavaVersion.VERSION_1_7
34-
}
35-
36-
// Rename the aar correctly
37-
libraryVariants.all { variant ->
38-
variant.outputs.each { output ->
39-
def outputFile = output.outputFile
40-
if (outputFile != null && outputFile.name.endsWith('.aar')) {
41-
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
42-
output.outputFile = new File(outputFile.parent, fileName)
43-
}
44-
}
45-
}
46-
}
47-
48-
afterEvaluate {
49-
android.libraryVariants.all { variant ->
50-
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
51-
task.description = "Create jar artifact for ${variant.name}"
52-
task.dependsOn variant.javaCompile
53-
task.from variant.javaCompile.destinationDir
54-
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
55-
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
56-
artifacts.add('archives', task);
57-
}
58-
}
59-
60-
task sourcesJar(type: Jar) {
61-
from android.sourceSets.main.java.srcDirs
62-
classifier = 'sources'
63-
}
64-
65-
artifacts {
66-
archives sourcesJar
67-
}
68-
69-
} else {
70-
71-
apply plugin: 'java'
72-
apply plugin: 'maven'
73-
74-
sourceCompatibility = JavaVersion.VERSION_1_7
75-
targetCompatibility = JavaVersion.VERSION_1_7
76-
77-
install {
78-
repositories.mavenInstaller {
79-
pom.artifactId = 'swagger-petstore-okhttp-gson'
80-
}
81-
}
82-
83-
task execute(type:JavaExec) {
84-
main = System.getProperty('mainClass')
85-
classpath = sourceSets.main.runtimeClasspath
86-
}
8+
mavenCentral()
879
}
8810

8911
dependencies {
@@ -93,3 +15,17 @@ dependencies {
9315
compile 'com.brsanthu:migbase64:2.2'
9416
testCompile 'junit:junit:4.8.1'
9517
}
18+
19+
group = 'io.swagger'
20+
version = '1.0.0'
21+
22+
install {
23+
repositories.mavenInstaller {
24+
pom.artifactId = 'swagger-petstore-okhttp-gson'
25+
}
26+
}
27+
28+
task execute(type:JavaExec) {
29+
main = System.getProperty('mainClass')
30+
classpath = sourceSets.main.runtimeClasspath
31+
}

samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/ApiException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import java.util.Map;
44
import java.util.List;
55

6-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:21.445-07:00")
6+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T11:42:25.339-07:00")
77
public class ApiException extends Exception {
88
private int code = 0;
99
private Map<String, List<String>> responseHeaders = null;

samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/Configuration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.swagger.client;
22

3-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:21.445-07:00")
3+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T11:42:25.339-07:00")
44
public class Configuration {
55
private static ApiClient defaultApiClient = new ApiClient();
66

samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/Pair.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.swagger.client;
22

3-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:21.445-07:00")
3+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T11:42:25.339-07:00")
44
public class Pair {
55
private String name = "";
66
private String value = "";

samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/StringUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.swagger.client;
22

3-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:21.445-07:00")
3+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T11:42:25.339-07:00")
44
public class StringUtil {
55
/**
66
* Check if the given array contains the given value (with case-insensitive comparison).

samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,22 @@
66
import io.swagger.client.Configuration;
77
import io.swagger.client.Pair;
88

9+
import io.swagger.client.model.*;
10+
911
import com.google.gson.reflect.TypeToken;
1012

1113
import com.squareup.okhttp.Call;
1214

15+
import java.lang.reflect.Type;
16+
17+
import java.util.*;
18+
1319
import io.swagger.client.model.Pet;
1420
import java.io.File;
1521

16-
import java.lang.reflect.Type;
17-
import java.util.*;
22+
import java.io.File;
23+
import java.util.Map;
24+
import java.util.HashMap;
1825

1926
public class PetApi {
2027
private ApiClient apiClient;
@@ -290,11 +297,7 @@ private Call getPetByIdCall(Long petId) throws ApiException {
290297
final String contentType = apiClient.selectHeaderContentType(contentTypes);
291298
headerParams.put("Content-Type", contentType);
292299

293-
<<<<<<< HEAD
294300
String[] authNames = new String[] { "api_key", "petstore_auth" };
295-
=======
296-
String[] authNames = new String[] { "api_key" };
297-
>>>>>>> master
298301
return apiClient.buildCall(path, "GET", queryParams, postBody, headerParams, formParams, authNames);
299302
}
300303

samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/StoreApi.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,22 @@
66
import io.swagger.client.Configuration;
77
import io.swagger.client.Pair;
88

9+
import io.swagger.client.model.*;
10+
911
import com.google.gson.reflect.TypeToken;
1012

1113
import com.squareup.okhttp.Call;
1214

15+
import java.lang.reflect.Type;
16+
17+
import java.util.*;
18+
1319
import java.util.Map;
1420
import io.swagger.client.model.Order;
1521

16-
import java.lang.reflect.Type;
17-
import java.util.*;
22+
import java.io.File;
23+
import java.util.Map;
24+
import java.util.HashMap;
1825

1926
public class StoreApi {
2027
private ApiClient apiClient;

samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,23 @@
66
import io.swagger.client.Configuration;
77
import io.swagger.client.Pair;
88

9+
import io.swagger.client.model.*;
10+
911
import com.google.gson.reflect.TypeToken;
1012

1113
import com.squareup.okhttp.Call;
1214

13-
import io.swagger.client.model.User;
15+
import java.lang.reflect.Type;
16+
1417
import java.util.*;
1518

16-
import java.lang.reflect.Type;
19+
import io.swagger.client.model.User;
1720
import java.util.*;
1821

22+
import java.io.File;
23+
import java.util.Map;
24+
import java.util.HashMap;
25+
1926
public class UserApi {
2027
private ApiClient apiClient;
2128

samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/auth/ApiKeyAuth.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import java.util.Map;
66
import java.util.List;
77

8-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:21.445-07:00")
8+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T11:42:25.339-07:00")
99
public class ApiKeyAuth implements Authentication {
1010
private final String location;
1111
private final String paramName;

samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/auth/Authentication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import java.util.Map;
66
import java.util.List;
77

8-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:21.445-07:00")
8+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T11:42:25.339-07:00")
99
public interface Authentication {
1010
/** Apply authentication settings to header and query params. */
1111
void applyToParams(List<Pair> queryParams, Map<String, String> headerParams);

0 commit comments

Comments
 (0)