The open source OpenXR runtime
1// Copyright 2020-2023, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3
4buildscript {
5 ext {
6 kotlinVersion = '2.0.0'
7
8 latestAboutLibsRelease = '11.2.2'
9
10 androidxCoreVersion = '1.15.0'
11 androidxAnnotationVersion = '1.8.0'
12 androidxAppCompatVersion = '1.7.0'
13 androidxLifecycleVersion = '2.8.2'
14 androidxConstraintLayoutVersion = '2.1.4'
15 androidxCardViewVersion = '1.0.0'
16 androidxRecyclerViewVersion = '1.3.2'
17
18 hiltVersion = '2.51.1'
19
20 materialVersion = '1.12.0'
21
22 // This is the version to download if we can't find it locally.
23 eigenFetchVersion = '5.0.0'
24
25 // If you update this, must also update .gitlab-ci/config.yml
26 buildToolsVersion = '34.0.0'
27
28 // ktfmt version
29 ktfmtVersion = "0.53"
30
31 // Google Cardboard QR Code scan
32 barcodeScannerViewVersion = "1.6.4"
33 }
34 repositories {
35 google()
36 mavenCentral()
37 }
38 dependencies {
39 classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${latestAboutLibsRelease}"
40 classpath "com.google.dagger:hilt-android-gradle-plugin:$hiltVersion"
41 }
42}
43plugins {
44 // Android Gradle Plugin
45 id 'com.android.application' version '8.6.0' apply false
46 id 'com.android.library' version '8.6.0' apply false
47
48 id 'org.jetbrains.kotlin.android' version "$kotlinVersion" apply false
49
50 // Used for getting the eigen dir, explicit python binary, etc. from local.properties
51 id 'com.github.b3er.local.properties' version '1.1'
52
53 // For getting git describe data and formatting it how Android wants.
54 id "com.gladed.androidgitversion" version "0.4.14"
55
56 // For downloading e.g. the CDDL (for transitive dependencies of hilt)
57 id "de.undercouch.download" version "4.1.2"
58
59 // So we don't have to check in generated files: we start with SVGs for vector art.
60 id "com.quittle.svg-2-android-vector" version "0.1.0" apply false
61
62 // Spotless for Java and Kotlin's code formatting
63 id 'com.diffplug.spotless' version "6.22.0"
64}
65
66spotless {
67 format 'misc', {
68 // define the files to apply `misc` to
69 target '*.gradle', '*.md', '.gitignore'
70
71 // define the steps to apply to those files
72 trimTrailingWhitespace()
73 indentWithSpaces(4)
74 endWithNewline()
75 }
76}
77
78ext {
79 cmake_version = '3.22.1'
80 ndk_version = '26.3.11579264'
81 // If you update this, must also update .gitlab-ci/config.yml
82 sharedCompileSdk = 35
83 sharedTargetSdk = 31
84 sharedMinSdk = 26
85
86 // If you are building on Windows, you will need to explicitly set eigenCMakeDir in your
87 // local.properties file since the default value provided below only makes sense on *nix
88 eigenCMakeDir = project.findProperty('eigenCMakeDir') ?: '/usr/share/eigen3/cmake'
89
90 // If you're having trouble with a "can't find python" CMake error, you can specify the path to
91 // Python 3 explicitly in local.properties with a property named "pythonBinary"
92 pythonBinary = project.findProperty('pythonBinary')
93}