Amab
18b254da46
All checks were successful
continuous-integration/drone/push Build is passing
## What changes were proposed in this pull request? * Update dependencies ## How was this patch tested? Manually. Reviewed-on: #422 Co-authored-by: Amab <juanmi1982@gmail.com> Co-committed-by: Amab <juanmi1982@gmail.com>
87 lines
2.4 KiB
Groovy
87 lines
2.4 KiB
Groovy
plugins {
|
|
id 'com.gladed.androidgitversion' version '0.4.14'
|
|
}
|
|
apply plugin: 'com.android.application'
|
|
|
|
//return a BuildConfigField from a properties file.
|
|
def static getBuildConfigField(String property){
|
|
def propFile = new File("keystore.properties")
|
|
def value
|
|
|
|
if(propFile.exists()) {
|
|
Properties properties = new Properties()
|
|
properties.load(new FileInputStream(propFile))
|
|
value = "\"" + properties.getProperty(property) + "\""
|
|
} else {
|
|
value = "\"" + System.getenv(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 {
|
|
namespace 'es.ugr.swad.swadroid'
|
|
compileSdk 34
|
|
buildToolsVersion "34.0.0"
|
|
|
|
lint {
|
|
abortOnError false
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
targetCompatibility JavaVersion.VERSION_11
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId "es.ugr.swad.swadroid"
|
|
versionName androidGitVersion.name()
|
|
versionCode androidGitVersion.code()
|
|
|
|
minSdkVersion 24
|
|
targetSdkVersion 34
|
|
|
|
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.6.1'
|
|
implementation 'com.google.code.ksoap2-android:ksoap2-android:3.6.4'
|
|
implementation 'commons-io:commons-io:2.11.0'
|
|
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
|
|
implementation 'com.journeyapps:zxing-android-embedded:4.3.0@aar'
|
|
implementation 'com.google.zxing:core:3.5.2'
|
|
implementation 'com.google.code.gson:gson:2.10.1'
|
|
implementation 'com.google.android.material:material:1.9.0'
|
|
}
|