From 212e7004acfdce76c900fd97070e2e5e8476be20 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Wed, 7 Jul 2021 14:01:06 -0700 Subject: Import of Volley from GitHub to AOSP. Android.bp has been updated to account for the new source directory structure. - 0dc50bcfd021c204a9e6c9e7e6befbdfa1027247 Refactor Volley into a multi-module project. (#418) by Jeff Davidson - 763c86b0bc9f66a8bb499f6a8b7fd3bdc87621a8 Remove new constructors from JsonRequests which are break... by Jeff Davidson - 8d1b1a59e7cd1b1d3c6d8686f8831cea08f80d1f Add @NonNull annotations to Volley (#413) by Kamal Faraj - 5ba41f8670413973f587e435598f9f1724fa26e9 Allow sending any JSON with JsonArrayRequest & JsonObject... by Paul Smith - 784cdd755392a6080e5eb0bf94bd7bf4ea31cf17 Update SNAPSHOT version after 1.2.0 release by Jeff Davidson - 0d6497bab417a5f78b3c8e03ea157ada0fbfbc5d Add developers stanza to Volley POM. (#400) by Jeff Davidson - 36274bf515a699ae5a7fe3d321206d1b803226d8 API cleanup for Async Volley stack ahead of 1.2.0 release... by Jeff Davidson - 03f0144843fcf9ebafe512647c1c588975429452 Update environment variable name for snapshot pushes. (#3... by Jeff Davidson - 3bd1975652687d2baa1b11a7f02b135edede8523 Publish SNAPSHOT builds to OSSRH instead of OJO. (#397) by Jeff Davidson - 0e0c3d9cfa694f8f1400a9e9abc4bc11761fdb52 Invoke RetryPolicy#retry in the blocking executor. (#393) by Jeff Davidson - b51831a48f06ad28f627c3624e5edb41598a2bf8 Use a consistent timebase when evaluating soft/hard TTLs.... by Jeff Davidson - cd0839113b100f163df1ebd04ce6d5b9e36e9863 Migrate from Travis CI to GitHub Actions. (#381) by Jeff Davidson - bdc0e393199ebf9e67c4e29e665252818eed4639 Clean up cache initialization in AsyncRequestQueue. (#380) by Jeff Davidson - 1c0ade36edde15d02844b40351ab6f80c63b71b3 Actually allow applications to provide custom executors. by Jeff Davidson GitOrigin-RevId: 0dc50bcfd021c204a9e6c9e7e6befbdfa1027247 Change-Id: I4b8e4098ad5c349cb83efc867273fac1d3582a34 --- build.gradle | 104 ++++++++++++++++++++++++++++------------------------------- 1 file changed, 50 insertions(+), 54 deletions(-) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index 544771c..b8db952 100644 --- a/build.gradle +++ b/build.gradle @@ -1,76 +1,72 @@ -// NOTE: The only changes that belong in this file are the definitions -// of tool versions (gradle plugin, compile SDK, build tools), so that -// Volley can be built via gradle as a standalone project. -// -// Any other changes to the build config belong in rules.gradle, which -// is used by projects that depend on Volley but define their own -// tools versions across all dependencies to ensure a consistent build. -// -// Most users should just add this line to settings.gradle: -// include(":volley") -// -// If you have a more complicated Gradle setup you can choose to use -// this instead: -// include(":volley") -// project(':volley').buildFileName = 'rules.gradle' - -import net.ltgt.gradle.errorprone.CheckSeverity - buildscript { repositories { + gradlePluginPortal() jcenter() google() } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' + classpath 'gradle.plugin.com.github.sherter.google-java-format:google-java-format-gradle-plugin:0.6' + // NOTE: 0.7 or newer will require upgrading to a newer Android gradle plugin: + // https://github.com/tbroyer/gradle-errorprone-plugin/commit/65b1026ebeae1b7ed8c28578c7f6eea512c16bea + classpath 'net.ltgt.errorprone:net.ltgt.errorprone.gradle.plugin:0.6.1' } } -plugins { - id "com.github.sherter.google-java-format" version "0.6" - // NOTE: 0.7 or newer will require upgrading to a newer Android gradle plugin: - // https://github.com/tbroyer/gradle-errorprone-plugin/commit/65b1026ebeae1b7ed8c28578c7f6eea512c16bea - id "net.ltgt.errorprone" version "0.6.1" +allprojects { + repositories { + jcenter() + google() + } } -googleJavaFormat { - toolVersion = '1.5' - options style: 'AOSP' -} +subprojects { + apply plugin: 'com.github.sherter.google-java-format' + apply plugin: 'net.ltgt.errorprone' -apply plugin: 'com.android.library' + googleJavaFormat { + toolVersion = '1.5' + options style: 'AOSP' + } -repositories { - jcenter() - google() -} + apply plugin: 'com.android.library' -dependencies { - // NOTE: Updating ErrorProne introduces new checks that may cause the build to fail. Pin to a - // specific version to control these updates. - errorprone("com.google.errorprone:error_prone_core:2.3.2") - // ErrorProne requires a JDK 9 compiler, so pull one in as a dependency since we use Java 8: - // https://github.com/tbroyer/gradle-errorprone-plugin#jdk-8-support - errorproneJavac("com.google.errorprone:javac:9+181-r4173-1") -} + dependencies { + // NOTE: Updating ErrorProne introduces new checks that may cause the build to fail. Pin to a + // specific version to control these updates. + errorprone("com.google.errorprone:error_prone_core:2.3.2") + // ErrorProne requires a JDK 9 compiler, so pull one in as a dependency since we use Java 8: + // https://github.com/tbroyer/gradle-errorprone-plugin#jdk-8-support + errorproneJavac("com.google.errorprone:javac:9+181-r4173-1") + } + + group = 'com.android.volley' + version = '1.2.1-SNAPSHOT' + + android { + useLibrary 'org.apache.http.legacy' -group = 'com.android.volley' -version = '1.2.0-SNAPSHOT' + compileSdkVersion 28 + buildToolsVersion = '28.0.3' -android { - compileSdkVersion 28 - buildToolsVersion = '28.0.3' + defaultConfig { + minSdkVersion 8 + } - defaultConfig { - minSdkVersion 8 + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 + } } -} -tasks.withType(JavaCompile) { - options.errorprone { - check("ParameterComment", CheckSeverity.ERROR) + tasks.withType(JavaCompile) { + options.errorprone { + check("ParameterComment", net.ltgt.gradle.errorprone.CheckSeverity.ERROR) + } + options.compilerArgs << "-Xlint:unchecked" << "-Werror" } -} -apply from: 'rules.gradle' -apply from: 'bintray.gradle' + if (it.name != 'testing') { + apply from: '../publish.gradle' + } +} -- cgit v1.2.3