File: build.gradle

package info (click to toggle)
grpc-java 1.26.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 11,852 kB
  • sloc: java: 146,813; cpp: 1,174; xml: 1,037; sh: 662; makefile: 40; python: 40
file content (87 lines) | stat: -rw-r--r-- 3,107 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
apply plugin: 'com.android.application'
apply plugin: 'com.google.protobuf'

android {
    sourceSets {
        main {
            java {
                srcDirs += "${projectDir}/../../interop-testing/src/main/java/"
                setIncludes(["io/grpc/android/integrationtest/**",
                             "io/grpc/testing/integration/AbstractInteropTest.java",
                             "io/grpc/testing/integration/TestServiceImpl.java",
                             "io/grpc/testing/integration/Util.java"])
            }
            proto {
                srcDirs += "${projectDir}/../../interop-testing/src/main/proto/"
            }
        }
    }
    compileSdkVersion 26

    defaultConfig {
        applicationId "io.grpc.android.integrationtest"
        // API level 14+ is required for TLS since Google Play Services v10.2
        minSdkVersion 14
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    buildTypes {
        debug { minifyEnabled false }
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions { disable 'InvalidPackage', 'HardcodedText' }
}

protobuf {
    protoc { artifact = 'com.google.protobuf:protoc:3.11.0' }
    plugins {
        grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.26.0' // CURRENT_GRPC_VERSION
        }
    }
    generateProtoTasks {
        all().each { task ->
            task.builtins {
              java { option 'lite' }
            }
            task.plugins {
                grpc {
                    // Options added to --grpc_out
                    option 'lite'
                }
            }
        }
    }
}

dependencies {
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.android.support:support-annotations:27.1.1'
    implementation 'com.google.android.gms:play-services-base:15.0.1'
    implementation ('com.google.auth:google-auth-library-oauth2-http:0.9.0') {
        exclude group: 'org.apache.httpcomponents', module: 'httpclient'
    }
    implementation 'com.google.truth:truth:1.0'
    implementation 'javax.annotation:javax.annotation-api:1.2'
    implementation 'junit:junit:4.12'

    // You need to build grpc-java to obtain the grpc libraries below.
    implementation 'io.grpc:grpc-auth:1.26.0' // CURRENT_GRPC_VERSION
    implementation 'io.grpc:grpc-okhttp:1.26.0' // CURRENT_GRPC_VERSION
    implementation 'io.grpc:grpc-protobuf-lite:1.26.0' // CURRENT_GRPC_VERSION
    implementation 'io.grpc:grpc-stub:1.26.0' // CURRENT_GRPC_VERSION
    implementation 'io.grpc:grpc-testing:1.26.0' // CURRENT_GRPC_VERSION

    androidTestImplementation 'androidx.test:rules:1.1.0-alpha1'
    androidTestImplementation 'androidx.test:runner:1.1.0-alpha1'
}

gradle.projectsEvaluated {
    tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:deprecation" }
}