plugins {
    id 'java-library'
    id 'org.jetbrains.intellij' version '1.7.0'
    id 'org.jetbrains.changelog' version "1.3.1"
}


apply plugin: 'org.jetbrains.changelog'

group project.pluginGroup

version project.pluginVersion


sourceCompatibility = 11
targetCompatibility = 11


repositories {
    mavenCentral()
}

dependencies {
    api 'uk.com.robust-it:cloning:1.9.12'
    api 'org.apache.commons:commons-text:1.11.0'
    testImplementation 'junit:junit:4.13.2'
}

// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
    pluginName = project.pluginName
    version = project.platformVersion
    type = project.platformType
    downloadSources = true
    updateSinceUntilBuild = false
    buildSearchableOptions.enabled = false
    //plugins=["com.intellij.zh:203.392"]
    //plugins=["com.intellij.ja:203.392"]

    runIde {
        jvmArgs = project.runIdeJvmArgs.split(',').toList()
    }

    patchPluginXml {
        sinceBuild = project.pluginSinceBuild
        untilBuild = project.pluginUntilBuild
        pluginDescription = new File(project.pluginDescription).getText('UTF-8')
        changeNotes = new File(project.pluginChangeNotes).getText('UTF-8')
    }

}

changelog {

}

tasks.withType(JavaCompile).configureEach {
    options.encoding = "UTF-8"
}