| 7 | } |
| 8 | dependencies { |
| 9 | classpath 'com.android.tools.build:gradle:8.6.1' |
| 10 | classpath 'com.google.gms:google-services:4.3.15' |
| 11 | // classpath 'com.huawei.agconnect:agcp:1.9.1.301' |
| 12 | classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.0' |
| 13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.0" |
| 14 |
| 15 | //noinspection GradleDependency |
| 16 | classpath 'cn.hutool:hutool-core:5.7.13' |
| 17 | classpath "io.sentry:sentry-android-gradle-plugin:5.12.2" |
| 18 | // db |
| 19 | classpath "io.objectbox:objectbox-gradle-plugin:5.0.1" |
| 20 | } |
| 21 | } |
| 22 |
| 23 | static String detectNdkVersion() { |
| 24 |
| 25 | def version = "21.4.7075529" |
| 26 |
| 27 | def androidHome = System.getenv("ANDROID_HOME") |
| 28 |
| 29 | if (androidHome == null) return version |
| 30 | if (new File(androidHome, "ndk/$version").isDirectory()) return version |
| 31 |
| 32 | def versionFile = new File(androidHome, "ndk-bundle/source.properties") |
| 33 |
| 34 | if (!versionFile.isFile()) return version |
| 35 |
| 36 | def versionProperties = new Properties() |
| 37 |
| 38 | versionProperties.load(versionFile.newDataInputStream()) |
| 39 |
| 40 | return versionProperties.getProperty("Pkg.Revision", version) |
| 41 |
| 42 | } |
| 43 |
| 44 | ext { |
| 45 |
| 46 | ndkVersion = detectNdkVersion() |
| 47 |
| 48 | } |
| 49 |
| 50 | allprojects { |
| 51 | repositories { |
| 52 | // The order in which you list these repositories matter. |
| 53 | mavenCentral() |
| 54 | google() |
| 55 | } |
| 56 | } |