forked from HaxeFoundation/intellij-haxe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
95 lines (74 loc) · 2.9 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
/*
* Copyright 2000-2013 JetBrains s.r.o.
* Copyright 2014-2018 AS3Boyan
* Copyright 2014-2014 Elias Ku
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id 'de.undercouch.download' version '3.3.0'
id 'org.jetbrains.intellij' version '0.3.1'
}
runIde.enabled = false
patchPluginXml.enabled = false
verifyPlugin.enabled = false
if (!project.hasProperty('targetVersion')) {
ext.ideaVersion = "${defaultIdeaVersion}"
println '-------------------------------------------------------'
println "No target version selected, using default ($ext.ideaVersion)"
println 'to specify build target use -PtargetVersion=<version>'
println 'Ex:'
println 'gradlew buildPlugin -PtargetVersion=2017.2.2'
println 'If your running "gradle clean" just ignore this warning'
println '-------------------------------------------------------'
} else {
ext.ideaVersion = project.property('targetVersion')
}
println "Target set to IDEA ${ideaVersion}"
allprojects {
repositories {
mavenCentral()
}
ext {
// modules
haxeCommonDir = "${rootDir}/haxe-common"
haxePluginDir = "${rootDir}/haxe-plugin"
generatedSrcDir = "${haxePluginDir}/gen/"
dependenciesDir = "${rootDir}/dependencies"
downloadsDir = "${dependenciesDir}/downloads"
toolDir = "${dependenciesDir}/tools"
ideaBaseDir = "${dependenciesDir}/idea-IU"
ideaTargetDir = "${ideaBaseDir}/ideaIU-${ideaVersion}"
//Note: path is system directory separator sensitive
grammarHaxe = file("${haxePluginDir}/templates/grammar/haxe.bnf").absolutePath
grammarHxml = file("${haxePluginDir}/templates/grammar/hxml.bnf").absolutePath
flexDownloadFile = "idea-flex-${ideaVersion}.skeleton"
flexTargetFile = "idea-flex.skeleton"
grammarKitDownloadFile = "GrammarKit-${grammarKitVersion}.zip"
grammarKitTargetFile = "grammar-kit.jar"
psiDownloadFile = "light-psi-all-${grammarKitVersion}.jar"
psiTargetFile = "light-psi-all.jar"
}
apply plugin: 'idea'
apply plugin: 'org.jetbrains.intellij'
intellij {
type = 'IU'
version = "IU-${ideaVersion}"
pluginName = "intellij-haxe-${ideaVersion}"
ideaDependencyCachePath "${ideaBaseDir}"
}
}
//Download build tools
apply from: 'dependencies/tools.gradle'
build.dependsOn('setupTools')
test.dependsOn('setupTools')