apply plugin: 'com.android.library'

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'

    defaultConfig {
        minSdkVersion 18
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
        }
    }
    lintOptions {
          abortOnError false
    }

    defaultPublishConfig 'liteRelease'

    flavorDimensions 'blockly'
    productFlavors {
        full {
            dimension 'blockly'
        }
        lite {
            dimension 'blockly'
        }
    }
}

dependencies {
    testImplementation 'junit:junit:4.12'
    api project(':blocklylib-core')
}

task sourcesJar(type: Jar) {
    from android.sourceSets.main.java.srcDirs
    classifier = 'sources'
}

// TODO(#632): Fix JavaDoc compilation, and then update deployment artifacts.
//task javadoc(type: Javadoc) {
//    source = android.sourceSets.main.java.srcDirs
//    classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
//}

//task javadocJar(type: Jar, dependsOn: javadoc) {
//    classifier = 'javadoc'
//    from javadoc.destinationDir
//    // options.encoding = 'UTF-8'
//}

apply from: 'deploy.gradle'
