forked from ishchenko/idea-nginx
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
65 lines (55 loc) · 1.47 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
import org.ajoberstar.grgit.Grgit
plugins {
id "org.jetbrains.intellij" version "0.7.3"
id "org.ajoberstar.grgit" version "4.1.1"
id "java"
id "idea"
}
group 'net.ishchenko.idea.nginx'
version '0.1.10'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
}
sourceSets {
main {
java.srcDirs 'src', 'gen'
resources.srcDir 'resources'
}
test {
java.srcDir 'tests'
}
}
intellij {
version '2019.2' //IntelliJ IDEA dependency
updateSinceUntilBuild false
pluginName 'idea-nginx-support'
publishPlugin {
username project.hasProperty('user') ? user : ''
password project.hasProperty('pass') ? pass : ''
}
}
task generateDocumentation(type: JavaExec) {
main = 'net.ishchenko.idea.nginx.KeywordsFromSourcesGenerator'
classpath = sourceSets.main.runtimeClasspath
}
task getRepos() {
doLast {
def path = 'vendor/nginx'
if (!file(path).exists()) {
Grgit.clone(dir: file(path), uri: 'https://github.com/nginx/nginx.git')
} else {
Grgit.open(dir: file(path)).pull()
}
def luaPath = 'vendor/lua-nginx-module'
if (!file(luaPath).exists()) {
Grgit.clone(dir: file(luaPath), uri: 'https://github.com/openresty/lua-nginx-module.git')
} else {
Grgit.open(dir: file(luaPath)).pull()
}
}
}