Debian Codegraph @

tools/build-tool/data/android/integrated/build.gradle

raw
1 // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 buildscript {
3 repositories {
4 google()
5 mavenCentral()
6 }
7 dependencies {
8 // This declares the "Android Gradle plugin" version
9 // (not Gradle version, which is visible in gradle/wrapper/gradle-wrapper.properties).
10 //
11 // We used to support older Android Gradle plugin 3.1.0:
12 //
13 // We use the latest "Android Gradle plugin" version that still works with Gradle
14 // in current Debian testing / unstable
15 // (https://packages.debian.org/search?keywords=gradle), 4.4.1 currently.
16 // This allows to replace our Gradle wrapper
17 // with the Gradle from Debian package, if needed.
18 // See https://developer.android.com/studio/releases/gradle-plugin.html#updating-gradle
19 //
20 // Unfortunately this is no longer possible, as new ndk-bundle from Google doesn't
21 // contains platforms subdirectory (see
22 // https://github.com/android/ndk/wiki/Changelog-r21
23 // https://android.googlesource.com/platform/ndk/+/master/docs/BuildSystemMaintainers.md
24 // ) and this breaks older Android Gradle plugin versions (at least 3.1.0-3.3.3)
25 // with error message "NDK is missing a "platforms" directory.".
26 //
27 // Later we needed to upgrade 4.1.0 -> 7.4.2 to use latest cmake,
28 // that has target_link_options .
29 classpath 'com.android.tools.build:gradle:8.1.0'
30
31 // Do not change the line below, it is necessary for build.gradle merging to work.
32 // MERGE-DEPENDENCIES
33 }
34 }
35
36 allprojects {
37 // -Xlint:unchecked, -Xlint:deprecation:
38 // To enable extra warnings, following
39 // http://stackoverflow.com/questions/18689365/how-to-add-xlintunchecked-to-my-android-gradle-based-project
40 //
41 // -Xlint:-options: To disable these warnings (twice)
42 // warning: [options] source value 8 is obsolete and will be removed in a future release
43 // Emitted by something during building (not caused by our "sourceCompatibility 1.8"),
44 // seem harmless for now, ignoring.
45 gradle.projectsEvaluated {
46 tasks.withType(JavaCompile) {
47 options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-Xlint:-options"
48 }
49 }
50
51 repositories {
52 google()
53 mavenCentral()
54
55 // To be able to compile aar in libs/ , following
56 // http://stackoverflow.com/questions/16682847/how-to-manually-include-external-aar-package-using-new-gradle-android-build-syst
57 // Commented out: we no longer need aar support for anything,
58 // and Android Gradle 7.4.2 warns that flatDir is deprecated.
59 /*
60 flatDir {
61 dirs 'libs'
62 }
63 */
64
65 // Do not change the line below, it is necessary for build.gradle merging to work.
66 // MERGE-REPOSITORIES
67 }
68 }