• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1buildscript {
2    repositories {
3        gradlePluginPortal()
4        google()
5    }
6    dependencies {
7        classpath 'com.android.tools.build:gradle:7.4.1'
8        classpath 'gradle.plugin.com.github.sherter.google-java-format:google-java-format-gradle-plugin:0.9'
9        classpath 'net.ltgt.errorprone:net.ltgt.errorprone.gradle.plugin:2.0.2'
10    }
11}
12
13allprojects {
14    repositories {
15        mavenCentral()
16        google()
17    }
18}
19
20subprojects {
21    apply plugin: 'com.github.sherter.google-java-format'
22    apply plugin: 'net.ltgt.errorprone'
23
24    googleJavaFormat {
25        toolVersion = '1.5'
26        options style: 'AOSP'
27    }
28
29    apply plugin: 'com.android.library'
30
31    dependencies {
32        // NOTE: Updating ErrorProne introduces new checks that may cause the build to fail. Pin to a
33        // specific version to control these updates.
34        errorprone("com.google.errorprone:error_prone_core:2.3.2")
35        // ErrorProne requires a JDK 9 compiler, so pull one in as a dependency since we use Java 8:
36        // https://github.com/tbroyer/gradle-errorprone-plugin#jdk-8-support
37        errorproneJavac("com.google.errorprone:javac:9+181-r4173-1")
38    }
39
40    group = 'com.android.volley'
41    version = '1.2.2-SNAPSHOT'
42
43    android {
44        useLibrary 'org.apache.http.legacy'
45
46        compileSdkVersion 28
47        buildToolsVersion = '30.0.3'
48
49        defaultConfig {
50            minSdkVersion 8
51        }
52
53        compileOptions {
54            sourceCompatibility JavaVersion.VERSION_1_7
55            targetCompatibility JavaVersion.VERSION_1_7
56        }
57    }
58
59    tasks.withType(JavaCompile) {
60        options.errorprone {
61            check("ParameterComment", net.ltgt.gradle.errorprone.CheckSeverity.ERROR)
62        }
63        options.compilerArgs << "-Xlint:unchecked" << "-Werror"
64    }
65
66    if (it.name != 'testing') {
67        apply from: '../publish.gradle'
68    }
69}
70