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 {
|
2023-01-09 17:24:51 +01:00
|
|
|
storeFile rootProject.file("android-signing-keystore.jks")
|
2022-06-29 20:27:36 +02:00
|
|
|
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
|
|
|
}
|
2023-09-22 18:41:19 +02:00
|
|
|
compileSdk 34
|
2020-10-03 23:12:47 +02:00
|
|
|
|
2016-05-19 07:37:28 +02:00
|
|
|
defaultConfig {
|
|
|
|
applicationId "net.foucry.pilldroid"
|
2024-03-26 21:20:53 +01:00
|
|
|
minSdk defaultMinSdkVersion
|
|
|
|
targetSdk defaultTargetSdkVersion
|
2022-08-01 09:11:16 +02:00
|
|
|
versionCode 302
|
|
|
|
versionName "v0.302-beta"
|
2022-03-08 19:46:20 +01:00
|
|
|
javaCompileOptions {
|
|
|
|
annotationProcessorOptions {
|
|
|
|
arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
|
|
|
|
}
|
|
|
|
}
|
2016-05-19 07:37:28 +02:00
|
|
|
}
|
2024-03-29 16:08:42 +01:00
|
|
|
buildFeatures {
|
|
|
|
buildConfig = true
|
|
|
|
}
|
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
|
|
|
}
|
|
|
|
}
|
2024-03-26 21:20:53 +01:00
|
|
|
flavorDimensions = ["version"]
|
2021-11-20 10:44:01 +01:00
|
|
|
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-11-26 20:01:25 +01:00
|
|
|
namespace 'net.foucry.pilldroid'
|
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 {
|
2023-07-13 22:18:21 +02:00
|
|
|
exclude 'net/foucry/pilldroid/ViewDialog.java'
|
2020-05-18 19:08:48 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-04-17 20:01:13 +02:00
|
|
|
|
2016-05-19 07:37:28 +02:00
|
|
|
dependencies {
|
2022-10-05 10:18:51 +02:00
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
2024-04-17 20:01:13 +02:00
|
|
|
implementation "androidx.room:room-common:2.6.1"
|
|
|
|
annotationProcessor "androidx.room:room-compiler:2.6.1"
|
|
|
|
implementation "androidx.room:room-testing:2.6.1"
|
|
|
|
implementation "androidx.room:room-rxjava3:2.6.1"
|
|
|
|
implementation "androidx.room:room-runtime:2.6.1"
|
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
|
|
|
|
2023-09-22 18:41:19 +02:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
2024-04-17 20:01:13 +02:00
|
|
|
implementation 'androidx.recyclerview:recyclerview:1.3.2'
|
|
|
|
implementation 'com.google.android.material:material:1.11.0'
|
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'
|
2024-04-17 20:01:13 +02:00
|
|
|
implementation 'androidx.core:core:1.12.0'
|
2024-06-11 20:44:24 +02:00
|
|
|
implementation 'de.raphaelebner:roomdatabasebackup:1.0.1'
|
2020-09-30 17:55:52 +02:00
|
|
|
|
2023-09-22 18:41:19 +02:00
|
|
|
//coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.0'
|
2024-03-29 16:08:42 +01:00
|
|
|
}
|