plugins {
    id 'com.android.library'
    id 'kotlin-android'
    id 'kotlin-kapt'
    id 'kotlin-parcelize'
    id 'maven-publish'
    id 'com.vanniktech.maven.publish'
}

android {
namespace 'io.ak1.pix'
    compileSdk 34
    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 34
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        consumerProguardFiles "consumer-rules.pro"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }
    kotlinOptions {
        jvmTarget = '17'
    }

    buildFeatures {
        viewBinding true
        dataBinding true
    }
}

repositories {
    mavenCentral()
    maven { url 'https://maven.google.com' }
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"
    implementation 'androidx.core:core-ktx:1.12.0'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.11.0'
    implementation 'androidx.fragment:fragment-ktx:1.6.2'

    def camerax_version = '1.3.2'
    // CameraX core library using camera2 implementation
    implementation "androidx.camera:camera-camera2:$camerax_version"
    // CameraX Lifecycle Library
    implementation "androidx.camera:camera-lifecycle:$camerax_version"
    // CameraX View class
    implementation 'androidx.camera:camera-view:1.3.2'
    // If you want to additionally use the CameraX Extensions library
    implementation 'androidx.camera:camera-extensions:1.3.2'

    //Glide
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    // Skip this if you don't want to use integration libraries or configure Glide.
    kapt 'com.github.bumptech.glide:compiler:4.12.0'
    implementation ('com.github.bumptech.glide:recyclerview-integration:4.12.0') {
        // Excludes the support library because it's already included by Glide.
        transitive = false
    }

    //Coroutines
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3'

    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}