forked from cheng6563/intellij-spring-assistant
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbuild.gradle
111 lines (94 loc) · 3.3 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import com.vladsch.flexmark.html.HtmlRenderer
import com.vladsch.flexmark.parser.Parser
import com.vladsch.flexmark.util.ast.Document
buildscript {
repositories {
mavenLocal()
maven {
url 'https://maven.aliyun.com/repository/public'
}
mavenCentral()
}
dependencies {
classpath 'com.vladsch.flexmark:flexmark:0.62.2'
}
}
plugins {
id 'java'
id 'idea'
id 'org.jetbrains.intellij' version '1.15.0'
}
group = 'in.oneton.idea.spring'
version = '2023.2'
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
compileJava.options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
repositories {
mavenLocal()
maven {
url 'https://maven.aliyun.com/repository/public'
}
mavenCentral()
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
testCompileOnly {
extendsFrom annotationProcessor
}
}
dependencies {
['annotationProcessor', 'compileOnly', 'testAnnotationProcessor', 'testCompileOnly']
.each { conf -> add(conf, 'org.projectlombok:lombok:1.18.20') }
implementation 'org.apache.commons:commons-collections4:4.4'
implementation 'com.miguelfonseca.completely:completely-core:0.9.0'
testImplementation(platform('org.junit:junit-bom:5.7.2'))
testImplementation 'org.mockito:mockito-core:3.11.2'
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
}
clean.doFirst {
delete 'build', 'out'
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
type = 'IC'
// version = '232.8453-EAP-CANDIDATE-SNAPSHOT'
version = '2023.2'
pluginName = 'intellij-spring-helper'
plugins = ['java', 'properties', 'yaml', 'maven', 'gradle']
updateSinceUntilBuild = false
}
tasks{
// publishPlugin {
// token System.getenv('IJ_PLUGIN_TOKEN')
// // username System.getProperty('ij_plugin_portal_login')
// // password System.getProperty('ij_plugin_portal_password')
// channels 'eap', 'nightly', 'default'
// }
patchPluginXml {
sinceBuild = '232'
untilBuild = '232.*'
pluginDescription = provider {readmeXmlAsHtml()}
changeNotes = provider {changeLogAsHtml()}
}
}
String readmeXmlAsHtml() {
final 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
.replaceAll("help\\.gif", "https://raw.githubusercontent.com/cheng6563/intellij-spring-assistant/" + "1.0.6" + "/help.gif")
.replaceAll("CHANGELOG.md", "https://github.com/cheng6563/intellij-spring-assistant/blob/" + "1.0.6" + "/CHANGELOG.md")
final Document readmeDocument = Parser.builder().build().parse(readmeContent)
HtmlRenderer.builder().build().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)
}