mirror of
https://github.com/NekoX-Dev/NekoX.git
synced 2024-11-29 16:40:13 +01:00
53 lines
1.5 KiB
Groovy
53 lines
1.5 KiB
Groovy
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
google()
|
|
maven { url "https://plugins.gradle.org/m2/" }
|
|
}
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:7.3.1'
|
|
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21'
|
|
classpath 'com.google.gms:google-services:4.3.14'
|
|
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
|
|
classpath 'gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.9.0'
|
|
//noinspection GradleDependency
|
|
classpath "com.github.triplet.gradle:play-publisher:3.6.0"
|
|
classpath 'cn.hutool:hutool-core:5.7.13'
|
|
}
|
|
}
|
|
|
|
static String detectNdkVersion() {
|
|
|
|
def version = "21.4.7075529"
|
|
|
|
def androidHome = System.getenv("ANDROID_HOME")
|
|
|
|
if (androidHome == null) return version
|
|
if (new File(androidHome, "ndk/$version").isDirectory()) return version
|
|
|
|
def versionFile = new File(androidHome, "ndk-bundle/source.properties")
|
|
|
|
if (!versionFile.isFile()) return version
|
|
|
|
def versionProperties = new Properties()
|
|
|
|
versionProperties.load(versionFile.newDataInputStream())
|
|
|
|
return versionProperties.getProperty("Pkg.Revision", version)
|
|
|
|
}
|
|
|
|
ext {
|
|
|
|
ndkVersion = detectNdkVersion()
|
|
|
|
}
|
|
|
|
allprojects {
|
|
repositories {
|
|
// The order in which you list these repositories matter.
|
|
mavenCentral()
|
|
google()
|
|
}
|
|
} |