From 9029fb435371567939ebda106d52f0ecd3434554 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Thu, 2 Mar 2023 06:14:17 -0800 Subject: [PATCH] Add kotlin compiler to docker image chip-build-android (#25418) * Add kotlin compiler to docker image chip-build-android * copy over kotlinc and set path in vscode image --------- Co-authored-by: Andrei Litvin --- examples/android/CHIPTest/build.gradle | 2 +- examples/android/CHIPTool/build.gradle | 2 +- .../docker/images/chip-build-android/Dockerfile | 2 +- .../docker/images/chip-build-vscode/Dockerfile | 13 ++----------- integrations/docker/images/chip-build/version | 2 +- 5 files changed, 6 insertions(+), 15 deletions(-) diff --git a/examples/android/CHIPTest/build.gradle b/examples/android/CHIPTest/build.gradle index 80ce504a4a2e85..edbb8003b1fca6 100644 --- a/examples/android/CHIPTest/build.gradle +++ b/examples/android/CHIPTest/build.gradle @@ -1,6 +1,6 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = "1.5.10" + ext.kotlin_version = "1.8.10" repositories { google() mavenCentral() diff --git a/examples/android/CHIPTool/build.gradle b/examples/android/CHIPTool/build.gradle index bfe65d440cda28..01e651929f8ec6 100644 --- a/examples/android/CHIPTool/build.gradle +++ b/examples/android/CHIPTool/build.gradle @@ -1,6 +1,6 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.5.21' + ext.kotlin_version = '1.8.10' repositories { google() mavenCentral() diff --git a/integrations/docker/images/chip-build-android/Dockerfile b/integrations/docker/images/chip-build-android/Dockerfile index fc6af8652b4981..84abe630df65a6 100644 --- a/integrations/docker/images/chip-build-android/Dockerfile +++ b/integrations/docker/images/chip-build-android/Dockerfile @@ -1,5 +1,5 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build:${VERSION} +FROM connectedhomeip/chip-build-java:${VERSION} # JDK 8 access # JDK 8 is required because Android `sdkmanager` diff --git a/integrations/docker/images/chip-build-vscode/Dockerfile b/integrations/docker/images/chip-build-vscode/Dockerfile index 5a8962b10aa4b6..d601d348295c57 100644 --- a/integrations/docker/images/chip-build-vscode/Dockerfile +++ b/integrations/docker/images/chip-build-vscode/Dockerfile @@ -28,6 +28,7 @@ COPY --from=nrf /opt/NordicSemiconductor/nrfconnect /opt/NordicSemiconductor/nrf COPY --from=android /opt/android/sdk /opt/android/sdk COPY --from=android /opt/android/android-ndk-r21b /opt/android/android-ndk-r21b +COPY --from=android /usr/lib/kotlinc/bin /usr/lib/kotlinc/bin COPY --from=mbedos /opt/openocd/ /opt/openocd/ @@ -61,17 +62,6 @@ RUN set -x \ && chmod -R a+w /opt/android/sdk/licenses \ && : # last line -# Download and install kotlin compiler -RUN set -x \ - && cd /usr/lib \ - && wget -q https://github.com/JetBrains/kotlin/releases/download/v1.8.10/kotlin-compiler-1.8.10.zip \ - && unzip kotlin-compiler-*.zip \ - && rm kotlin-compiler-*.zip \ - && rm -f kotlinc/bin/*.bat \ - && : # last line - -ENV PATH $PATH:/usr/lib/kotlinc/bin - # Required for the Tizen SDK RUN set -x \ && apt-get update \ @@ -97,6 +87,7 @@ RUN set -x \ && pip3 install bflb-iot-tool \ && : # last line +ENV PATH $PATH:/usr/lib/kotlinc/bin ENV AMEBA_PATH=/opt/ameba/ambd_sdk_with_chip_non_NDA ENV ANDROID_HOME=/opt/android/sdk ENV ANDROID_NDK_HOME=/opt/android/android-ndk-r21b diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index fe1536b059acdd..3a7290589ebc0f 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.6.45 Version bump reason: [Telink] Update Telink Docker image (Zephyr update) +0.6.46 Version bump reason: [Android] Add kotlin compiler version 1.8.10