| 7 | maven { url "https://plugins.gradle.org/m2/" } |
| 8 | } |
| 9 | dependencies { |
| 10 | classpath 'com.android.tools.build:gradle:4.0.0' |
| 11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72" |
| 12 | classpath 'com.google.gms:google-services:4.3.3' |
| 13 | classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0' |
| 14 | classpath 'gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.8.3' |
| 15 | } |
| 16 | } |
| 17 |
| 18 | static String detectNdkVersion() { |
| 19 |
| 20 | def version = "21.3.6528147" |
| 21 |
| 22 | def androidHome = System.getenv("ANDROID_HOME") |
| 23 |
| 24 | if (androidHome == null) return version |
| 25 |
| 26 | def versionFile = new File(androidHome,"ndk-bundle/source.properties") |
| 27 |
| 28 | if (!versionFile.isFile()) return version |
| 29 |
| 30 | def versionProperties = new Properties() |
| 31 |
| 32 | versionProperties.load(versionFile.newDataInputStream()) |
| 33 |
| 34 | return versionProperties.getProperty("Pkg.Revision",version) |
| 35 |
| 36 | } |
| 37 |
| 38 | ext { |
| 39 |
| 40 | ndkVersion = detectNdkVersion() |
| 41 |
| 42 | } |
| 43 |
| 44 | allprojects { |
| 45 | repositories { |
| 46 | // The order in which you list these repositories matter. |
| 47 | jcenter() |
| 48 | mavenCentral() |
| 49 | google() |
| 50 | } |
| 51 | } |