apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' import org.ajoberstar.grgit.Grgit ext { git = Grgit.open() gitVersionCode = git.tag.list().size() gitVersionName = "${git.describe()}" } //return a BuildConfigField from a properties file. def static getBuildConfigField(String property){ def travisBuild = System.getenv("TRAVIS") == "true" def value if(travisBuild) { value = "\"" + System.getenv(property) + "\"" } else { Properties properties = new Properties() properties.load(new FileInputStream("keystore.properties")) value = "\"" + properties.getProperty(property) + "\"" } return value } def build_param = "${build}" if (build_param != "prod") { //exclude development build android.variantFilter { variant -> if (variant.buildType.name == 'prod') { variant.setIgnore(true) } } } else { //exclude all except development build android.variantFilter { variant -> if (variant.buildType.name != 'prod') { variant.setIgnore(true) } } } android { compileSdkVersion "android-30" buildToolsVersion '30.0.2' compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } dexOptions { maxProcessCount=2 javaMaxHeapSize "2g" } lintOptions { abortOnError false } defaultConfig { applicationId "es.ugr.swad.swadroid" versionCode gitVersionCode versionName gitVersionName minSdkVersion 24 targetSdkVersion 30 testApplicationId "es.ugr.swad.swadroid.test" testInstrumentationRunner "android.test.InstrumentationTestRunner" buildConfigField "String", "SWAD_APP_KEY", getBuildConfigField("SWAD_APP_KEY") } buildTypes { prod { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'com.google.code.ksoap2-android:ksoap2-android:3.6.4' implementation 'commons-io:commons-io:2.8.0' implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5' implementation 'com.journeyapps:zxing-android-embedded:4.1.0@aar' implementation 'com.google.zxing:core:3.4.1' implementation 'com.google.code.gson:gson:2.8.6' implementation 'com.google.firebase:firebase-core:17.5.1' implementation 'com.google.android.material:material:1.2.1' implementation platform('com.google.firebase:firebase-bom:25.12.0') implementation 'com.google.firebase:firebase-analytics' }