mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-14 01:21:35 +01:00
9ee2744b81
* Remove build config in properties file * Add build config property in main module
120 lines
3.7 KiB
Groovy
120 lines
3.7 KiB
Groovy
//noinspection GradleCompatible
|
|
apply plugin: 'com.android.application'
|
|
|
|
// 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 {
|
|
signingConfigs {
|
|
release {
|
|
storeFile rootProject.file("android-signing-keystore.jks")
|
|
storePassword secretProperties['signing_keystore_password']
|
|
keyAlias secretProperties['signing_key_alias']
|
|
keyPassword secretProperties['signing_key_password']
|
|
}
|
|
prerelease {
|
|
storeFile file("../android-signing-keystore.jks")
|
|
storePassword secretProperties['signing_keystore_password']
|
|
keyAlias secretProperties['signing_key_alias']
|
|
keyPassword secretProperties['signing_key_password']
|
|
}
|
|
}
|
|
compileSdk 34
|
|
|
|
defaultConfig {
|
|
applicationId "net.foucry.pilldroid"
|
|
minSdk defaultMinSdkVersion
|
|
targetSdk defaultTargetSdkVersion
|
|
versionCode 302
|
|
versionName "v0.302-beta"
|
|
javaCompileOptions {
|
|
annotationProcessorOptions {
|
|
arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
|
|
}
|
|
}
|
|
}
|
|
buildFeatures {
|
|
buildConfig = true
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
minifyEnabled false
|
|
debuggable true
|
|
applicationIdSuffix ".debug"
|
|
}
|
|
release {
|
|
minifyEnabled true
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
debuggable false
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
flavorDimensions = ["version"]
|
|
productFlavors {
|
|
dev {
|
|
resValue "string", "app_name", "PillDroid dev"
|
|
dimension ="version"
|
|
}
|
|
|
|
product {
|
|
resValue "string", "app_name", "PillDroid"
|
|
dimension ="version"
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
targetCompatibility JavaVersion.VERSION_11
|
|
}
|
|
|
|
namespace 'net.foucry.pilldroid'
|
|
|
|
allprojects {
|
|
tasks.withType(JavaCompile) {
|
|
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
exclude 'net/foucry/pilldroid/ViewDialog.java'
|
|
}
|
|
}
|
|
}
|
|
dependencies {
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
|
implementation "androidx.room:room-common:2.5.2"
|
|
annotationProcessor "androidx.room:room-compiler:2.5.2"
|
|
implementation "androidx.room:room-testing:2.5.2"
|
|
implementation "androidx.room:room-rxjava3:2.5.2"
|
|
implementation "androidx.room:room-runtime:2.5.2"
|
|
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
testImplementation 'junit:junit:4.13.2'
|
|
|
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
|
implementation 'androidx.recyclerview:recyclerview:1.3.1'
|
|
implementation 'com.google.android.material:material:1.9.0'
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
|
|
implementation 'androidx.core:core:1.9.0'
|
|
|
|
//coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.0'
|
|
}
|