// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() mavenCentral() } dependencies { // This declares the "Android Gradle plugin" version // (not Gradle version, which is visible in gradle/wrapper/gradle-wrapper.properties). // // We used to support older Android Gradle plugin 3.1.0: // // We use the latest "Android Gradle plugin" version that still works with Gradle // in current Debian testing / unstable // (https://packages.debian.org/search?keywords=gradle), 4.4.1 currently. // This allows to replace our Gradle wrapper // with the Gradle from Debian package, if needed. // See https://developer.android.com/studio/releases/gradle-plugin.html#updating-gradle // // Unfortunately this is no longer possible, as new ndk-bundle from Google doesn't // contains platforms subdirectory (see // https://github.com/android/ndk/wiki/Changelog-r21 // https://android.googlesource.com/platform/ndk/+/master/docs/BuildSystemMaintainers.md // ) and this breaks older Android Gradle plugin versions (at least 3.1.0-3.3.3) // with error message "NDK is missing a "platforms" directory.". // // Later we needed to upgrade 4.1.0 -> 7.4.2 to use latest cmake, // that has target_link_options . classpath 'com.android.tools.build:gradle:8.1.0' // Do not change the line below, it is necessary for build.gradle merging to work. // MERGE-DEPENDENCIES } } allprojects { // -Xlint:unchecked, -Xlint:deprecation: // To enable extra warnings, following // http://stackoverflow.com/questions/18689365/how-to-add-xlintunchecked-to-my-android-gradle-based-project // // -Xlint:-options: To disable these warnings (twice) // warning: [options] source value 8 is obsolete and will be removed in a future release // Emitted by something during building (not caused by our "sourceCompatibility 1.8"), // seem harmless for now, ignoring. gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-Xlint:-options" } } repositories { google() mavenCentral() // To be able to compile aar in libs/ , following // http://stackoverflow.com/questions/16682847/how-to-manually-include-external-aar-package-using-new-gradle-android-build-syst // Commented out: we no longer need aar support for anything, // and Android Gradle 7.4.2 warns that flatDir is deprecated. /* flatDir { dirs 'libs' } */ // Do not change the line below, it is necessary for build.gradle merging to work. // MERGE-REPOSITORIES } }