2018-09-27 19:16:52 +02:00
|
|
|
//noinspection GradleCompatible
|
2016-05-19 07:37:28 +02:00
|
|
|
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')}")
|
|
|
|
}
|
|
|
|
|
2016-05-19 07:37:28 +02:00
|
|
|
android {
|
2021-10-03 13:57:11 +02:00
|
|
|
signingConfigs {
|
|
|
|
release {
|
2022-06-29 20:27:36 +02:00
|
|
|
storeFile file("../android-signing-keystore.jks")
|
|
|
|
storePassword secretProperties['signing_keystore_password']
|
|
|
|
keyAlias secretProperties['signing_key_alias']
|
|
|
|
keyPassword secretProperties['signing_key_password']
|
2021-10-03 13:57:11 +02:00
|
|
|
}
|
2021-11-20 10:44:01 +01:00
|
|
|
prerelease {
|
2022-05-30 22:36:03 +02:00
|
|
|
storeFile file("../android-signing-keystore.jks")
|
2022-01-01 18:47:19 +01:00
|
|
|
storePassword secretProperties['signing_keystore_password']
|
2022-05-30 22:36:03 +02:00
|
|
|
keyAlias secretProperties['signing_key_alias']
|
|
|
|
keyPassword secretProperties['signing_key_password']
|
2021-11-20 10:44:01 +01:00
|
|
|
}
|
2021-10-03 13:57:11 +02:00
|
|
|
}
|
2022-10-05 10:18:51 +02:00
|
|
|
compileSdk 33
|
2020-10-03 23:12:47 +02:00
|
|
|
|
2016-05-19 07:37:28 +02:00
|
|
|
defaultConfig {
|
|
|
|
applicationId "net.foucry.pilldroid"
|
2020-05-11 20:49:29 +02:00
|
|
|
minSdkVersion defaultMinSdkVersion
|
|
|
|
targetSdkVersion defaultTargetSdkVersion
|
2022-08-01 09:11:16 +02:00
|
|
|
versionCode 302
|
|
|
|
versionName "v0.302-beta"
|
2021-04-12 21:11:50 +02:00
|
|
|
multiDexEnabled true
|
2022-03-08 19:46:20 +01:00
|
|
|
javaCompileOptions {
|
|
|
|
annotationProcessorOptions {
|
|
|
|
arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
|
|
|
|
}
|
|
|
|
}
|
2016-05-19 07:37:28 +02:00
|
|
|
}
|
2020-10-03 23:12:47 +02:00
|
|
|
|
2016-05-19 07:37:28 +02:00
|
|
|
buildTypes {
|
2021-11-20 10:44:01 +01:00
|
|
|
debug {
|
|
|
|
minifyEnabled false
|
|
|
|
debuggable true
|
|
|
|
applicationIdSuffix ".debug"
|
|
|
|
}
|
2016-05-19 07:37:28 +02:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
flavorDimensions "version"
|
|
|
|
productFlavors {
|
|
|
|
dev {
|
|
|
|
resValue "string", "app_name", "PillDroid dev"
|
|
|
|
dimension ="version"
|
|
|
|
}
|
|
|
|
|
|
|
|
product {
|
|
|
|
resValue "string", "app_name", "PillDroid"
|
|
|
|
dimension ="version"
|
|
|
|
}
|
2016-05-19 07:37:28 +02:00
|
|
|
}
|
2021-10-03 13:57:11 +02:00
|
|
|
|
2018-09-27 19:16:52 +02:00
|
|
|
compileOptions {
|
2022-01-14 20:04:18 +01:00
|
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
|
|
targetCompatibility JavaVersion.VERSION_11
|
2018-09-27 19:16:52 +02:00
|
|
|
}
|
2022-01-28 15:52:55 +01:00
|
|
|
|
2022-05-30 22:36:03 +02:00
|
|
|
buildToolsVersion = "32.0.0"
|
2021-10-03 13:57:11 +02:00
|
|
|
|
2020-05-09 15:22:03 +02:00
|
|
|
allprojects {
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
|
|
|
|
}
|
|
|
|
}
|
2016-05-19 07:37:28 +02:00
|
|
|
}
|
|
|
|
|
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'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-05-19 07:37:28 +02:00
|
|
|
dependencies {
|
2022-10-05 10:18:51 +02:00
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
|
|
|
implementation "androidx.room:room-common:2.4.3"
|
|
|
|
annotationProcessor "androidx.room:room-compiler:2.4.3"
|
|
|
|
implementation "androidx.room:room-testing:2.4.3"
|
|
|
|
implementation "androidx.room:room-rxjava3:2.4.3"
|
|
|
|
implementation "androidx.room:room-runtime:2.4.3"
|
2022-03-08 19:46:20 +01:00
|
|
|
|
2019-09-18 23:01:42 +02:00
|
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
2021-03-12 14:02:17 +01:00
|
|
|
testImplementation 'junit:junit:4.13.2'
|
2020-05-11 20:49:29 +02:00
|
|
|
|
2022-10-05 10:18:51 +02:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.5.1'
|
2021-06-18 20:07:24 +02:00
|
|
|
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
2022-07-06 11:28:07 +02:00
|
|
|
implementation 'com.google.android.material:material:1.6.1'
|
2020-05-16 19:47:21 +02:00
|
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
2021-11-20 10:44:01 +01:00
|
|
|
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
|
2022-10-05 10:18:51 +02:00
|
|
|
implementation 'androidx.core:core:1.9.0'
|
2020-09-30 17:55:52 +02:00
|
|
|
|
2022-10-05 10:18:51 +02:00
|
|
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.0'
|
2022-05-30 22:36:03 +02:00
|
|
|
}
|