-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
46 lines (37 loc) · 884 Bytes
/
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
plugins {
id 'org.jetbrains.intellij' version '0.2.7'
}
apply plugin: 'java'
apply plugin: 'org.jetbrains.intellij'
apply plugin: 'idea'
group 'com.liveramp'
version '0.6-SNAPSHOT'
sourceCompatibility = 1.8
intellij {
updateSinceUntilBuild false
}
import org.apache.tools.ant.filters.ReplaceTokens
// Change compiler source directory
sourceSets {
main {
resources {
srcDirs = ['build/src/main/resources']
}
}
}
// Prepare sources for compilation
task prepareResources(type: Copy) {
from('src/main/resources')
into('build/src/main/resources')
filter(ReplaceTokens, tokens: [pluginVersion: version])
}
task prepareRepoVersion(type: Copy) {
from('plugins.xml')
into('build')
filter(ReplaceTokens, tokens: [pluginVersion: version])
}
// Prepare sources, before compile
compileJava {
dependsOn prepareResources
dependsOn prepareRepoVersion
}