/*
 * This file was generated by the Gradle 'init' task.
 *
 * This generated file contains a sample Java Library project to get you started.
 * For more details take a look at the Java Libraries chapter in the Gradle
 * user guide available at https://docs.gradle.org/4.7/userguide/java_library_plugin.html
 */

buildscript {
    ext.kotlin_version = '1.4.30'
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.15"
    }
}

buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.17"
    }
}

plugins {
    // Apply the java-library plugin to add support for Java Library
    id 'java-library'
}

apply plugin: 'org.jetbrains.dokka'

dokka {
    outputFormat = 'javadoc'
    outputDirectory = "$buildDir/javadoc"
}

version = '1.0.2'

dependencies {
    // Actions on Google JSON bindings
    compile files('lib/libactions_java_lib.jar')

    // Dialogflow JSON bindings
    compile files('lib/libdialogflow_java_lib.jar')

    // https://mvnrepository.com/artifact/com.google.code.gson/gson
    compile group: 'com.google.code.gson', name: 'gson', version: '2.8.4'

    // https://mvnrepository.com/artifact/com.google.http-client/google-http-client
    compile group: 'com.google.http-client', name: 'google-http-client', version: '1.23.0'

    // https://mvnrepository.com/artifact/org.json/json
    compile group: 'org.json', name: 'json', version: '20180130'

    // https://mvnrepository.com/artifact/org.slf4j/slf4j-api
    compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'

    // https://mvnrepository.com/artifact/org.hamcrest/hamcrest-core
    testCompile group: 'org.hamcrest', name: 'hamcrest-core', version: '1.3'

    // https://mvnrepository.com/artifact/junit/junit
    testCompile group: 'junit', name: 'junit', version: '4.12'

    // https://mvnrepository.com/artifact/org.testng/testng
    testCompile group: 'org.testng', name: 'testng', version: '6.14.3'

    // https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine
    testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.2.0'

    compileClasspath group: "com.github.rholder", name: "gradle-one-jar", version: "1.0.4"

    compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib-jdk8", version: "$kotlin_version"
}

// In this section you declare where to find the dependencies of your project
repositories {
    mavenCentral()
}

jar {
    manifest {
        attributes('Implementation-Title': project.name,
                'Implementation-Version': project.version)
    }
}

test {
    useTestNG()
}

apply plugin: 'kotlin'
compileKotlin {
    kotlinOptions {
        jvmTarget = "1.8"
    }
}
compileTestKotlin {
    kotlinOptions {
        jvmTarget = "1.8"
    }
}

apply from: 'build-smarthome.gradle'
