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