Pilldroid/app/build.gradle

125 lines
4 KiB
Groovy
Raw Normal View History

2018-09-27 19:16:52 +02:00
//noinspection GradleCompatible
apply plugin: 'com.android.application'
2022-01-01 18:47:19 +01:00
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
android {
2021-10-03 13:57:11 +02:00
signingConfigs {
release {
2022-01-17 11:23:02 +01:00
storeFile rootProject.file("android-signing-keystore.jks")
2022-01-12 08:17:10 +01:00
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_release_alias_key']
keyPassword secretProperties['signing_release_key_password']
2021-10-03 13:57:11 +02:00
}
2021-11-20 10:44:01 +01:00
prerelease {
2022-01-17 11:23:02 +01:00
storeFile rootProject.file("android-signing-keystore.jks")
2022-01-01 18:47:19 +01:00
storePassword secretProperties['signing_keystore_password']
2022-01-12 08:17:10 +01:00
keyAlias secretProperties['signing_pre-release_key_alias']
keyPassword secretProperties['signing_pre-release_key_password']
2021-11-20 10:44:01 +01:00
}
2021-10-03 13:57:11 +02:00
}
compileSdkVersion 31
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
2022-01-31 21:05:12 +01:00
versionCode 100
2022-01-18 21:46:56 +01:00
versionName "v0.100-beta"
2021-04-12 21:11:50 +02:00
multiDexEnabled true
}
2020-10-03 23:12:47 +02:00
buildTypes {
2021-11-20 10:44:01 +01:00
debug {
minifyEnabled false
debuggable true
applicationIdSuffix ".debug"
}
release {
2021-11-20 10:44:01 +01:00
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
2022-01-12 08:17:10 +01:00
signingConfig signingConfigs.release
2021-11-20 10:44:01 +01:00
}
prerelease {
minifyEnabled false
2021-10-03 13:57:11 +02:00
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2021-11-20 10:44:01 +01:00
debuggable false
signingConfig signingConfigs.prerelease
}
}
flavorDimensions "version"
productFlavors {
dev {
resValue "string", "app_name", "PillDroid dev"
dimension ="version"
}
product {
resValue "string", "app_name", "PillDroid"
dimension ="version"
}
preproduct {
resValue "string", "app_name", "PillDroid Pre-Release"
dimension ="version"
}
}
2021-10-03 13:57:11 +02:00
2018-09-27 19:16:52 +02:00
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
2018-09-27 19:16:52 +02:00
}
2022-01-15 19:51:17 +01:00
buildToolsVersion '32.0.0'
2021-10-03 13:57:11 +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 {
2022-03-07 22:07:50 +01:00
implementation 'androidx.room:room-common:2.4.2'
annotationProcessor 'androidx.room:room-compiler:2.4.2'
2022-03-07 18:18:55 +01:00
def room_version = "2.4.2"
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
2022-02-08 07:47:07 +01:00
implementation 'androidx.appcompat:appcompat:1.4.1'
2021-06-18 20:07:24 +02:00
implementation 'androidx.recyclerview:recyclerview:1.2.1'
2022-02-08 07:47:07 +01:00
implementation 'com.google.android.material:material:1.5.0'
2020-05-16 19:47:21 +02:00
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
2022-03-07 18:18:55 +01:00
implementation "androidx:room:room-runtime:$room_version"
2021-11-20 10:44:01 +01:00
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
2022-02-08 07:47:07 +01:00
implementation 'androidx.core:core:1.7.0'
2020-09-30 17:55:52 +02:00
2022-03-07 18:18:55 +01:00
implementation "androidx:room:room-runtime:$room_version"
implementation "androidx.room:room-rxjava3:$room_version"
testImplementation "androidx.room:room-testing:$room_version"
2021-04-12 21:11:50 +02:00
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}