/*
 * Copyright (C) 2016 Appflate.io
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

apply plugin: "java"
apply plugin: "maven"


group = "com.github.andrzejchm"

task sourcesJar(type: Jar, dependsOn: classes) {
    classifier = "sources"
    from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: javadoc) {
    classifier = "javadoc"
    from javadoc.destinationDir
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

artifacts {
    archives sourcesJar
    archives javadocJar
}

dependencies {
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile "com.squareup.okhttp3:mockwebserver:${okHttpVersion}"
    compile "com.squareup.okhttp3:okhttp-tls:${okHttpVersion}"
    compile "org.hamcrest:hamcrest-core:2.2"

    testCompile "junit:junit:$junitVersion"
    testCompile "org.mockito:mockito-all:1.9.5"
    testCompile "com.squareup.okhttp3:okhttp:${okHttpVersion}"
    testCompile "com.google.code.findbugs:annotations:2.0.3"
}

jar.dependsOn test
install.dependsOn test