plugins {
    alias(libs.plugins.android.library)
    alias(libs.plugins.kotlin.android)
    id ("maven-publish")
}

android {
    namespace 'io.github.aarundn'
    compileSdk 34

    defaultConfig {
        minSdk 24

        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_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}
publishing {
    publications {
        release(MavenPublication) {
            afterEvaluate {
                from components.release
            }
        }
    }
}


//publishing {
//    publications {
//        release(MavenPublication) {
//            groupId = 'com.github.aarundn'
//            artifactId = 'chargilyCheckout'
//            version = '1.0-alpha'
//            artifact("$buildDir/outputs/aar/chargilyCheckout-release.aar")
//            afterEvaluate {
//                from components.release
//            }
//        }
//    }
//
//}
dependencies {
    implementation libs.retrofit
    implementation libs.converter.gson
    implementation libs.logging.interceptor
    testImplementation libs.junit
}