Files
coco 723ce1af5c a
2026-07-03 15:12:48 +08:00

188 lines
7.2 KiB
Groovy

plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
}
def keystorePropertiesFile = rootProject.file("keystore.properties")
android {
compileSdk 33
signingConfigs {
release {
if (keystorePropertiesFile.exists()) {
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
}
}
}
defaultConfig {
applicationId 'org.metabrainz.android'
minSdk 21
targetSdk 33
versionCode 52
versionName "5.1.5"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildFeatures {
compose true
viewBinding true
}
buildTypes {
debug {
applicationIdSuffix ".debug"
versionNameSuffix ".debug"
}
release {
if (keystorePropertiesFile.exists()) {
signingConfig signingConfigs.release
}
minifyEnabled false
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
sourceSets {
String sharedTestDir = 'src/sharedTest/java'
String sharedTestResourcesDir = 'src/sharedTest/resources'
test {
java.srcDirs += [sharedTestDir]
resources.srcDirs += [sharedTestResourcesDir]
}
androidTest {
java.srcDirs += [sharedTestDir]
resources.srcDirs += [sharedTestResourcesDir]
}
}
lint {
abortOnError false
disable 'MissingTranslation'
}
composeOptions {
kotlinCompilerExtensionVersion '1.3.0'
}
namespace 'org.metabrainz.android'
}
dependencies {
//AndroidX
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'androidx.browser:browser:1.4.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.core:core-splashscreen:1.0.0'
//Web Service Setup
implementation 'com.google.code.gson:gson:2.9.1'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.7'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.7'
implementation 'androidx.paging:paging-runtime-ktx:3.1.1'
//Image downloading and Caching library
implementation 'com.github.bumptech.glide:glide:4.14.1'
kapt 'com.github.bumptech.glide:compiler:4.14.1'
//Fragment Setup For Kotlin
implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion"
implementation "androidx.navigation:navigation-ui-ktx:$navigationVersion"
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
//Tagger & Metadata Setup
implementation 'info.debatty:java-string-similarity:2.0.0'
implementation 'com.github.amcap1712:KTaglib:release-SNAPSHOT'
//Handling WebViews
implementation 'com.thefinestartist:finestwebview:1.2.7'
//Design Setup
implementation 'com.google.android.material:material:1.8.0-alpha01'
implementation 'com.airbnb.android:lottie:5.2.0'
implementation 'com.github.akshaaatt:Onboarding:1.0.4'
implementation 'com.github.akshaaatt:Share-Android:1.0.0'
//Barcode Scan
implementation 'me.dm7.barcodescanner:zbar:1.9.13'
//Share
implementation 'com.github.akshaaatt:Share-Android:1.0.0'
//Instant App
implementation 'com.google.android.gms:play-services-instantapps:18.0.1'
//Dagger-Hilt
implementation("com.google.dagger:hilt-android:$hilt_version")
kapt("com.google.dagger:hilt-android-compiler:$hilt_version")
implementation group: 'androidx.lifecycle', name: 'lifecycle-viewmodel-ktx', version: '2.5.1'
kapt("androidx.hilt:hilt-compiler:1.0.0")
//Jetpack Compose
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.ui:ui-tooling:$compose_version"
implementation "androidx.compose.ui:ui-util:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.material:material-icons-extended:$compose_version"
implementation 'androidx.compose.material3:material3:1.0.0-beta03'
implementation 'androidx.compose.material3:material3-window-size-class:1.0.0-beta03'
implementation "androidx.compose.animation:animation:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation 'androidx.constraintlayout:constraintlayout-compose:1.0.1'
implementation 'androidx.navigation:navigation-compose:2.6.0-alpha01'
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1'
implementation 'androidx.hilt:hilt-navigation-compose:1.0.0'
implementation 'io.coil-kt:coil-compose:2.2.2'
implementation 'com.airbnb.android:lottie-compose:5.2.0'
implementation 'androidx.navigation:navigation-compose:2.5.2'
//Spotify
implementation files('./lib/spotify-app-remote-release-0.7.2.aar')
//Test Setup
testImplementation 'junit:junit:4.13.2'
testImplementation 'com.squareup.okhttp3:mockwebserver:5.0.0-alpha.7'
testImplementation 'androidx.arch.core:core-testing:2.1.0'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4'
testImplementation "androidx.room:room-testing:2.4.3"
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.arch.core:core-testing:2.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.4.0'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
androidTestImplementation 'app.cash.turbine:turbine:0.11.0'
//ViewPager
implementation "com.google.accompanist:accompanist-pager:0.23.0"
//Exoplayer
api 'com.google.android.exoplayer:exoplayer-core:2.18.1'
api 'com.google.android.exoplayer:exoplayer-ui:2.18.1'
api 'com.google.android.exoplayer:extension-mediasession:2.18.1'
//Room db
implementation "androidx.room:room-runtime:2.4.3"
kapt "androidx.room:room-compiler:2.4.3"
implementation "androidx.room:room-ktx:2.4.3"
}