-
Notifications
You must be signed in to change notification settings - Fork 105
/
Copy pathbuild.gradle
132 lines (115 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
plugins {
id 'org.jetbrains.intellij' version '1.17.3'
id 'checkstyle'
id 'pmd'
id 'org.jetbrains.changelog' version '2.2.0'
}
repositories {
mavenCentral()
}
group 'com.magento.idea'
version '5.3.1'
apply plugin: 'org.jetbrains.intellij'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'groovy'
apply plugin: 'org.jetbrains.changelog'
def phpPluginVersion = System.getProperty("phpPluginVersion", "241.14494.158")
def ideaVersion = System.getProperty("ideaVersion", "2024.1")
def javaVersion = 17
java {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}
intellij {
version = ideaVersion
type = 'IU'
pluginName = 'com.magento.idea.magento2plugin'
plugins = [
"com.jetbrains.php:$phpPluginVersion",
'yaml',
'java-i18n',
'properties',
'com.intellij.css',
'JavaScript',
'com.intellij.lang.jsgraphql:241.14494.150',
'platform-images',
'copyright'
]
updateSinceUntilBuild = false
sameSinceUntilBuild = false
downloadSources = !Boolean.valueOf(System.getenv('CI'))
sandboxDir = "${project.rootDir}/.idea-sandbox"
patchPluginXml {
changeNotes = provider { changelog.getLatest().toHTML() }
}
}
sourceSets {
main {
java.srcDirs 'src'
resources.srcDir 'resources'
}
test {
java.srcDir 'tests'
resources.srcDir 'testData'
}
}
publishPlugin {
token = System.getenv("MAGENTO_PHPSTORM_intellijPublishToken")
if (Boolean.valueOf(System.getenv("MAGENTO_PHPSTORM_isAlpha"))) {
channels = ['alpha']
version = version + "-alpha-" + getDate()
}
}
static def getDate() {
def date = new Date()
def formattedDate = date.format('yyyy-MM-dd-HH-mm')
return formattedDate
}
apply from: "${project.rootDir}/gradle-tasks/staticChecks.gradle"
changelog {
version = "${project.version}"
path = "${project.projectDir}/CHANGELOG.md"
header = provider { "[${project.version}] - ${getDate()}" }
headerParserRegex = ~/(\d+\.)?(\d+\.)?(\*|\d+)/
itemPrefix = "-"
keepUnreleasedSection = true
unreleasedTerm = "[Unreleased]"
groups = ["Added", "Changed", "Deprecated", "Removed", "Fixed", "Security"]
}
idea {
project {
jdkName = javaVersion
languageLevel = javaVersion
}
module {
generatedSourceDirs += file('gen')
}
}
dependencies {
implementation(
"org.junit.jupiter:junit-jupiter:5.8.2",
"com.googlecode.json-simple:json-simple:1.1.1"
)
testRuntimeOnly('org.junit.vintage:junit-vintage-engine:5.9.0')
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.9.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.00")
}
test {
useJUnitPlatform {
includeEngines("junit-vintage")
}
dependsOn cleanTest
testLogging.showStandardStreams = true
testLogging {
lifecycle {
events "skipped", "failed", "standard_error", "standard_out"
exceptionFormat "short"
}
}
maxHeapSize = '1G'
}