forked from magento/magento2-phpstorm-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
116 lines (98 loc) · 2.66 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
/*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
plugins {
id 'org.jetbrains.intellij' version '1.1.4'
id 'checkstyle'
id 'pmd'
id 'org.jetbrains.changelog' version '1.2.1'
}
repositories {
mavenCentral()
}
group 'com.magento.idea'
version '5.0.0'
apply plugin: 'org.jetbrains.intellij'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'groovy'
apply plugin: 'org.jetbrains.changelog'
def phpPluginVersion = System.getProperty("phpPluginVersion", "212.5080.55")
def ideaVersion = System.getProperty("ideaVersion", "2021.2.1")
def javaVersion = 11
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
intellij {
version = ideaVersion
type = 'IU'
pluginName = 'com.magento.idea.magento2plugin'
plugins = [
"com.jetbrains.php:$phpPluginVersion",
'yaml',
'java-i18n',
'properties',
'CSS',
'JavaScriptLanguage',
'com.intellij.lang.jsgraphql:3.1.2',
'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 {
testImplementation 'junit:junit:4.13'
implementation 'com.googlecode.json-simple:json-simple:1.1.1'
}
test {
useJUnit()
maxHeapSize = '1G'
}