From ce4264565ed9ca714a64095fe47bd454b2956533 Mon Sep 17 00:00:00 2001 From: Muhammad Ali Date: Thu, 7 Dec 2023 16:19:27 +0500 Subject: [PATCH] feat: upgrade to quince --- .gitlab-ci.yml | 2 +- CHANGELOG.md | 6 ++++++ changelog.d/20231118_183802_codewithemad.md | 1 - setup.py | 4 ++-- tutorandroid/__about__.py | 2 +- tutorandroid/templates/android/build/Dockerfile | 13 ++++++++----- 6 files changed, 18 insertions(+), 10 deletions(-) delete mode 100644 changelog.d/20231118_183802_codewithemad.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 203e5af..56a6a7a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: TUTOR_PLUGIN: android TUTOR_IMAGES: android TUTOR_PYPI_PACKAGE: tutor-android - OPENEDX_RELEASE: palm + OPENEDX_RELEASE: quince GITHUB_REPO: overhangio/tutor-android IMAGES_BUILD_PLATFORM: "linux/amd64" diff --git a/CHANGELOG.md b/CHANGELOG.md index 7021aae..785c8d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,12 @@ instructions, because git commits are used to generate release notes: + +## v17.0.0 (2023-12-09) + +- 💥 [Feature] Upgrade to Quince (by @muhammadali286). +- [Improvement] Added Typing to code, Makefile and test action to the repository and formatted code with Black and isort. (by @CodeWithEmad) + ## v16.0.0 (2023-06-14) diff --git a/changelog.d/20231118_183802_codewithemad.md b/changelog.d/20231118_183802_codewithemad.md deleted file mode 100644 index 952a383..0000000 --- a/changelog.d/20231118_183802_codewithemad.md +++ /dev/null @@ -1 +0,0 @@ -- [Improvement] Added Typing to code, Makefile and test action to the repository and formatted code with Black and isort. (by @CodeWithEmad) \ No newline at end of file diff --git a/setup.py b/setup.py index c24681d..c4d97c3 100644 --- a/setup.py +++ b/setup.py @@ -43,8 +43,8 @@ def load_about(): packages=find_packages(exclude=["tests*"]), include_package_data=True, python_requires=">=3.8", - install_requires=["tutor>=16.0.0,<17.0.0"], - extras_require={"dev": ["tutor[dev]>=16.0.0,<17.0.0"]}, + install_requires=["tutor>=17.0.0,<18.0.0"], + extras_require={"dev": ["tutor[dev]>=17.0.0,<18.0.0"]}, entry_points={ "tutor.plugin.v1": [ "android = tutorandroid.plugin" diff --git a/tutorandroid/__about__.py b/tutorandroid/__about__.py index 5e5e910..a08b09c 100644 --- a/tutorandroid/__about__.py +++ b/tutorandroid/__about__.py @@ -1 +1 @@ -__version__ = "16.0.0" +__version__ = "17.0.0" diff --git a/tutorandroid/templates/android/build/Dockerfile b/tutorandroid/templates/android/build/Dockerfile index 40a47f4..d524636 100644 --- a/tutorandroid/templates/android/build/Dockerfile +++ b/tutorandroid/templates/android/build/Dockerfile @@ -1,11 +1,11 @@ -FROM docker.io/ubuntu:22.04 AS base +FROM docker.io/ubuntu:23.10 AS base LABEL maintainer="Overhang.IO " ENV DEBIAN_FRONTEND=noninteractive RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked {% endif %}apt update && \ apt upgrade -y && \ - apt install -y wget unzip git openjdk-11-jre openjdk-11-jdk + apt install -y wget unzip git openjdk-17-jre openjdk-17-jdk RUN mkdir /app @@ -15,7 +15,7 @@ FROM base AS sdk # Install Android SDK # Inspired from https://github.com/LiveXP/docker-android-sdk/blob/master/Dockerfile # Get sdk version from here: https://developer.android.com/studio#command-tools -ENV ANDROID_SDK_VERSION 9477386 +ENV ANDROID_SDK_VERSION 10406996 ENV ANDROID_SDK_PATH /app/android-sdk ENV ANDROID_HOME /app/android-sdk RUN mkdir ${ANDROID_HOME} @@ -27,13 +27,15 @@ RUN wget --quiet https://dl.google.com/android/repository/commandlinetools-linux # Accept licenses # https://developer.android.com/studio/command-line/sdkmanager # Check target version: https://github.com/edx/edx-app-android/blob/master/constants.gradle -ARG ANDROID_API_LEVEL=31 +ARG ANDROID_API_LEVEL=33 RUN yes | /app/android-sdk/cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install "platforms;android-$ANDROID_API_LEVEL" 1> /dev/null ###### Checkout code FROM base AS code # Install android app repo ARG ANDROID_APP_REPOSITORY=https://github.com/openedx/edx-app-android + +# Please add ANDROID_APP_VERSION value in tutor config from release version https://github.com/openedx/edx-app-android/tags ARG ANDROID_APP_VERSION=release/{{ ANDROID_APP_VERSION }} RUN git clone $ANDROID_APP_REPOSITORY --branch $ANDROID_APP_VERSION /app/edx-app-android @@ -63,7 +65,8 @@ COPY ./config/gradle.properties ./gradle.properties.tutor RUN cat ./gradle.properties.tutor >> ./gradle.properties {% endif %} -RUN sed -i "s/APPLICATION_ID = .*/APPLICATION_ID = \"{{ LMS_HOST|reverse_host|replace("-", "_") }}\"/g" constants.gradle +# uncomment this line for for release APK. +# RUN sed -i "s/APPLICATION_ID = .*/APPLICATION_ID = \"{{ LMS_HOST|reverse_host|replace("-", "_") }}\"/g" constants.gradle RUN ./gradlew assembleProd{{ "Release" if ANDROID_ENABLE_RELEASE_MODE else "Debuggable" }} #### File server to serve apk file