update build.gradle for android (default, volley)

This commit is contained in:
wing328 2016-03-25 17:35:21 +08:00
parent cd0633a04f
commit 00c97c8ff6
8 changed files with 61 additions and 26 deletions

View File

@ -8,9 +8,9 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:1.2.2' classpath 'com.android.tools.build:gradle:1.5.+'
{{#useAndroidMavenGradlePlugin}} {{#useAndroidMavenGradlePlugin}}
classpath 'com.github.dcendents:android-maven-plugin:1.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
{{/useAndroidMavenGradlePlugin}} {{/useAndroidMavenGradlePlugin}}
} }
} }
@ -28,11 +28,12 @@ apply plugin: 'com.github.dcendents.android-maven'
{{/useAndroidMavenGradlePlugin}} {{/useAndroidMavenGradlePlugin}}
android { android {
compileSdkVersion 22 compileSdkVersion 23
buildToolsVersion '22.0.0' buildToolsVersion '23.0.2'
useLibrary 'org.apache.http.legacy'
defaultConfig { defaultConfig {
minSdkVersion 14 minSdkVersion 14
targetSdkVersion 22 targetSdkVersion 23
} }
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7 sourceCompatibility JavaVersion.VERSION_1_7
@ -55,16 +56,17 @@ android {
ext { ext {
swagger_annotations_version = "1.5.0" swagger_annotations_version = "1.5.0"
gson_version = "2.3.1" gson_version = "2.3.1"
httpclient_version = "4.3.3" httpclient_version = "4.5.2"
junit_version = "4.8.1" httpcore_version = "4.4.4"
junit_version = "4.12"
} }
dependencies { dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version" compile "io.swagger:swagger-annotations:$swagger_annotations_version"
compile "com.google.code.gson:gson:$gson_version" compile "com.google.code.gson:gson:$gson_version"
compile "org.apache.httpcomponents:httpcore:$httpclient_version" compile "org.apache.httpcomponents:httpcore:$httpcore_version"
compile "org.apache.httpcomponents:httpclient:$httpclient_version" compile "org.apache.httpcomponents:httpclient:$httpclient_version"
compile ("org.apache.httpcomponents:httpcore:$httpclient_version") { compile ("org.apache.httpcomponents:httpcore:$httpcore_version") {
exclude(group: 'org.apache.httpcomponents', module: 'httpclient') exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
} }
compile ("org.apache.httpcomponents:httpmime:$httpclient_version") { compile ("org.apache.httpcomponents:httpmime:$httpclient_version") {

View File

@ -197,7 +197,8 @@ public class ApiInvoker {
INSTANCE.authentications.put("{{name}}", new HttpBasicAuth()); INSTANCE.authentications.put("{{name}}", new HttpBasicAuth());
{{/isBasic}} {{/isBasic}}
{{#isOAuth}} {{#isOAuth}}
INSTANCE.authentications.put("{{name}}", new OAuth()); // TODO: comment out below as OAuth does not exist
//INSTANCE.authentications.put("{{name}}", new OAuth());
{{/isOAuth}} {{/isOAuth}}
{{/authMethods}} {{/authMethods}}
// Prevent the authentications from being modified. // Prevent the authentications from being modified.

View File

@ -8,9 +8,9 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:1.2.2' classpath 'com.android.tools.build:gradle:1.5.+'
{{#useAndroidMavenGradlePlugin}} {{#useAndroidMavenGradlePlugin}}
classpath 'com.github.dcendents:android-maven-plugin:1.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
{{/useAndroidMavenGradlePlugin}} {{/useAndroidMavenGradlePlugin}}
} }
} }
@ -59,9 +59,10 @@ android {
ext { ext {
swagger_annotations_version = "1.5.0" swagger_annotations_version = "1.5.0"
gson_version = "2.3.1" gson_version = "2.3.1"
httpclient_version = "4.3.3" httpclient_version = "4.5.2"
httpcore_version = "4.4.4"
volley_version = "1.0.19" volley_version = "1.0.19"
junit_version = "4.8.1" junit_version = "4.12"
robolectric_version = "3.0" robolectric_version = "3.0"
concurrent_unit_version = "0.4.2" concurrent_unit_version = "0.4.2"
} }

View File

@ -6,9 +6,9 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:1.2.2' classpath 'com.android.tools.build:gradle:1.5.+'
classpath 'com.github.dcendents:android-maven-plugin:1.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
} }
} }
@ -24,11 +24,12 @@ apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'com.github.dcendents.android-maven'
android { android {
compileSdkVersion 22 compileSdkVersion 23
buildToolsVersion '22.0.0' buildToolsVersion '23.0.2'
useLibrary 'org.apache.http.legacy'
defaultConfig { defaultConfig {
minSdkVersion 14 minSdkVersion 14
targetSdkVersion 22 targetSdkVersion 23
} }
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7 sourceCompatibility JavaVersion.VERSION_1_7
@ -51,16 +52,17 @@ android {
ext { ext {
swagger_annotations_version = "1.5.0" swagger_annotations_version = "1.5.0"
gson_version = "2.3.1" gson_version = "2.3.1"
httpclient_version = "4.3.3" httpclient_version = "4.5.2"
junit_version = "4.8.1" httpcore_version = "4.4.4"
junit_version = "4.12"
} }
dependencies { dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version" compile "io.swagger:swagger-annotations:$swagger_annotations_version"
compile "com.google.code.gson:gson:$gson_version" compile "com.google.code.gson:gson:$gson_version"
compile "org.apache.httpcomponents:httpcore:$httpclient_version" compile "org.apache.httpcomponents:httpcore:$httpcore_version"
compile "org.apache.httpcomponents:httpclient:$httpclient_version" compile "org.apache.httpcomponents:httpclient:$httpclient_version"
compile ("org.apache.httpcomponents:httpcore:$httpclient_version") { compile ("org.apache.httpcomponents:httpcore:$httpcore_version") {
exclude(group: 'org.apache.httpcomponents', module: 'httpclient') exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
} }
compile ("org.apache.httpcomponents:httpmime:$httpclient_version") { compile ("org.apache.httpcomponents:httpmime:$httpclient_version") {

View File

@ -10,6 +10,8 @@ public class Name {
@SerializedName("name") @SerializedName("name")
private Integer name = null; private Integer name = null;
@SerializedName("snake_case")
private Integer snakeCase = null;
/** /**
@ -23,6 +25,17 @@ public class Name {
} }
/**
**/
@ApiModelProperty(value = "")
public Integer getSnakeCase() {
return snakeCase;
}
public void setSnakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
}
@Override @Override
public String toString() { public String toString() {
@ -30,6 +43,7 @@ public class Name {
sb.append("class Name {\n"); sb.append("class Name {\n");
sb.append(" name: ").append(name).append("\n"); sb.append(" name: ").append(name).append("\n");
sb.append(" snakeCase: ").append(snakeCase).append("\n");
sb.append("}\n"); sb.append("}\n");
return sb.toString(); return sb.toString();
} }

View File

@ -6,9 +6,9 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:1.2.2' classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.github.dcendents:android-maven-plugin:1.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
} }
} }

View File

@ -229,7 +229,8 @@ public class ApiInvoker {
INSTANCE.authentications.put("petstore_auth", new OAuth()); // TODO: comment out below as OAuth does not exist
//INSTANCE.authentications.put("petstore_auth", new OAuth());
// Prevent the authentications from being modified. // Prevent the authentications from being modified.

View File

@ -10,6 +10,8 @@ public class Name {
@SerializedName("name") @SerializedName("name")
private Integer name = null; private Integer name = null;
@SerializedName("snake_case")
private Integer snakeCase = null;
/** /**
@ -23,6 +25,17 @@ public class Name {
} }
/**
**/
@ApiModelProperty(value = "")
public Integer getSnakeCase() {
return snakeCase;
}
public void setSnakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
}
@Override @Override
public String toString() { public String toString() {
@ -30,6 +43,7 @@ public class Name {
sb.append("class Name {\n"); sb.append("class Name {\n");
sb.append(" name: ").append(name).append("\n"); sb.append(" name: ").append(name).append("\n");
sb.append(" snakeCase: ").append(snakeCase).append("\n");
sb.append("}\n"); sb.append("}\n");
return sb.toString(); return sb.toString();
} }