apply plugin: 'com.android.library'
//apply plugin: 'maven'
apply plugin: 'kotlin-android'

android {
    compileSdkVersion compile_target_sdk_version

    defaultConfig {
        minSdkVersion 21
        targetSdkVersion compile_target_sdk_version

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

    sourceSets{
        main {
            main.java.srcDirs = ['../../../constraintlayout/compose/src/main/java']
            test.java.srcDirs = ['../../../constraintlayout/compose/src/test']
            manifest.srcFile '../../../constraintlayout/compose/src/main/AndroidManifest.xml'
        }
    }

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

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    buildFeatures {
        compose true
        buildConfig false
    }

    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_1_8.toString()

        //Support @JvmDefault
        kotlinOptions {
            freeCompilerArgs += [
                    "-Xjvm-default=all",
            ]
        }
    }

    composeOptions {
        kotlinCompilerVersion kotlin_version
        kotlinCompilerExtensionVersion compose_compiler_version
    }

    packagingOptions {
      exclude 'META-INF/AL2.0'
      exclude 'META-INF/LGPL2.1'
    }
}

dependencies {
        implementation "androidx.compose.ui:ui:$compose_version"
        implementation "androidx.compose.ui:ui-unit:$compose_version"
        implementation "androidx.compose.ui:ui-util:$compose_version"
        implementation "androidx.compose.foundation:foundation-layout:$compose_version"
        implementation "androidx.compose.foundation:foundation:$compose_version"
        implementation project(':core')
        androidTestImplementation 'junit:junit:4.13.1'
        androidTestImplementation "androidx.compose.ui:ui-test:$compose_version"
        androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
        androidTestImplementation 'androidx.test:runner:1.3.0'
        androidTestImplementation 'androidx.test:rules:1.3.0'
        androidTestImplementation "androidx.activity:activity:1.1.0"
}
