-
Notifications
You must be signed in to change notification settings - Fork 169
/
build.gradle
82 lines (71 loc) · 2.85 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import com.vladsch.flexmark.ast.Document
import com.vladsch.flexmark.html.HtmlRenderer
import com.vladsch.flexmark.parser.Parser
version '0.12.0'
buildscript {
apply plugin: 'groovy'
repositories {
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
url 'http://dl.bintray.com/jetbrains/intellij-plugin-service'
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.org.jetbrains.intellij.plugins:gradle-intellij-plugin:0.2.18"
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.1'
classpath 'org.codehaus.groovy:groovy-all:2.4.13'
classpath group: 'com.vladsch.flexmark', name: 'flexmark', version: '0.28.12'
}
}
apply plugin: 'java'
apply plugin: 'org.jetbrains.intellij'
apply plugin: 'org.junit.platform.gradle.plugin'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compileOnly 'org.projectlombok:lombok:1.16.20'
compile 'org.apache.commons:commons-collections4:4.1'
compile 'com.miguelfonseca.completely:completely-core:0.8.0'
testCompile 'org.junit.jupiter:junit-jupiter-api:5.0.1'
testRuntime 'org.junit.jupiter:junit-jupiter-engine:5.0.1'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.12.0'
}
String readmeXmlAsHtml() {
Parser parser = Parser.builder().build()
HtmlRenderer renderer = HtmlRenderer.builder().build()
String readmeContent = new File(rootProject.uri('README.md')).text
// since these images needs to shown from within intellij, lest put absolute urls so that the images & changelog will be visible
readmeContent = readmeContent.replaceAll("help\\.gif", "https://raw.githubusercontent.com/1tontech/intellij-spring-assistant/" + version + "/help.gif")
readmeContent = readmeContent.replaceAll("CHANGELOG.md", "https://github.com/1tontech/intellij-spring-assistant/blob/" + version + "/CHANGELOG.md")
Document readmeDocument = parser.parse(readmeContent)
renderer.render(readmeDocument)
}
String changeLogAsHtml() {
Parser parser = Parser.builder().build()
HtmlRenderer renderer = HtmlRenderer.builder().build()
Document changeLogDocument = parser.parse(new File(rootProject.uri('CHANGELOG.md')).text)
renderer.render(changeLogDocument)
}
intellij {
version 'IC-2017.2'
plugins = ['properties', 'yaml', 'maven', 'gradle', 'Lombook Plugin:0.16-2017.2']
downloadSources true
patchPluginXml {
pluginDescription readmeXmlAsHtml()
changeNotes changeLogAsHtml()
}
publishPlugin {
username System.getProperty('ij_plugin_portal_login')
password System.getProperty('ij_plugin_portal_password')
channels 'eap', 'nightly', 'default'
}
updateSinceUntilBuild false
}