• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// NOTE: The only changes that belong in this file are the definitions
2// of tool versions (gradle plugin, compile SDK, build tools), so that
3// Volley can be built via gradle as a standalone project.
4//
5// Any other changes to the build config belong in rules.gradle, which
6// is used by projects that depend on Volley but define their own
7// tools versions across all dependencies to ensure a consistent build.
8//
9// Most users should just add this line to settings.gradle:
10//     include(":volley")
11//
12// If you have a more complicated Gradle setup you can choose to use
13// this instead:
14//     include(":volley")
15//     project(':volley').buildFileName = 'rules.gradle'
16
17import net.ltgt.gradle.errorprone.CheckSeverity
18
19buildscript {
20    repositories {
21        jcenter()
22        google()
23    }
24    dependencies {
25        classpath 'com.android.tools.build:gradle:3.2.1'
26    }
27}
28
29plugins {
30    id "com.github.sherter.google-java-format" version "0.6"
31    // NOTE: 0.7 or newer will require upgrading to a newer Android gradle plugin:
32    // https://github.com/tbroyer/gradle-errorprone-plugin/commit/65b1026ebeae1b7ed8c28578c7f6eea512c16bea
33    id "net.ltgt.errorprone" version "0.6.1"
34}
35
36googleJavaFormat {
37    toolVersion = '1.5'
38    options style: 'AOSP'
39}
40
41apply plugin: 'com.android.library'
42
43repositories {
44    jcenter()
45    google()
46}
47
48dependencies {
49    // NOTE: Updating ErrorProne introduces new checks that may cause the build to fail. Pin to a
50    // specific version to control these updates.
51    errorprone("com.google.errorprone:error_prone_core:2.3.2")
52    // ErrorProne requires a JDK 9 compiler, so pull one in as a dependency since we use Java 8:
53    // https://github.com/tbroyer/gradle-errorprone-plugin#jdk-8-support
54    errorproneJavac("com.google.errorprone:javac:9+181-r4173-1")
55}
56
57group = 'com.android.volley'
58version = '1.2.0-SNAPSHOT'
59
60android {
61    compileSdkVersion 28
62    buildToolsVersion = '28.0.3'
63
64    defaultConfig {
65        // Keep in sync with src/main/AndroidManifest.xml
66        minSdkVersion 8
67    }
68}
69
70tasks.withType(JavaCompile) {
71    options.errorprone {
72        check("ParameterComment", CheckSeverity.ERROR)
73    }
74}
75
76apply from: 'rules.gradle'
77apply from: 'bintray.gradle'
78