import org.gradle.internal.jvm.Jvm

plugins {
    id("io.gitlab.arturbosch.detekt").version("$detekt_version")
}

apply plugin: 'kotlin'
apply from: rootProject.file('dependencies.gradle')
apply plugin: 'com.novoda.bintray-release'

publish {
    userOrg = 'fourlastor'
    groupId = 'com.fourlastor'
    artifactId = 'pickle-processor'
    publishVersion = "$pickle_version"
    desc = 'Cucumber implementation via code generation (processor)'
    website = 'https://github.com/fourlastor/pickle'
}

detekt {
    toolVersion = "$detekt_version"
    config = rootProject.files('config/detekt/detekt.yml')
}

dependencies {
    implementation "io.cucumber:cucumber-java:$cucumber_version"
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'com.squareup:javapoet:1.11.1'
    implementation project(':pickle-lib')
    testImplementation 'junit:junit:4.13'
    testImplementation 'com.google.testing.compile:compile-testing:0.15'
    testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
    testImplementation 'org.mockito:mockito-core:3.1.0'
    testImplementation files(Jvm.current().getToolsJar())
    detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:$detekt_version"
}

sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7

repositories {
    mavenCentral()
}

task copyTestResources(type: Copy) {
    from "${projectDir}/src/test/resources"
    into "${buildDir}/classes/test"
}
processTestResources.dependsOn copyTestResources
