Skip to content

Commit

Permalink
android-interop-testing: include android interop testing in main build (
Browse files Browse the repository at this point in the history
grpc#6829)

Proto generated code for android-interop-testing is checked in.
  • Loading branch information
voidzcy authored Mar 19, 2020
1 parent e739eea commit d537ade
Show file tree
Hide file tree
Showing 31 changed files with 4,255 additions and 154 deletions.
3 changes: 0 additions & 3 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ them before continuing, and set them again when resuming.
$ MAJOR=1 MINOR=7 PATCH=0 # Set appropriately for new release
$ VERSION_FILES=(
build.gradle
android/build.gradle
android-interop-testing/app/build.gradle
core/src/main/java/io/grpc/internal/GrpcUtil.java
cronet/build.gradle
examples/build.gradle
examples/pom.xml
examples/android/clientcache/app/build.gradle
Expand Down
2 changes: 0 additions & 2 deletions android-interop-testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ gRPC Android test App

Implements gRPC integration tests in an Android App.

TODO(madongfly) integrate this App into the gRPC-Java build system.

In order to build this app, you need a local.properties file under this directory which specifies
the location of your android sdk:
```
Expand Down
88 changes: 0 additions & 88 deletions android-interop-testing/app/build.gradle

This file was deleted.

117 changes: 77 additions & 40 deletions android-interop-testing/build.gradle
Original file line number Diff line number Diff line change
@@ -1,53 +1,90 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id "com.android.application"
id "com.google.protobuf"
}

buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.8"
description = 'gRPC: Android Integration Testing'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
repositories {
google()
jcenter()
}

allprojects {
repositories {
google()
mavenLocal()
jcenter()
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

subprojects {
apply plugin: "checkstyle"

checkstyle {
configDir = file("$rootDir/../buildscripts")
toolVersion = "6.17"
ignoreFailures = false
if (rootProject.hasProperty("checkstyle.ignoreFailures")) {
ignoreFailures = rootProject.properties["checkstyle.ignoreFailures"].toBoolean()
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' }
}

// Checkstyle doesn't run automatically with android
task checkStyleMain(type: Checkstyle) {
source 'src/main/java'
include '**/*.java'
classpath = files()
}
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'

task checkStyleTest(type: Checkstyle) {
source 'src/test/java'
include '**/*.java'
classpath = files()
}
implementation project(':grpc-auth'),
project(':grpc-census'),
project(':grpc-okhttp'),
project(':grpc-protobuf-lite'),
project(':grpc-stub'),
project(':grpc-testing'),
libraries.junit,
libraries.truth

afterEvaluate { project ->
project.tasks['check'].dependsOn checkStyleMain, checkStyleTest
implementation (libraries.google_auth_oauth2_http) {
exclude group: 'org.apache.httpcomponents'
}

compileOnly libraries.javax_annotation

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

// Checkstyle doesn't run automatically with android
task checkStyleMain(type: Checkstyle) {
source 'src/main/java'
include '**/*.java'
classpath = files()
}

task checkStyleTest(type: Checkstyle) {
source 'src/androidTest/java'
include '**/*.java'
classpath = files()
}

project.tasks['check'].dependsOn checkStyleMain, checkStyleTest

configureProtoCompilation()
File renamed without changes.
1 change: 0 additions & 1 deletion android-interop-testing/settings.gradle

This file was deleted.

Loading

0 comments on commit d537ade

Please sign in to comment.