plugins {
    id "org.jetbrains.intellij" version "1.4.0"
    id "idea"
    id "java"
}

group 'com.blocklatency'
version '1.24'

sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

repositories {
    mavenCentral()
}

dependencies {

    compileOnly 'org.projectlombok:lombok:1.18.22'
    annotationProcessor 'org.projectlombok:lombok:1.18.22'

    compile 'org.apache.commons:commons-compress:1.21'
    compile 'org.freemarker:freemarker:2.3.31'
    compile 'com.jcraft:jsch:0.1.55'

    testCompile 'junit:junit:4.13.2'
    testCompile 'org.mockito:mockito-all:1.10.19'
    testCompile 'org.powermock:powermock-module-junit4:2.0.9'
    testCompile 'org.powermock:powermock-api-mockito:1.7.4'


}

def intellijVersion = System.getenv().getOrDefault("IDEA_VERSION", "213.7172.25")
def jetBrainsToken = System.getenv().getOrDefault("JB_TOKEN", "")

intellij {
    version = intellijVersion
    type = 'IC'
    updateSinceUntilBuild = false
    plugins = ['java']
}

publishPlugin {
    token    = jetBrainsToken
}

jar {
    from('Resources') {
        include 'pi.png'
    }
}

test {
    useJUnitPlatform()
}