mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2024-11-24 05:42:45 +01:00
147 lines
3.4 KiB
Groovy
147 lines
3.4 KiB
Groovy
import dev.feedforward.markdownto.DownParser
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url 'https://jitpack.io' }
|
|
}
|
|
|
|
dependencies {
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
|
classpath "com.github.AlexPl292:mark-down-to-slack:1.1.2"
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id 'org.jetbrains.intellij' version '0.6.1'
|
|
id 'io.gitlab.arturbosch.detekt' version '1.14.1'
|
|
id "org.jetbrains.changelog" version "0.6.2"
|
|
}
|
|
|
|
apply plugin: 'java'
|
|
apply plugin: 'kotlin'
|
|
|
|
sourceCompatibility = javaVersion
|
|
targetCompatibility = javaVersion
|
|
|
|
tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }
|
|
|
|
sourceSets {
|
|
main {
|
|
java.srcDir 'src'
|
|
resources.srcDir 'resources'
|
|
}
|
|
test {
|
|
java.srcDir 'test'
|
|
}
|
|
}
|
|
|
|
intellij {
|
|
version ideaVersion
|
|
pluginName 'IdeaVim'
|
|
updateSinceUntilBuild false
|
|
downloadSources Boolean.valueOf(downloadIdeaSources)
|
|
instrumentCode Boolean.valueOf(instrumentPluginCode)
|
|
intellijRepo = "https://www.jetbrains.com/intellij-repository"
|
|
plugins = ['java']
|
|
|
|
publishPlugin {
|
|
channels publishChannels.split(',')
|
|
username publishUsername
|
|
token publishToken
|
|
}
|
|
}
|
|
|
|
runPluginVerifier {
|
|
ideVersions = ["IC-2020.1.4", "IC-2020.2.3"]
|
|
downloadDirectory = "${project.buildDir}/pluginVerifier/ides"
|
|
teamCityOutputFormat = true
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
|
|
compileOnly "org.jetbrains:annotations:19.0.0"
|
|
|
|
// https://mvnrepository.com/artifact/com.ensarsarajcic.neovim.java/neovim-api
|
|
compile group: 'com.ensarsarajcic.neovim.java', name: 'neovim-api', version: '0.1.16'
|
|
}
|
|
|
|
compileKotlin {
|
|
kotlinOptions {
|
|
jvmTarget = javaVersion
|
|
}
|
|
}
|
|
compileTestKotlin {
|
|
kotlinOptions {
|
|
jvmTarget = javaVersion
|
|
}
|
|
}
|
|
|
|
detekt {
|
|
config = files("${rootProject.projectDir}/.detekt/config.yaml")
|
|
baseline = file("${rootProject.projectDir}/.detekt/baseline.xml")
|
|
input = files("src")
|
|
|
|
buildUponDefaultConfig = true
|
|
|
|
reports {
|
|
html.enabled = false
|
|
xml.enabled = false
|
|
txt.enabled = false
|
|
}
|
|
}
|
|
|
|
tasks.detekt.jvmTarget = javaVersion
|
|
|
|
task testWithNeovim(type: Test) {
|
|
group = "verification"
|
|
systemProperty "ideavim.nvim.test", 'true'
|
|
}
|
|
|
|
changelog {
|
|
groups = ["Features:", "Changes:", "Deprecations:", "Fixes:", "Merged PRs:"]
|
|
itemPrefix = "*"
|
|
path = "${project.projectDir}/CHANGES.md"
|
|
unreleasedTerm = "To Be Released"
|
|
headerParserRegex = /0\.\d{2}(.\d+)?/
|
|
// header = { "${project.version}" }
|
|
// version = "0.60"
|
|
}
|
|
|
|
tasks.register("slackEapNotification") {
|
|
doLast {
|
|
if (!slackUrl) return
|
|
def post = new URL(slackUrl).openConnection()
|
|
def changeLog = changelog.getUnreleased().toText()
|
|
def slackDown = new DownParser(changeLog, true).toSlack().toString()
|
|
def message = """
|
|
{
|
|
"text": "New version of IdeaVim",
|
|
"blocks": [
|
|
{
|
|
"type": "section",
|
|
"text": {
|
|
"type": "mrkdwn",
|
|
"text": "IdeaVim EAP $version has been released\\n$slackDown"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
"""
|
|
post.setRequestMethod("POST")
|
|
post.setDoOutput(true)
|
|
post.setRequestProperty("Content-Type", "application/json")
|
|
post.getOutputStream().write(message.getBytes("UTF-8"))
|
|
def postRC = post.getResponseCode()
|
|
println(postRC)
|
|
if (postRC == 200) {
|
|
println(post.getInputStream().getText())
|
|
}
|
|
}
|
|
}
|