Skip to content

Commit

Permalink
feat(ci): Java 17 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Malinskiy committed Jan 22, 2024
1 parent 8730575 commit 16fdf16
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
23 changes: 12 additions & 11 deletions .buildsystem/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@ MAINTAINER Anton Malinskiy "[email protected]"

USER root

RUN apt-get update -y \
&& apt-get install -y --no-install-recommends git curl build-essential jq unzip zip rename openjdk-17-jdk \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update -y && \
apt-get install -y --no-install-recommends locales git curl build-essential jq unzip zip rename openjdk-17-jdk libpulse0 xvfb fluxbox && \
locale-gen en_US.UTF-8 && \
rm -rf /var/lib/apt/lists/*

ARG android_home=/opt/android-sdk
ENV ANDROID_HOME ${android_home}
ENV ANDROID_SDK_ROOT ${android_home}
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8 \
ANDROID_HOME=/opt/android-sdk \
ANDROID_SDK_ROOT=/opt/android-sdk

ARG COMMANDLINE_TOOLS_URL=https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip
ARG ANDROID_SDK_FILE_NAME=commandlinetools.zip

RUN curl $COMMANDLINE_TOOLS_URL --progress-bar --location --output $ANDROID_SDK_FILE_NAME && \
unzip -q $ANDROID_SDK_FILE_NAME -d $ANDROID_HOME && \
RUN curl $COMMANDLINE_TOOLS_URL --progress-bar --location --output commandlinetools.zip && \
unzip -q commandlinetools.zip -d $ANDROID_HOME && \
mv $ANDROID_HOME/cmdline-tools $ANDROID_HOME/bootstrap-version && \
mkdir $ANDROID_HOME/cmdline-tools && \
mv $ANDROID_HOME/bootstrap-version $ANDROID_HOME/cmdline-tools && \
rm -f $ANDROID_SDK_FILE_NAME
rm -f commandlinetools.zip

ENV PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/cmdline-tools/bootstrap-version/bin:$ANDROID_HOME/emulator:$ANDROID_HOME/platform-tools:$ANDROID_HOME/platform-tools/bin
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${ANDROID_HOME}/emulator/lib64/qt/lib:${ANDROID_HOME}/emulator/lib64:${ANDROID_HOME}/emulator/lib64/gles_swiftshader
RUN mkdir ~/.android && echo '### User Sources for Android SDK Manager' > ~/.android/repositories.cfg
RUN yes | sdkmanager --licenses && yes | sdkmanager --update

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
runs-on: svarog-android-${{ matrix.api }}
strategy:
matrix:
api: [ 21 ]
api: [ 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 33, 34 ]
steps:
- uses: actions/checkout@v1
- name: Set up JDK 17
Expand Down
7 changes: 7 additions & 0 deletions adam/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ val integrationTest = task<Test>("integrationTest") {
}
integrationTest.outputs.upToDateWhen { false }

// See https://github.com/jacoco/jacoco/issues/1357
tasks.withType<Test> {
extensions.configure<JacocoTaskExtension> {
includes = listOf("com.malinskiy.adam.*")
}
}

val connectedAndroidTest = task<Test>("connectedAndroidTest") {
description = "Runs integration tests"
group = "verification"
Expand Down

0 comments on commit 16fdf16

Please sign in to comment.