apply plugin: 'java'

sourceCompatibility = 1.8
targetCompatibility = 1.8

version = '1.0'

dependencies {
    testImplementation 'junit:junit:4.11'
    implementation 'commons-codec:commons-codec:1.10'
    implementation 'net.lingala.zip4j:zip4j:1.3.2'
    implementation files('libs/java_websocket_0.8.jar')
}

sourceSets {
    main {
        java {
            srcDir 'src'
        }
    }
}

subprojects {
    tasks.withType(JavaCompile) {
        options.encoding = "UTF-8"
        options.compilerArgs << "-Xlint:unchecked -Xlint:deprecation -warn:+boxing"
    }
}

task clearJar(type: Delete) {
    delete 'build/libs/' + BLJAR_NAME
}
task makeJar(type: Copy) {
    from('build/intermediates/bundles/release/')
    into('release/')
    include('classes.jar')
    rename('classes.jar', BLJAR_NAME)
}
makeJar.dependsOn(clearJar, build)
