/*
 *
 *  Lynket
 *
 *  Copyright (C) 2022 Arunkumar
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
apply plugin: "android-binary-plugin"
apply plugin: "kotlin-kapt"
apply plugin: "kotlin-android-extensions"
apply plugin: "scabbard.gradle"

// TODO move to build-logic
kapt {
  correctErrorTypes = true
}

scabbard {
  enabled false
  outputFormat "svg"
}

android {
  // TODO Update play license key
  // resValue "string", "play_license_key", "$PLAY_LICENSE_KEY"

  buildFeatures {
    compose = true
  }

  buildTypes {
    release {
      resValue "string", "app_name", "Lynket"
    }
    debug {
      applicationIdSuffix ".debug"
      versionNameSuffix "- dev"
      resValue "string", "app_name", "Lynket-dev"
    }
  }
}

androidExtensions {
  experimental = true
}

dependencies {
  implementation fileTree(include: ["*.jar"], dir: "libs")

  // Tests
  testImplementation "junit:junit:4.13.1"
  testImplementation "org.robolectric:robolectric:4.3"
  testImplementation "androidx.test:core:1.3.0"
  testImplementation "androidx.test:runner:1.3.0"
  testImplementation "androidx.test:rules:1.3.0"

  // Personal libs
  implementation "in.arunkumarsampath:suggestions:1.0.3"
  implementation "in.arunkumarsampath:transition-x:1.1.0"
  implementation "dev.arunkumar.android:common:master-SNAPSHOT"
  implementation "dev.arunkumar.android:dagger-base:master-SNAPSHOT"
  implementation "dev.arunkumar.android:logging:master-SNAPSHOT"
  implementation "dev.arunkumar.android:dagger-viewmodel:master-SNAPSHOT"
  implementation "dev.arunkumar.android:epoxy-utils:master-SNAPSHOT"
  implementation "dev.arunkumar.android:rx-utils:master-SNAPSHOT"

  // Compose
  implementation(libs.compose.material)
  implementation(libs.compose.materialicons)
  implementation(libs.compose.ui.ui)
  implementation(libs.compose.ui.toolingpreview)
  implementation(libs.compose.ui.livedata)
  debugImplementation(libs.compose.ui.tooling)

  // Dependency Injection
  implementation "com.google.dagger:dagger:2.42"
  kapt "com.google.dagger:dagger-compiler:2.42"
  kaptTest "com.google.dagger:dagger-compiler:2.42"

  // AndroidX
  implementation "com.google.android.material:material:1.3.0"
  implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
  implementation "androidx.core:core-ktx:1.9.0-alpha03"
  implementation "androidx.browser:browser:1.4.0"
  implementation "androidx.legacy:legacy-preference-v14:1.0.0"
  implementation "androidx.cardview:cardview:1.0.0"
  implementation "androidx.palette:palette-ktx:1.0.0"
  implementation "androidx.paging:paging-runtime-ktx:2.1.2"
  implementation "androidx.multidex:multidex:2.0.1"
  implementation "androidx.constraintlayout:constraintlayout:2.1.3"
  implementation "androidx.dynamicanimation:dynamicanimation:1.0.0"

  // Android KTX
  implementation "androidx.core:core-ktx:1.0.2"
  implementation "androidx.fragment:fragment-ktx:1.0.0"
  implementation "androidx.palette:palette-ktx:1.0.0"
  implementation "androidx.sqlite:sqlite-ktx:2.0.1"

  // Architecture Components
  implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
  kapt "androidx.lifecycle:lifecycle-common-java8:2.0.0"

  // Intro
  implementation "com.github.apl-devs:appintro:v4.2.3"

  // Icons
  implementation "com.mikepenz:community-material-typeface:2.0.46.1@aar"

  // Drawer
  implementation("com.mikepenz:materialdrawer:6.1.2@aar") {
    transitive = true
  }

  // Dialogs
  implementation "com.afollestad.material-dialogs:core:0.9.6.0"
  implementation "com.afollestad.material-dialogs:commons:0.9.6.0"

  // Butterknife, Timber
  implementation "com.jakewharton.timber:timber:4.7.1"
  implementation "com.jakewharton:butterknife:10.2.0"
  kapt "com.jakewharton:butterknife-compiler:10.2.3"

  // Image loading
  implementation "com.github.bumptech.glide:glide:4.9.0"
  kapt "com.github.bumptech.glide:compiler:4.9.0"

  // Bottom sheet
  implementation "com.flipboard:bottomsheet-core:1.5.1"
  implementation "com.flipboard:bottomsheet-commons:1.5.1"

  // Animations
  implementation "com.facebook.rebound:rebound:0.3.8"

  // Badge
  implementation "com.github.nekocode:Badge:1.2"
  implementation "com.github.duanhong169:drawabletoolbox:1.0.7"

  // Reactive
  implementation "io.reactivex:rxjava:1.3.8"
  implementation "io.reactivex:rxandroid:1.2.1"
  implementation "com.jakewharton.rxbinding:rxbinding:1.0.1"
  // Rx2
  implementation "com.github.akarnokd:rxjava2-interop:0.13.7"
  implementation "io.reactivex.rxjava2:rxjava:2.2.21"
  implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
  implementation "com.jakewharton.rxbinding3:rxbinding:3.1.0"
  implementation "com.jakewharton.rxbinding3:rxbinding-appcompat:3.1.0"
  implementation "com.jakewharton.rxbinding3:rxbinding-recyclerview:3.1.0"
  implementation "io.reactivex.rxjava2:rxkotlin:2.4.0"
  implementation "com.jakewharton.rxrelay2:rxrelay:2.1.1"

  implementation "com.uber.rxdogtag:rxdogtag:0.3.0"

  // RxPrefs
  implementation "com.afollestad:rxkprefs:1.2.5"

  // Epoxy for recycler view
  implementation "com.airbnb.android:epoxy:4.4.0"
  kapt "com.airbnb.android:epoxy-processor:4.4.0"

  // Storage
  implementation "io.paperdb:paperdb:2.6"
  implementation "com.github.chrisbanes:PhotoView:1.3.1"

  implementation "com.github.florent37:shapeofview:1.4.7"

  // Disk LRU cache
  implementation project(":disk-cache")
}
