Commit Graph

16 Commits

Author SHA1 Message Date
Eric Anderson 0ff3f8e4ac kokoro: Adjust android CIs to work with Ubuntu 22.04 image
It doesn't have Android SDK nor the VERSION file. See also d654707838
2024-07-09 08:16:24 -07:00
Eric Anderson 9792c9f106 kokoro: Remove unavailable API levels 21-23
There are no longer any devices (virtual or otherwise) that support API
level 21, 22, or 23. Google Play services is still supporting API level
21 (although there is a pattern of notifying of dropped levels in July,
and dropping them in August).
2024-06-04 13:05:15 -07:00
Terry Wilson c9db8fa4fe
buildscripts: Break up android-interop gradle builds (#10839)
Splits the :grpc-android-interop-testing:assembleDebug and
:grpc-android-interop-testing:assembleDebugAndroidTest build
targets with hopes of avoiding OOMs.
2024-01-22 09:05:46 -08:00
Eric Anderson 43e06372ec kokoro: Build android-interop-testing and binder separately
This avoids an OOM. We could probably configure things to run them
together, but that generally takes trial-and-error.
2023-11-27 10:15:42 -08:00
Eric Anderson a70dddd3dc kokoro: Use Firebase's arm virtual Android devices
They are a lot faster. Instead of 1-3 minutes of test execution, I now
see 2-22 seconds. There still may be 3 minutes of overhead for the
gcloud command to complete, but the reduction is noticable in the total
execution time. And it seems the tests are actually being run, as there
is some flakiness. The flakiness appears to be at a lower rate.

The script was slightly reorganized to make it easier to copy commands
to run locally.
2023-11-27 08:22:52 -08:00
Eric Anderson 0567ab5773 android-interop: Add testing for API levels 28-30
Note that this uses Pixel2 and Pixel3. Also swap 26-27 from Nexus6P to
Pixel2. We tend to prefer the latest (virtual) device for each API
level.

The current models and their supported API levels are available via:
```
gcloud firebase test android models list --filter=form=virtual
```

Pixel2.arm supports 31-32, but is beta, so I didn't swap to it. It also
supports the preview 33.
2023-11-22 14:49:19 -08:00
Eric Anderson d654707838
buildscripts: Build Android with main build in linux_artifacts
Note that this changes the JDK used to compile releases to Java 11. That
should only impact the appearance of the Javadoc.

This adds the Android SDK to the build container, removing the
dependency on the Android SDK being available on the CI host. This
allows running on newer Kokoro images. 'Android' and 'Android interop'
CIs still depend on the Android SDK being available on the host, but
since they aren't used as part of the release process, they can more
easily migrate off Kokoro as part of future work.

This also causes Android components to now be built with -Werror, as we
use -PfailOnWarnings=true in unix.sh but were missing it from the
Android build invocations.

Gradle will auto-download the necessary version of build-tools. We don't
want to download it ourselves because the version we specify might not
even be used. Looking at logs, we were previously downloading a version
that was unused.

We now fork javac to avoid OOM. The build fails 2/3 times before the
forking, and 0/3 after.
2023-06-28 16:24:21 -07:00
Terry Wilson 7ecb909776
buildscripts: Use Java 11 with android-interop (#9943) 2023-03-09 09:33:10 -08:00
ZHANG Dapeng 5ae6f9ca25
all: Upgrade Android plugin to 4.2.0
- bump android plugin version to 4.2.0
- migrate deprecated android.support dependencies to androidx dependencies
- bump `targetSdkVersion` to 29
- temporarily ignore lint error for 'MissingClass' due to #8799
- run android CIs with `-Pandroid.useAndroidX=true -Pandroid.enableJetifier=true` flags
- android examples are still using android.support dependencies, will not be updated in this PR.
2022-01-07 09:52:26 -08:00
markb74 f57de6bd03
Make binder instrumentation tests run on kokoro. (#8563)
The tests run as part of the existing android-interop-testing job.

We needed to modify the manifest of the apk built under android-interop-testing to declare Android Services used by the binder tests.
2021-09-29 11:28:14 +02:00
Eric Anderson f781d24ddd Mostly revert "Run binderchannel android tests. (#8306)"
This partilaly reverts commit 5e18ff208a.
It leaves the compilation fix that was made to
BinderClientTransportTest.

Running instrumentation tests via firebase requires a `--app` argument.
However, we don't have such an app and it isn't immediately clear how
we'll go about making one. Revert the change to let android-testing to
start passing again.

This problem wasn't noticed before merging the original commit because
android-testing is a post-commit CI.
2021-08-02 16:13:33 -07:00
markb74 5e18ff208a
Run binderchannel android tests. (#8306) 2021-07-14 13:10:28 +02:00
Chengyuan Zhang 95e331a69b
buildscripts: clean up android related scripts (#6843)
Fix incorrect android-interop-testing apk path after flatten the project structure.
2020-03-19 19:09:54 -07:00
ZHANG Dapeng 755a22790b
android/android-interop-testing/examples: upgrade android plugin
This resolves #5523

While bumping `com.android.tools.build:gradle:3.1.2` to `3.3.0`, some other plugins/artifacts/maven repo/buildscripts have to be updated:

- gradle (wrapper) need to upgrade to 4.10.x
- protobuf gradle plugin need to bump a version compatible with gradle version.
- need add `google()` and `jcenter()` repos for android (otherwise `com.android.tools.build:aapt2:3.3.0x` and `trove4j` will not be found resp.)
- need to accept license for Android "build-tools;28.0.3" in kokoro env.
2019-04-02 14:52:27 -07:00
Jihun Cho 1c3432c3fb
all: migrate gradle publish from maven to use maven-publish plugin (#5289) 2019-01-31 17:38:43 -08:00
Eric Gribkoff 03dab29e3a
buildscripts: run Android interop tests on Firebase (#4314) 2018-08-28 14:56:06 -07:00