diff --git a/build.gradle b/build.gradle index 553fe13e7..0f51c1327 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,11 @@ -// Copyright 2020-2021, Collabora, Ltd. +// Copyright 2020-2022, Collabora, Ltd. // SPDX-License-Identifier: BSL-1.0 buildscript { ext { - kotlinVersion = '1.5.0' + kotlinVersion = '1.5.31' - // Skip 8.8.6 - see https://github.com/mikepenz/AboutLibraries/issues/648 - latestAboutLibsRelease = '8.8.5' + latestAboutLibsRelease = '8.9.4' androidxCoreVersion = "1.3.2" androidxAnnotationVersion = '1.3.0' @@ -16,9 +15,9 @@ buildscript { androidxCardViewVersion = '1.0.0' androidxRecyclerViewVersion = '1.2.1' - hiltVersion = '2.35.1' + hiltVersion = '2.37' - materialVersion = '1.5.0' + materialVersion = "1.3.0" // This is the version to download if we can't find it locally. eigenFetchVersion = '3.4.0' @@ -29,29 +28,35 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.2.1' - //noinspection DifferentKotlinGradleVersion - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${latestAboutLibsRelease}" classpath 'com.quittle:svg-2-android-vector:0.0.5' classpath "com.google.dagger:hilt-android-gradle-plugin:$hiltVersion" - } } plugins { + // Android Gradle Plugin + id 'com.android.application' version '7.0.4' apply false + id 'com.android.library' version '7.0.4' apply false + + id 'org.jetbrains.kotlin.android' version "$kotlinVersion" apply false + // Used for getting the eigen dir, explicit python binary, etc. from local.properties id 'com.github.b3er.local.properties' version '1.1' // For getting git describe data and formatting it how Android wants. - id "com.gladed.androidgitversion" version "0.4.13" + // "apply false" caused gradle error so skipping for now. + id "com.gladed.androidgitversion" version "0.4.14" // For downloading e.g. the CDDL (for transitive dependencies of hilt) - id "de.undercouch.download" version "4.1.1" + id "de.undercouch.download" version "4.1.2" apply false + + // So we don't have to check in generated files: we start with SVGs for vector art. + id "com.quittle.svg-2-android-vector" version "0.0.6" apply false } ext { ndk_version = '21.4.7075529' - sharedTargetSdk = 30 + sharedTargetSdk = 31 sharedMinSdk = 26 // If you are building on Windows, you will need to explicitly set eigenIncludeDir in your @@ -62,10 +67,3 @@ ext { // Python 3 explicitly in local.properties with a property named "pythonBinary" pythonBinary = project.findProperty('pythonBinary') } - -allprojects { - repositories { - google() - mavenCentral() - } -} diff --git a/settings.gradle b/settings.gradle index 611a6d5f5..9fb985179 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,6 +1,26 @@ -// Copyright 2020, Collabora, Ltd. +// Copyright 2020-2022, Collabora, Ltd. // SPDX-License-Identifier: BSL-1.0 +pluginManagement { + + repositories { + gradlePluginPortal() + google() + mavenCentral() + } +} + +dependencyResolutionManagement { + + // This triggers an error if any individual project tries to add a repo not listed here. + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} + + rootProject.name = 'monado' include ':src:xrt:auxiliary:android' diff --git a/src/xrt/auxiliary/android/build.gradle b/src/xrt/auxiliary/android/build.gradle index 95512bebd..7b876e589 100644 --- a/src/xrt/auxiliary/android/build.gradle +++ b/src/xrt/auxiliary/android/build.gradle @@ -1,4 +1,4 @@ -// Copyright 2020, Collabora, Ltd. +// Copyright 2020-2022, Collabora, Ltd. // SPDX-License-Identifier: BSL-1.0 plugins { @@ -9,7 +9,7 @@ plugins { android { compileSdkVersion project.sharedTargetSdk - buildToolsVersion '30.0.3' + buildToolsVersion buildToolsVersion defaultConfig { minSdkVersion 24 diff --git a/src/xrt/ipc/android/build.gradle b/src/xrt/ipc/android/build.gradle index 176150e73..2fd655566 100644 --- a/src/xrt/ipc/android/build.gradle +++ b/src/xrt/ipc/android/build.gradle @@ -1,4 +1,4 @@ -// Copyright 2020, Collabora, Ltd. +// Copyright 2020-2022, Collabora, Ltd. // SPDX-License-Identifier: BSL-1.0 plugins { @@ -11,7 +11,7 @@ plugins { android { compileSdkVersion project.sharedTargetSdk - buildToolsVersion '30.0.3' + buildToolsVersion buildToolsVersion defaultConfig { diff --git a/src/xrt/targets/android_common/build.gradle b/src/xrt/targets/android_common/build.gradle index fe72fe61e..4cbaa4ad1 100644 --- a/src/xrt/targets/android_common/build.gradle +++ b/src/xrt/targets/android_common/build.gradle @@ -1,4 +1,4 @@ -// Copyright 2020, Collabora, Ltd. +// Copyright 2020-2022, Collabora, Ltd. // SPDX-License-Identifier: BSL-1.0 plugins { @@ -16,7 +16,7 @@ plugins { android { compileSdkVersion project.sharedTargetSdk - buildToolsVersion '30.0.3' + buildToolsVersion buildToolsVersion defaultConfig { minSdkVersion project.sharedMinSdk diff --git a/src/xrt/targets/openxr_android/build.gradle b/src/xrt/targets/openxr_android/build.gradle index d3b58ddb1..67c0c3894 100644 --- a/src/xrt/targets/openxr_android/build.gradle +++ b/src/xrt/targets/openxr_android/build.gradle @@ -1,4 +1,4 @@ -// Copyright 2020, Collabora, Ltd. +// Copyright 2020-2022, Collabora, Ltd. // SPDX-License-Identifier: BSL-1.0 import groovy.xml.XmlUtil @@ -8,6 +8,9 @@ plugins { id 'com.mikepenz.aboutlibraries.plugin' + id "com.gladed.androidgitversion" + id "de.undercouch.download" + // Hilt dependency injection id 'kotlin-kapt' id 'dagger.hilt.android.plugin' @@ -93,8 +96,8 @@ if (!(new File(project.file(project.eigenIncludeDir), "Eigen/Core")).exists()) { } android { - compileSdkVersion project.sharedTargetSdk - buildToolsVersion '30.0.3' + compileSdk sharedTargetSdk + buildToolsVersion buildToolsVersion ndkVersion "${ndk_version}"