Pilldroid/app/build.gradle

122 lines
3.7 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 {
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 {
storeFile file("../android-signing-keystore.jks")
2022-01-01 18:47:19 +01:00
storePassword secretProperties['signing_keystore_password']
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
}
compileSdk 34
2020-10-03 23:12:47 +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()]
}
}
}
buildFeatures {
buildConfig = 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
}
}
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"
}
}
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
}
namespace 'net.foucry.pilldroid'
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 {
2023-07-13 22:18:21 +02:00
exclude 'net/foucry/pilldroid/ViewDialog.java'
2020-05-18 19:08:48 +02:00
}
}
}
dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
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')
testImplementation 'junit:junit:4.13.2'
2020-05-11 20:49:29 +02:00
implementation 'androidx.appcompat:appcompat:1.6.1'
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'
implementation 'androidx.core:core:1.12.0'
2020-09-30 17:55:52 +02:00
//coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.0'
}