Pilldroid/app/build.gradle

96 lines
2.6 KiB
Groovy
Raw Normal View History

2018-09-27 19:16:52 +02:00
//noinspection GradleCompatible
apply plugin: 'com.android.application'
2021-04-06 17:35:38 +02:00
ext.versionMajor = 0
ext.versionMinor = 0
ext.versionPatch = 20210513
ext.versionClassifier = null
2021-04-06 17:35:38 +02:00
ext.isSnapshot = false
2021-04-09 20:32:43 +02:00
ext.minimumSdkVersion = defaultMinSdkVersion
ext.git_version= ("git rev-parse --short HEAD".execute().text.trim())
android {
2020-09-11 21:49:51 +02:00
compileSdkVersion 29
2020-10-03 23:12:47 +02:00
defaultConfig {
applicationId "net.foucry.pilldroid"
2020-05-11 20:49:29 +02:00
minSdkVersion defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion
versionCode generateVersionCode() // 190010203
versionName generateVersionName() // 1.2.3-SNAPSHOT
2021-04-12 21:11:50 +02:00
multiDexEnabled true
}
2020-10-03 23:12:47 +02:00
buildTypes {
release {
minifyEnabled false
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
2016-11-01 23:17:06 +01:00
productFlavors {
}
2018-09-27 19:16:52 +02:00
compileOptions {
2021-04-12 21:11:50 +02:00
coreLibraryDesugaringEnabled true
2020-04-12 19:57:10 +02:00
sourceCompatibility JavaVersion.VERSION_1_8
2018-09-27 19:16:52 +02:00
targetCompatibility JavaVersion.VERSION_1_8
}
2019-09-18 23:01:42 +02:00
/*dexOptions {
2019-09-12 18:39:03 +02:00
incremental false
2019-09-18 23:01:42 +02:00
}*/
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
2020-05-16 19:47:21 +02:00
repositories {
2021-04-12 21:11:50 +02:00
mavenCentral()
2020-05-16 19:47:21 +02:00
}
2020-05-18 19:08:48 +02:00
sourceSets {
main {
java {
exclude 'net/foucry/pilldroid/scanActivity.java'
}
}
}
dependencies {
2019-09-18 23:01:42 +02:00
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
2020-05-11 20:49:29 +02:00
implementation 'androidx.appcompat:appcompat:1.2.0'
2021-06-18 20:07:24 +02:00
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.4.0'
2020-05-16 19:47:21 +02:00
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
2020-05-11 20:49:29 +02:00
2020-05-16 19:47:21 +02:00
implementation 'com.journeyapps:zxing-android-embedded:4.1.0'
implementation 'androidx.core:core:1.6.0'
2020-09-30 17:55:52 +02:00
// debugImplementation 'com.amitshekhar.android:debug-db:1.0.6'
2021-04-12 21:11:50 +02:00
2021-06-18 20:07:24 +02:00
implementation 'io.sentry:sentry-android:4.3.0'
2021-04-12 21:11:50 +02:00
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}
2021-03-13 10:08:29 +01:00
private Integer generateVersionCode() {
return ext.minimumSdkVersion * 10000000 + ext.versionMajor * 10000 + ext.versionMinor * 100 + ext.versionPatch
}
private String generateVersionName() {
String versionName = "${ext.versionMajor}.${ext.versionMinor}.${ext.versionPatch}"
if (ext.versionClassifier == null && ext.isSnapshot) {
ext.versionClassifier = "SNAPSHOT"
}
if (ext.versionClassifier != null) {
versionName += "-" + ext.versionClassifier
}
if (ext.git_version != null) {
versionName += "-" + ext.git_version
}
2021-03-13 10:02:58 +01:00
print "Version name = " + versionName
2021-03-13 10:02:58 +01:00
return versionName
}