173 lines
6.4 KiB
Groovy
173 lines
6.4 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
id 'org.jetbrains.kotlin.android'
|
|
id 'kotlin-kapt'
|
|
id 'dagger.hilt.android.plugin'
|
|
id 'com.apollographql.apollo3' version '3.7.2'
|
|
}
|
|
|
|
def keystorePropertiesFile = rootProject.file("app/external/keystore.properties");
|
|
def keystoreProperties = new Properties()
|
|
if (keystorePropertiesFile.exists()) {
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
}
|
|
|
|
android {
|
|
compileSdk 33
|
|
|
|
defaultConfig {
|
|
applicationId "app.omnivore.omnivore"
|
|
minSdk 26
|
|
targetSdk 33
|
|
versionCode 180
|
|
versionName "0.0.180"
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
vectorDrawables {
|
|
useSupportLibrary true
|
|
}
|
|
}
|
|
|
|
signingConfigs {
|
|
release {
|
|
keyAlias 'key0'
|
|
storeFile file('external/omnivore-prod.keystore')
|
|
storePassword keystoreProperties['prodStorePassword']
|
|
keyPassword keystoreProperties['prodKeyPassword']
|
|
}
|
|
debug {
|
|
if (keystoreProperties['demoStorePassword'] && keystoreProperties['demoKeyPassword']) {
|
|
keyAlias 'androiddebugkey'
|
|
storeFile file('external/omnivore-demo.keystore')
|
|
storePassword keystoreProperties['demoStorePassword']
|
|
keyPassword keystoreProperties['demoKeyPassword']
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
signingConfig signingConfigs.debug
|
|
buildConfigField("String", "OMNIVORE_API_URL", "\"https://api-demo.omnivore.app\"")
|
|
buildConfigField("String", "OMNIVORE_WEB_URL", "\"https://demo.omnivore.app\"")
|
|
buildConfigField("String", "OMNIVORE_GAUTH_SERVER_CLIENT_ID", "\"267918240109-eu2ar09unac3lqqigluknhk7t0021b54.apps.googleusercontent.com\"")
|
|
}
|
|
release {
|
|
minifyEnabled false
|
|
signingConfig signingConfigs.release
|
|
buildConfigField("String", "OMNIVORE_API_URL", "\"https://api-prod.omnivore.app\"")
|
|
buildConfigField("String", "OMNIVORE_WEB_URL", "\"https://omnivore.app\"")
|
|
buildConfigField("String", "OMNIVORE_GAUTH_SERVER_CLIENT_ID", "\"687911924401-lq8j1e97n0sv3khhb8g8n368lk4dqkbp.apps.googleusercontent.com\"")
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = '1.8'
|
|
}
|
|
buildFeatures {
|
|
compose true
|
|
}
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion = '1.3.1'
|
|
}
|
|
packagingOptions {
|
|
resources {
|
|
excludes += '/META-INF/{AL2.0,LGPL2.1}'
|
|
}
|
|
}
|
|
namespace 'app.omnivore.omnivore'
|
|
}
|
|
|
|
dependencies {
|
|
def nav_version = "2.5.3"
|
|
|
|
implementation 'androidx.core:core-ktx:1.9.0'
|
|
implementation "androidx.compose.ui:ui:$compose_version"
|
|
implementation "androidx.compose.material:material:$compose_version"
|
|
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
|
|
implementation "androidx.compose.material:material-icons-extended:$compose_version"
|
|
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
|
|
implementation 'androidx.activity:activity-compose:1.6.1'
|
|
implementation 'androidx.appcompat:appcompat:1.5.1'
|
|
implementation 'com.google.android.gms:play-services-base:18.1.0'
|
|
|
|
implementation "androidx.navigation:navigation-compose:$nav_version"
|
|
|
|
testImplementation 'junit:junit:4.13.2'
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
|
|
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
|
|
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
|
|
debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
|
|
|
|
// Jetpack Lifecycle deps
|
|
|
|
// ViewModel
|
|
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version")
|
|
// ViewModel utilities for Compose
|
|
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version")
|
|
// LiveData
|
|
implementation("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version")
|
|
implementation("androidx.compose.runtime:runtime-livedata:1.3.2")
|
|
|
|
// Saved state module for ViewModel
|
|
implementation("androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycle_version")
|
|
|
|
// Annotation processor
|
|
implementation("androidx.lifecycle:lifecycle-common-java8:$lifecycle_version")
|
|
|
|
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
|
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
|
|
|
// coroutines
|
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
|
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
|
|
|
|
implementation "androidx.security:security-crypto:1.0.0"
|
|
implementation "androidx.datastore:datastore-preferences:1.0.0"
|
|
|
|
//Dagger - Hilt
|
|
implementation "com.google.dagger:hilt-android:$hilt_version"
|
|
kapt "com.google.dagger:hilt-compiler:$hilt_version"
|
|
|
|
implementation 'com.apollographql.apollo3:apollo-runtime:3.7.2'
|
|
|
|
implementation 'androidx.compose.material3:material3:1.1.2'
|
|
implementation 'androidx.compose.material3:material3-window-size-class:1.1.2'
|
|
|
|
implementation 'com.google.android.gms:play-services-auth:20.4.0'
|
|
implementation "com.google.accompanist:accompanist-systemuicontroller:0.25.1"
|
|
implementation "com.google.accompanist:accompanist-flowlayout:0.25.1"
|
|
|
|
implementation 'io.coil-kt:coil-compose:2.3.0'
|
|
|
|
implementation 'com.google.code.gson:gson:2.9.0'
|
|
implementation 'com.pspdfkit:pspdfkit:8.9.1'
|
|
|
|
implementation 'com.posthog.android:posthog:2.0.3'
|
|
implementation 'io.intercom.android:intercom-sdk:15.1.0'
|
|
|
|
// Room Deps
|
|
implementation "androidx.room:room-runtime:$room_version"
|
|
implementation "androidx.room:room-ktx:$room_version"
|
|
annotationProcessor "androidx.room:room-compiler:$room_version"
|
|
kapt "androidx.room:room-compiler:$room_version"
|
|
|
|
implementation 'com.github.jeziellago:compose-markdown:0.3.3'
|
|
implementation "io.github.dokar3:chiptextfield:0.4.7"
|
|
}
|
|
|
|
apollo {
|
|
packageName.set 'app.omnivore.omnivore.graphql.generated'
|
|
}
|
|
|
|
task printVersion {
|
|
doLast {
|
|
println "omnivoreVersion: ${android.defaultConfig.versionName}"
|
|
}
|
|
}
|