Skip to content

Commit d537ade

Browse files
authored
android-interop-testing: include android interop testing in main build (#6829)
Proto generated code for android-interop-testing is checked in.
1 parent e739eea commit d537ade

31 files changed

+4255
-154
lines changed

RELEASING.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ them before continuing, and set them again when resuming.
3232
$ MAJOR=1 MINOR=7 PATCH=0 # Set appropriately for new release
3333
$ VERSION_FILES=(
3434
build.gradle
35-
android/build.gradle
36-
android-interop-testing/app/build.gradle
3735
core/src/main/java/io/grpc/internal/GrpcUtil.java
38-
cronet/build.gradle
3936
examples/build.gradle
4037
examples/pom.xml
4138
examples/android/clientcache/app/build.gradle

android-interop-testing/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ gRPC Android test App
33

44
Implements gRPC integration tests in an Android App.
55

6-
TODO(madongfly) integrate this App into the gRPC-Java build system.
7-
86
In order to build this app, you need a local.properties file under this directory which specifies
97
the location of your android sdk:
108
```

android-interop-testing/app/build.gradle

Lines changed: 0 additions & 88 deletions
This file was deleted.

android-interop-testing/build.gradle

Lines changed: 77 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,90 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
1+
plugins {
2+
id "com.android.application"
3+
id "com.google.protobuf"
4+
}
25

3-
buildscript {
4-
repositories {
5-
google()
6-
jcenter()
7-
}
8-
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.3.0'
10-
classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.8"
6+
description = 'gRPC: Android Integration Testing'
117

12-
// NOTE: Do not place your application dependencies here; they belong
13-
// in the individual module build.gradle files
14-
}
8+
repositories {
9+
google()
10+
jcenter()
1511
}
1612

17-
allprojects {
18-
repositories {
19-
google()
20-
mavenLocal()
21-
jcenter()
13+
android {
14+
sourceSets {
15+
main {
16+
java {
17+
srcDirs += "${projectDir}/../interop-testing/src/main/java/"
18+
setIncludes(["io/grpc/android/integrationtest/**",
19+
"io/grpc/testing/integration/AbstractInteropTest.java",
20+
"io/grpc/testing/integration/TestServiceImpl.java",
21+
"io/grpc/testing/integration/Util.java"])
22+
}
23+
proto {
24+
srcDirs += "${projectDir}/../interop-testing/src/main/proto/"
25+
}
26+
}
2227
}
23-
}
28+
compileSdkVersion 26
2429

25-
subprojects {
26-
apply plugin: "checkstyle"
27-
28-
checkstyle {
29-
configDir = file("$rootDir/../buildscripts")
30-
toolVersion = "6.17"
31-
ignoreFailures = false
32-
if (rootProject.hasProperty("checkstyle.ignoreFailures")) {
33-
ignoreFailures = rootProject.properties["checkstyle.ignoreFailures"].toBoolean()
30+
defaultConfig {
31+
applicationId "io.grpc.android.integrationtest"
32+
// API level 14+ is required for TLS since Google Play Services v10.2
33+
minSdkVersion 14
34+
targetSdkVersion 26
35+
versionCode 1
36+
versionName "1.0"
37+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
38+
multiDexEnabled true
39+
}
40+
buildTypes {
41+
debug { minifyEnabled false }
42+
release {
43+
minifyEnabled true
44+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
3445
}
3546
}
47+
lintOptions { disable 'InvalidPackage', 'HardcodedText' }
48+
}
3649

37-
// Checkstyle doesn't run automatically with android
38-
task checkStyleMain(type: Checkstyle) {
39-
source 'src/main/java'
40-
include '**/*.java'
41-
classpath = files()
42-
}
50+
dependencies {
51+
implementation 'com.android.support:appcompat-v7:26.1.0'
52+
implementation 'com.android.support:multidex:1.0.3'
53+
implementation 'com.android.support:support-annotations:27.1.1'
54+
implementation 'com.google.android.gms:play-services-base:15.0.1'
4355

44-
task checkStyleTest(type: Checkstyle) {
45-
source 'src/test/java'
46-
include '**/*.java'
47-
classpath = files()
48-
}
56+
implementation project(':grpc-auth'),
57+
project(':grpc-census'),
58+
project(':grpc-okhttp'),
59+
project(':grpc-protobuf-lite'),
60+
project(':grpc-stub'),
61+
project(':grpc-testing'),
62+
libraries.junit,
63+
libraries.truth
4964

50-
afterEvaluate { project ->
51-
project.tasks['check'].dependsOn checkStyleMain, checkStyleTest
65+
implementation (libraries.google_auth_oauth2_http) {
66+
exclude group: 'org.apache.httpcomponents'
5267
}
68+
69+
compileOnly libraries.javax_annotation
70+
71+
androidTestImplementation 'androidx.test:rules:1.1.0-alpha1'
72+
androidTestImplementation 'androidx.test:runner:1.1.0-alpha1'
73+
}
74+
75+
// Checkstyle doesn't run automatically with android
76+
task checkStyleMain(type: Checkstyle) {
77+
source 'src/main/java'
78+
include '**/*.java'
79+
classpath = files()
5380
}
81+
82+
task checkStyleTest(type: Checkstyle) {
83+
source 'src/androidTest/java'
84+
include '**/*.java'
85+
classpath = files()
86+
}
87+
88+
project.tasks['check'].dependsOn checkStyleMain, checkStyleTest
89+
90+
configureProtoCompilation()

android-interop-testing/settings.gradle

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)