forked from TeamCodeStream/codestream
/
build.gradle
230 lines (117 loc) · 4.12 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
plugins {
id "java"
id "idea"
id "org.jetbrains.intellij" version "0.6.5"
id "org.jetbrains.kotlin.jvm" version "1.3.72"
}
group "com.codestream"
version "11.0.3"
sourceCompatibility = 1.8
repositories {
jcenter()
mavenCentral()
maven { url = "https://europe-maven.pkg.dev/jxbrowser/releases" }
maven { url = "https://www.jetbrains.com/intellij-repository/snapshots" }
}
ext {
jxBrowserVersion = "7.7.1"
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-reflect:1.3.72"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.3.0"
// implementation "com.teamdev.jxbrowser:jxbrowser-cross-platform:${jxBrowserVersion}"
implementation "com.teamdev.jxbrowser:jxbrowser-win32:${jxBrowserVersion}"
implementation "com.teamdev.jxbrowser:jxbrowser-win64:${jxBrowserVersion}"
implementation "com.teamdev.jxbrowser:jxbrowser-mac:${jxBrowserVersion}"
implementation "com.teamdev.jxbrowser:jxbrowser-linux64:${jxBrowserVersion}"
implementation "com.teamdev.jxbrowser:jxbrowser-swing:${jxBrowserVersion}"
implementation group: "org.eclipse.lsp4j", name: "org.eclipse.lsp4j", version: "0.8.0"
implementation "com.github.salomonbrys.kotson:kotson:2.5.0"
implementation("io.sentry:sentry:1.7.27") {
exclude group: 'org.slf4j', module: 'slf4j-simple'
exclude group: 'org.slf4j', module: 'slf4j-api'
}
implementation group: 'commons-io', name: 'commons-io', version: '2.6'
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
patchPluginXml {
changeNotes "${file('docs/change-notes.html').getText('UTF-8')}"
pluginDescription "${file('docs/description.html').getText('UTF-8')}"
}
idea {
module {
excludeDirs += file("src/main/resources/agent")
excludeDirs += file("src/main/resources/webview")
}
}
intellij {
type "IC"
// the version parameter dictates which jars will be used at compilation time
version "2019.2.2" // earliest version we support
// version "201.5616-EAP-CANDIDATE-SNAPSHOT"
// version "2019.2.3"
// version "2019.3"
// version "IC-2019.2.2"
// version "2018.3.4" // you can also specify dot dot releases
// version "IC-2018.2.7" //
// version "PC-2018.2"
intellij.updateSinceUntilBuild false
// Run on a locally installed IDE, different from the build dependency specified via type/version
intellij.alternativeIdePath idePath
plugins = ['git4idea']
}
runIde {
// jbrVersion "8u202b1483.58"
// jbrVersion "11_0_2b159"
// jvmArgs '-Dsun.java2d.uiScale.enabled=false'
// jvmArgs '-Dkotlinx.coroutines.debug=on'
// jvmArgs '-Dcom.codestream.recordRequests=true'
jvmArgs '-Xmx2048m'
jvmArgs '-Xms128m'
}
import org.gradle.internal.os.OperatingSystem
task buildDeps(type: Exec) {
String npm = 'npm';
if (OperatingSystem.current().isWindows()) {
npm = 'npm.cmd'
}
workingDir "$projectDir"
commandLine npm, 'run', 'bundle'
}
task buildDepsMac(type: Exec) {
workingDir "$projectDir"
commandLine 'npm', 'run', 'bundle:mac'
}
task copyAgent(type: Copy) {
from "$projectDir/../shared/agent/dist"
include "**/*"
into "$projectDir/src/main/resources/agent"
}
task buildDependencies {}
buildDependencies.dependsOn buildDeps, copyAgent
task buildDependenciesMac {}
buildDependenciesMac.dependsOn buildDepsMac, copyAgent
buildPlugin.dependsOn buildDependencies
task buildDebugDeps(type: Exec) {
String npm = 'npm';
if (OperatingSystem.current().isWindows()) {
npm = 'npm.cmd'
}
workingDir "$projectDir"
commandLine npm, 'run', 'build'
}
task copyDebugAgent(type: Copy) {
from "$projectDir/../shared/agent/dist"
include "**/*"
into "$projectDir/src/main/resources/agent"
}
copyDebugAgent.dependsOn buildDebugDeps
task buildDebugDependencies {}
buildDebugDependencies.dependsOn buildDebugDeps, copyDebugAgent