| 7 | } |
| 8 | dependencies { |
| 9 | classpath 'com.android.tools.build:gradle:8.3.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 | } |
| 18 | } |
| 19 |
| 20 | static String detectNdkVersion() { |
| 21 |
| 22 | def version = "21.4.7075529" |
| 23 |
| 24 | def androidHome = System.getenv("ANDROID_HOME") |
| 25 |
| 26 | if (androidHome == null) return version |
| 27 | if (new File(androidHome, "ndk/$version").isDirectory()) return version |
| 28 |
| 29 | def versionFile = new File(androidHome, "ndk-bundle/source.properties") |
| 30 |
| 31 | if (!versionFile.isFile()) return version |
| 32 |
| 33 | def versionProperties = new Properties() |
| 34 |
| 35 | versionProperties.load(versionFile.newDataInputStream()) |
| 36 |
| 37 | return versionProperties.getProperty("Pkg.Revision", version) |
| 38 |
| 39 | } |
| 40 |
| 41 | ext { |
| 42 |
| 43 | ndkVersion = detectNdkVersion() |
| 44 |
| 45 | } |
| 46 |
| 47 | allprojects { |
| 48 | repositories { |
| 49 | // The order in which you list these repositories matter. |
| 50 | mavenCentral() |
| 51 | google() |
| 52 | } |
| 53 | } |