plugins {
    alias(libs.plugins.android.application)
    alias(libs.plugins.kotlin.android)
    id 'maven-publish'

}

android {
    namespace 'com.example.chargilysdk'
    compileSdk 34

    defaultConfig {
        applicationId "com.example.chargilysdk"
        minSdk 24
        targetSdk 34
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        // You can exclude other problematic files similarly if needed
        // exclude 'META-INF/other_file_to_exclude'
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}


//publishing {
//    publications {
//        release(MavenPublication){
//
//            groupId = "com.github.aarundn" // Your group ID
//            artifactId = "chargily-sdk" // Your library name
//            version = "1.0-alpha"
////            afterEvaluate {
////                from components.release
////            }
//            // Add more metadata like description, licenses, developers, etc.
//            pom {
//                name.set("chargilysdk")
//                description.set("A brief description of your library.")
//                url.set("https://github.com/aarundn/chargilysdk1")
//                licenses {
//                    license {
//                        name.set("The Apache License, Version 1.0")
//                        url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
//                    }
//                }
//                developers {
//                    developer {
//                        id.set("aarundn")
//                        name.set("haroun debchoune")
//                        email.set("debchouneharoun@gmail.com")
//                    }
//                }
//
//                scm {
//                    connection = 'scm:git:git://github.com/aarundn/chargily-sdk.git'
//                    developerConnection = 'scm:git:ssh://github.com/aarundn/chargily-sdk.git'
//                    url = 'https://github.com/aarundn/chargily-sdk'
//                }
//            }
//        }
//    }
//
//    repositories {
//        maven {
//            url "https://oss.sonatype.org/content/repositories/snapshots/"
//            credentials {
//                username = project.findProperty("ossrhUsername") ?: ""
//                password = project.findProperty("ossrhPassword") ?: ""
//            }
//        }
//
//    }
//}
//signing {
//    useGpgCmd()
//    sign publishing.publications.release
//}
//tasks.register('testClasses') {}

dependencies {

    implementation libs.androidx.core.ktx
    implementation libs.androidx.appcompat
    implementation libs.material
    implementation libs.androidx.activity
    implementation libs.androidx.constraintlayout
    implementation project(':chargilyCheckout')
    testImplementation libs.junit
    implementation libs.maven.plugin.api
    androidTestImplementation libs.androidx.junit
    androidTestImplementation libs.androidx.espresso.core
}