/*
 * Copyright (c) 2017 Nam Nguyen, nam@ene.im
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

apply plugin: 'com.android.library'

android {
  compileSdkVersion rootProject.ext.androidVersion

  defaultConfig {
    minSdkVersion rootProject.ext.minSupportSDKVersion
    targetSdkVersion rootProject.ext.androidVersion
    versionCode releaseVersionCode
    versionName "v" + releaseVersion

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    buildConfigField("String", "LIB_NAME", "\"" + "ToroLib, v" + releaseVersion + "\"")
  }

  buildTypes {
    release {
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }

    debug {
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
  }
}

dependencies {
  implementation 'com.google.android.material:material:1.1.0'
  implementation 'androidx.recyclerview:recyclerview:1.1.0'
  implementation 'androidx.annotation:annotation:1.1.0'

  // doc "com.android.support:support-annotations:${rootProject.ext.supportLibraryVersion}:sources"
  // doc "com.android.support:recyclerview-v7:${rootProject.ext.supportLibraryVersion}:sources"

  testImplementation 'junit:junit:4.12'
  testImplementation "org.mockito:mockito-core:2.27.0"
  androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

ext {
  releaseArtifact = 'toro'
  releaseDescription = 'The Toro core library.'
}

project.archivesBaseName = "toro"

apply from: '../gradle/script/publish.gradle'