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

afterEvaluate {
    println("Components: RatingBar: " + components*.name)
    publishing {
        publications {
            // Creates a Maven publication called "release".
            release(MavenPublication) {
                from components.release
                groupId = 'com.gowtham.composeratingbar'
                artifactId = 'compose-ratingbar'
                version =  '1.3.7'
            }
        }
    }
}

/*
allprojects {
    plugins.withId("com.vanniktech.maven.publish") {
        mavenPublish {
            sonatypeHost = "S01"
        }
    }
}
*/

android {
    compileSdk rootProject.compileSdk

    defaultConfig {
        minSdk rootProject.minSdk
        targetSdk rootProject.targetSdk

        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 = JavaVersion.VERSION_17.toString()
    }
    buildFeatures {
        buildConfig false
        compose true
    }
    composeOptions {
        kotlinCompilerExtensionVersion compose_compiler
    }
    namespace 'com.gowtham.ratingbar'

}

dependencies {
    implementation 'androidx.appcompat:appcompat:1.5.1'
    implementation "androidx.compose.foundation:foundation:$compose_version"
    implementation "androidx.compose.ui:ui:$compose_version"
    implementation "androidx.compose.material:material:$compose_version"
    implementation "androidx.compose.ui:ui-tooling:$compose_version"

    implementation "androidx.compose.runtime:runtime:$compose_version"
    implementation "androidx.compose.compiler:compiler:$compose_compiler"

}

