-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
117 lines (97 loc) · 3.2 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
112
113
114
115
116
117
// SPDX-License-Identifier: MIT
import org.jetbrains.changelog.ExtensionsKt
import java.text.SimpleDateFormat
plugins {
id 'java'
// see https://github.com/JetBrains/gradle-intellij-plugin and
// https://plugins.gradle.org/plugin/org.jetbrains.intellij
id 'org.jetbrains.intellij' version '1.14.2'
// https://github.com/JetBrains/gradle-changelog-plugin#initializechangelog
id("org.jetbrains.changelog") version "1.2.1"
id 'org.asciidoctor.jvm.convert' version '3.3.2'
}
repositories {
// intellij plugin adds www.jetbrains.com/intellij-repository/releases in a redirected way over
// https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases
mavenCentral()
}
// Info: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'lib')
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
}
apply plugin: "org.jetbrains.intellij"
// apply plugin: 'org.jetbrains.changelog'
group 'com.mercedesbenz.sechub'
version '0.4.0'
sourceCompatibility = '17'
targetCompatibility = '17'
tasks.withType(JavaCompile) {
options.release = 17
}
sourceSets{
main{
java{
srcDirs 'src/main/java', 'src/main/java-intellij'
}
}
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
// we chose 2023.1.1 - to have compatibility to Android Studio (Hedgehog, 2023.1.1 is last stable release at the moment)
// https://developer.android.com/studio/releases/
// https://plugins.jetbrains.com/docs/intellij/android-studio-releases-list.html#2023
version= '2023.1.1'
}
/*
// changenotes plugin does currently not work well in combination
// with intellij plugin 1.1.6 - so currently not used
tasks {
patchPluginXml {
changeNotes.set({ changelog.getLatest().toHTML() })
}
}
*/
patchPluginXml {
sinceBuild = '231'
untilBuild =''
}
signPlugin {
certificateChain = System.getenv("SECHUB_CERTIFICATE_CHAIN")
privateKey = System.getenv("SECHUB_PRIVATE_KEY")
password = System.getenv("SECHUB_PRIVATE_KEY_PASSWORD")
}
publishPlugin {
token = System.getenv("SECHUB_INTELLIJ_PUBLISH_TOKEN")
}
asciidoctor {
baseDirFollowsSourceDir()
sources {
include 'user-guide.adoc', 'plugin-development.adoc'
}
outputDir file('build/docs/asciidoc')
attributes 'build-gradle': file('build.gradle'),
'source-highlighter': 'coderay',
'toc': 'left',
'toclevels': '5',
'icons': 'font',
'setanchors': 'true',
'idprefix': '',
'idseparator': '-',
'docinfo1': 'true',
'sectnums': 'true',
'sectnumlevels': '5',
'version': rootProject.version
}
/*
changelog {
version = "0.3.0"
path = "${project.projectDir}/CHANGELOG.md"
header = "[${-> version.get()}] - ${new SimpleDateFormat("yyyy-MM-dd").format(new Date())}"
headerParserRegex = ~/\d+\.\d+/
itemPrefix = "-"
keepUnreleasedSection = true
unreleasedTerm = "[Unreleased]"
groups = ["Added", "Changed", "Deprecated", "Removed", "Fixed", "Security"]
}
*/