Skip to content

Commit

Permalink
Revert upgrade JDK 17 (#2478)
Browse files Browse the repository at this point in the history
b/323034717

Co-authored-by: Colin Liang <[email protected]>
  • Loading branch information
zhongqiliang and Colin Liang authored Mar 25, 2024
1 parent c9844b0 commit 379ac88
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
steps:
- uses: kaidokert/[email protected]
timeout-minutes: 30
- name: Set up JDK 17
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
java-version: 11
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3 #v1.0.6
- name: Build with Gradle
Expand Down
3 changes: 0 additions & 3 deletions cobalt/site/docs/development/setup-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ return and complete the following steps.

1. Download and install [Android Studio](https://developer.android.com/studio/).

1. Install [JDK 17](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
and make sure it's before any other JDK on your PATH.

1. To enable parallel gradle builds, add the following to your `~/.bashrc`:

```
Expand Down
16 changes: 3 additions & 13 deletions docker/linux/android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,14 @@ ARG FROM_IMAGE
FROM ${FROM_IMAGE:-cobalt-build-base}

# TODO: b/309157124 - add --no-install-recommends.
RUN apt update -qqy
RUN apt install -qqy \
curl \
RUN apt update -qqy \
&& apt install -qqy \
libxml2-dev \
default-jdk \
binutils-arm-linux-gnueabi \
g++-multilib \
&& /opt/clean-after-apt.sh

# Jdk17, verify SHA256 of the installation file, then install it.
ARG JDK17_DOWNLOAD_URL="https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.deb"
ARG JDK17_TMP_FILE="/tmp/jdk-17_linux-x64_bin.deb"
ARG JDK17_SHA256SUM="0871ec2276b3440ab03e4bb1e77a9d7645f82eb9d6c449d743a585845c370269 ${JDK17_TMP_FILE}"

RUN curl --location --silent --output ${JDK17_TMP_FILE} ${JDK17_DOWNLOAD_URL} \
&& echo ${JDK17_SHA256SUM} | sha256sum --check \
&& apt install -qqy ${JDK17_TMP_FILE} \
&& rm ${JDK17_TMP_FILE}

RUN mkdir -p /root/.android

RUN keytool -genkey -v \
Expand Down
4 changes: 2 additions & 2 deletions starboard/android/apk/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ android {
ndkVersion NDK_VERSION

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

aaptOptions {
Expand Down
2 changes: 1 addition & 1 deletion starboard/android/apk/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx8g
org.gradle.jvmargs=-Xmx4g

# Android Studio plugin 3.0 adds the testOnly=1 attribute to the APK manifest
# which means that it can't be installed without the '-t' parameter passed to
Expand Down

0 comments on commit 379ac88

Please sign in to comment.