diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 00a6eba85..1802ea4f5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,7 +16,7 @@ workflow: variables: FDO_UPSTREAM_REPO: monado/monado -.templates_sha: &templates_sha 9f0eb526291fe74651fe1430cbd2397f4c0a819b +.templates_sha: &templates_sha 7811ba9814a3bad379377241c6c6b62d78b20eac include: # Debian @@ -37,13 +37,13 @@ include: .monado.variables.debian:bullseye: variables: FDO_DISTRIBUTION_VERSION: "bullseye" - FDO_DISTRIBUTION_TAG: "2022-09-20.1" + FDO_DISTRIBUTION_TAG: "2023-04-07" # Variables for build and usage of Debian bullseye-ndk image .monado.variables.debian:bullseye-ndk: variables: FDO_DISTRIBUTION_VERSION: "bullseye" - FDO_DISTRIBUTION_TAG: "2022-09-20.0" + FDO_DISTRIBUTION_TAG: "2023-04-10" FDO_REPO_SUFFIX: ndk # Variables for build and usage of Ubuntu focal image @@ -83,6 +83,7 @@ debian:bullseye:container_prep: only: changes: - .gitlab-ci/**/* + - .gitlab-ci.yml variables: FDO_DISTRIBUTION_PACKAGES: 'build-essential ca-certificates clang-format cmake codespell curl debhelper devscripts doxygen dput-ng gettext-base git glslang-tools graphviz libavcodec-dev libbluetooth-dev libbsd-dev libcjson-dev libdbus-1-dev libegl1-mesa-dev libeigen3-dev libgl1-mesa-dev libglvnd-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libhidapi-dev libopencv-dev libsdl2-dev libsystemd-dev libudev-dev libusb-1.0-0-dev libuvc-dev libv4l-dev libvulkan-dev libwayland-dev libx11-dev libx11-xcb-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev ninja-build pandoc patch pkg-config python3 python3-click python3-pip unzip wget' FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/i386_and_proclamation_container_prep.sh' @@ -96,6 +97,7 @@ debian:bullseye-ndk:container_prep: only: changes: - .gitlab-ci/**/* + - .gitlab-ci.yml variables: FDO_DISTRIBUTION_PACKAGES: 'ca-certificates cmake default-jdk-headless git glslang-tools libeigen3-dev meson ninja-build pkg-config python3 unzip wget' FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/android_container_prep.sh' @@ -109,6 +111,7 @@ ubuntu:focal:container_prep: only: changes: - .gitlab-ci/**/* + - .gitlab-ci.yml variables: FDO_DISTRIBUTION_PACKAGES: 'build-essential ca-certificates cmake curl debhelper devscripts dput-ng gettext-base git glslang-tools libavcodec-dev libbluetooth-dev libbsd-dev libcjson-dev libdbus-1-dev libegl1-mesa-dev libeigen3-dev libgl1-mesa-dev libglvnd-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libhidapi-dev libopencv-dev libsdl2-dev libsystemd-dev libudev-dev libusb-1.0-0-dev libuvc-dev libv4l-dev libvulkan-dev libwayland-dev libx11-dev libx11-xcb-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev ninja-build pandoc patch pkg-config python3 unzip wget' @@ -121,6 +124,7 @@ ubuntu:jammy:container_prep: only: changes: - .gitlab-ci/**/* + - .gitlab-ci.yml variables: FDO_DISTRIBUTION_PACKAGES: 'build-essential ca-certificates cmake curl debhelper devscripts dput-ng gettext-base git glslang-tools libavcodec-dev libbluetooth-dev libbsd-dev libcjson-dev libdbus-1-dev libegl1-mesa-dev libeigen3-dev libgl1-mesa-dev libglvnd-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libhidapi-dev libopencv-dev libsdl2-dev libsystemd-dev libudev-dev libusb-1.0-0-dev libuvc-dev libv4l-dev libvulkan-dev libwayland-dev libx11-dev libx11-xcb-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev ninja-build pandoc patch pkg-config python3 reprepro unzip wget' @@ -133,6 +137,7 @@ arch:rolling:container_prep: only: changes: - .gitlab-ci/**/* + - .gitlab-ci.yml variables: FDO_DISTRIBUTION_PACKAGES: 'base-devel bc bluez-libs boost check clang cmake diffutils doxygen eigen ffmpeg fmt gcc git glew glfw-x11 glslang glu graphviz gtest gtk3 hidapi libbsd libusb libxrandr mesa meson ninja opencv patch pipewire-jack pkgconfig python-attrs python-setuptools python3 qt5-base v4l-utils vulkan-headers vulkan-icd-loader wayland wget wireplumber' FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/install-arch-additional-deps.sh' diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template index 383f56612..91269db66 100644 --- a/.gitlab-ci/ci.template +++ b/.gitlab-ci/ci.template @@ -75,6 +75,7 @@ stages: only: changes: - .gitlab-ci/**/* + - .gitlab-ci.yml variables: {# The packages list is actually a mapping, not an array, but the same syntax works. #} {# Needed to be a mapping so it could be "merged" #} diff --git a/.gitlab-ci/config.yml b/.gitlab-ci/config.yml index ff4e694b0..35d24733d 100644 --- a/.gitlab-ci/config.yml +++ b/.gitlab-ci/config.yml @@ -4,7 +4,7 @@ # Please run the following from the repo root after modifying this file: # make -f .gitlab-ci/ci-scripts.mk -fdo_ci_templates_sha: 9f0eb526291fe74651fe1430cbd2397f4c0a819b +fdo_ci_templates_sha: 7811ba9814a3bad379377241c6c6b62d78b20eac # These are a mapping, instead of a list/array, so we can merge. .default_debian_packages: @@ -69,7 +69,7 @@ distributions: # This image does some extra work. - codename: bullseye script: i386_and_proclamation_container_prep.sh - tag: "2022-09-20.1" + tag: "2023-04-07" deb_version_suffix: bpo11 packages: <<: *default_debian_packages @@ -116,13 +116,13 @@ distributions: distro_version: bullseye repo_suffix: ndk script: android_container_prep.sh - tag: "2022-09-20.0" - # This must match ext.sharedTargetSdk in build.gradle - android_compile_sdk: 31 + tag: "2023-04-10" + # This must match ext.sharedCompileSdk in build.gradle + android_compile_sdk: 32 # This must match buildscript.ext.buildToolsVersion in build.gradle - android_build_tools: 31.0.0 + android_build_tools: 32.0.0 # look up on https://developer.android.com/studio/index.html#downloads when updating other versions - android_cli_tools: 8512546 + android_cli_tools: 9477386 packages: git: diff --git a/.gitlab-ci/install-android-sdk.sh b/.gitlab-ci/install-android-sdk.sh index dccada250..c0c167b98 100755 --- a/.gitlab-ci/install-android-sdk.sh +++ b/.gitlab-ci/install-android-sdk.sh @@ -12,10 +12,10 @@ # Partially inspired by https://about.gitlab.com/blog/2018/10/24/setting-up-gitlab-ci-for-android-projects/ set -eo pipefail -VERSION=8512546 +VERSION=9477386 ROOT=${ROOT:-/opt/android-sdk} -ANDROID_COMPILE_SDK=${ANDROID_COMPILE_SDK:-31} -ANDROID_BUILD_TOOLS=${ANDROID_BUILD_TOOLS:-31.0.0} +ANDROID_COMPILE_SDK=${ANDROID_COMPILE_SDK:-32} +ANDROID_BUILD_TOOLS=${ANDROID_BUILD_TOOLS:-32.0.0} mkdir -p "$ROOT" FN=commandlinetools-linux-${VERSION}_latest.zip diff --git a/build.gradle b/build.gradle index 79ce8c459..ca065e988 100644 --- a/build.gradle +++ b/build.gradle @@ -1,29 +1,29 @@ -// Copyright 2020-2022, Collabora, Ltd. +// Copyright 2020-2023, Collabora, Ltd. // SPDX-License-Identifier: BSL-1.0 buildscript { ext { - kotlinVersion = '1.5.31' + kotlinVersion = '1.7.0' latestAboutLibsRelease = '8.9.4' - androidxCoreVersion = "1.3.2" + androidxCoreVersion = '1.8.0' androidxAnnotationVersion = '1.3.0' - androidxAppCompatVersion = '1.4.1' - androidxLifecycleVersion = "2.2.0" + androidxAppCompatVersion = '1.5.1' + androidxLifecycleVersion = '2.5.1' androidxConstraintLayoutVersion = '2.1.3' androidxCardViewVersion = '1.0.0' androidxRecyclerViewVersion = '1.2.1' - hiltVersion = '2.38.1' + hiltVersion = '2.44.2' - materialVersion = "1.3.0" + materialVersion = '1.8.0' // This is the version to download if we can't find it locally. eigenFetchVersion = '3.4.0' // If you update this, must also update .gitlab-ci/config.yml - buildToolsVersion = "31.0.0" + buildToolsVersion = '32.0.0' } repositories { google() @@ -57,6 +57,7 @@ plugins { ext { ndk_version = '21.4.7075529' // If you update this, must also update .gitlab-ci/config.yml + sharedCompileSdk = 32 sharedTargetSdk = 31 sharedMinSdk = 26 diff --git a/src/xrt/auxiliary/android/build.gradle b/src/xrt/auxiliary/android/build.gradle index f06a6df75..2e46456da 100644 --- a/src/xrt/auxiliary/android/build.gradle +++ b/src/xrt/auxiliary/android/build.gradle @@ -8,7 +8,7 @@ plugins { } android { - compileSdkVersion project.sharedTargetSdk + compileSdkVersion project.sharedCompileSdk buildToolsVersion buildToolsVersion defaultConfig { diff --git a/src/xrt/ipc/android/build.gradle b/src/xrt/ipc/android/build.gradle index 69a27ba75..310d46ecc 100644 --- a/src/xrt/ipc/android/build.gradle +++ b/src/xrt/ipc/android/build.gradle @@ -10,7 +10,7 @@ plugins { } android { - compileSdkVersion project.sharedTargetSdk + compileSdkVersion project.sharedCompileSdk buildToolsVersion buildToolsVersion diff --git a/src/xrt/targets/android_common/build.gradle b/src/xrt/targets/android_common/build.gradle index 12b4c7b0a..765392acc 100644 --- a/src/xrt/targets/android_common/build.gradle +++ b/src/xrt/targets/android_common/build.gradle @@ -15,7 +15,7 @@ plugins { android { - compileSdkVersion project.sharedTargetSdk + compileSdkVersion project.sharedCompileSdk buildToolsVersion buildToolsVersion defaultConfig { @@ -53,6 +53,11 @@ dependencies { implementation "androidx.constraintlayout:constraintlayout:$androidxConstraintLayoutVersion" implementation "com.google.android.material:material:$materialVersion" + // Not directly used but included to avoid version conflicts + + implementation "androidx.lifecycle:lifecycle-viewmodel:$androidxLifecycleVersion" + implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$androidxLifecycleVersion" + // for Hilt dependency injection implementation "com.google.dagger:hilt-android:$hiltVersion" kapt "com.google.dagger:hilt-compiler:$hiltVersion" diff --git a/src/xrt/targets/openxr_android/build.gradle b/src/xrt/targets/openxr_android/build.gradle index 9ba175a1f..64a91b833 100644 --- a/src/xrt/targets/openxr_android/build.gradle +++ b/src/xrt/targets/openxr_android/build.gradle @@ -96,7 +96,7 @@ if (!(new File(project.file(project.eigenIncludeDir), "Eigen/Core")).exists()) { } android { - compileSdk sharedTargetSdk + compileSdk project.sharedCompileSdk buildToolsVersion buildToolsVersion ndkVersion "${ndk_version}"