12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- // Top-level build file where you can add configuration options common to all sub-projects/modules.
- buildscript {
- repositories {
- google()
- maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:4.0.1'
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
- }
- allprojects {
- repositories {
- google()
- mavenCentral()
- maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
- maven { url 'http://developer.huawei.com/repo/' }
- maven { url "https://jitpack.io" }
- jcenter()
- }
- }
- task clean(type: Delete) {
- delete rootProject.buildDir
- }
- ext {
- compileSdkVersion = 31
- buildToolsVersion = "30.0.0"
- minSdkVersion = 21
- targetSdkVersion = 30
- ndkAbis = [
- 'armeabi-v7a',
- 'x86',
- 'arm64-v8a',
- 'x86_64'
- ]
- AppKey = ''
- BaseUrl = ''
- }
- def loadLocalConfig() {
- String env = System.getProperty("env", "test")
- if (env != "test") env = "online"
- println "env=$env"
- def propertiesFile = file("config/${env}.properties")
- if (!propertiesFile.exists()) {
- println "Local properties don't exist."
- return
- }
- Properties config = new Properties()
- config.load(propertiesFile.newInputStream())
- this.AppKey = config.getProperty('APP_KEY')
- this.BaseUrl = config.getProperty('BASE_URL')
- }
- loadLocalConfig()
|