forked from xm-online/xm-online-idea-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
104 lines (87 loc) · 2.65 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
plugins {
id 'java'
id 'org.jetbrains.intellij' version '0.7.2'
id 'org.jetbrains.kotlin.jvm' version '1.4.21'
}
group 'com.icthh.xm'
version '0.2.6'
repositories {
mavenCentral()
}
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'Gradle Jar File Example',
'Implementation-Version': version
}
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
def webappDir = "$projectDir/src/main/webapp"
sourceSets {
main {
resources {
srcDirs = ["$webappDir/dist", "$projectDir/src/main/resources"]
}
}
}
processResources {
dependsOn "buildAngular"
}
task buildAngular(type:Exec) {
// installAngular should be run prior to this task
dependsOn "installAngular"
workingDir "$webappDir"
inputs.dir "$webappDir"
// Add task to the standard build group
group = BasePlugin.BUILD_GROUP
// ng doesn't exist as a file in windows -> ng.cmd
if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")){
commandLine "ng.cmd", "build"
} else {
commandLine "ng", "build"
}
}
task installAngular(type:Exec) {
workingDir "$webappDir"
inputs.dir "$webappDir"
group = BasePlugin.BUILD_GROUP
if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")){
commandLine "npm.cmd", "install"
} else {
commandLine "npm", "install"
}
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.21")
compile 'javax.servlet:javax.servlet-api:3.0.1'
compile 'org.eclipse.jetty:jetty-server:9.3.20.v20170531'
compile 'org.eclipse.jetty:jetty-webapp:9.3.20.v20170531'
compile 'org.eclipse.jetty:jetty-continuation:9.3.20.v20170531'
compile 'com.fasterxml.jackson.module:jackson-module-kotlin:2.9.7'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.2'
compile 'org.apache.commons:commons-lang3:3.10'
compile 'org.apache.commons:commons-text:1.8'
compile 'org.jclarion:image4j:0.7'
testCompile group: 'junit', name: 'junit', version: '4.12'
compile "org.jetbrains.kotlin:kotlin-reflect:1.4.21"
}
sourceCompatibility = 11
targetCompatibility = 11
compileKotlin {
kotlinOptions.jvmTarget = "11"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "11"
}
intellij {
version = '2020.3.2'
//version = '2021.1.2'
plugins = ['git4idea', 'Groovy', 'yaml', 'org.intellij.intelliLang', 'java']
updateSinceUntilBuild = false
}
patchPluginXml {
changeNotes """
Add change notes here.<br>
<em>most HTML tags may be used</em>"""
}