Files
Application/app/build.gradle
T
2025-12-31 11:50:30 +01:00

58 lines
2.0 KiB
Groovy

plugins {
id 'com.android.application'
}
// Load local.properties
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withInputStream { localProperties.load(it) }
}
android {
namespace 'com.example.boidelov3'
compileSdk 33
buildFeatures {
buildConfig = true
}
packagingOptions { resources.excludes.add("META-INF/*") } // This line is added to avoid the error: Duplicate files copied in APK META-INF/LICENSE.txt
defaultConfig {
applicationId "com.example.boidelov3"
minSdk 24
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// Inject database credentials into BuildConfig
buildConfigField "String", "DB_URL", "\"${localProperties.getProperty('db.url', '')}\""
buildConfigField "String", "DB_USER", "\"${localProperties.getProperty('db.user', '')}\""
buildConfigField "String", "DB_PASSWORD", "\"${localProperties.getProperty('db.password', '')}\""
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
implementation 'com.impossibl.pgjdbc-ng:pgjdbc-ng:0.8.3'
implementation 'com.google.code.gson:gson:2.8.8'
}