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

View File

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

View File

@@ -8,9 +8,9 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.2'
classpath 'com.android.tools.build:gradle:1.5.+'
{{#useAndroidMavenGradlePlugin}}
classpath 'com.github.dcendents:android-maven-plugin:1.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
{{/useAndroidMavenGradlePlugin}}
}
}
@@ -59,9 +59,10 @@ android {
ext {
swagger_annotations_version = "1.5.0"
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"
junit_version = "4.8.1"
junit_version = "4.12"
robolectric_version = "3.0"
concurrent_unit_version = "0.4.2"
}