-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
51 lines (41 loc) · 1.26 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
/*
* Copyright (c) 2010.
* Author Kelly Robinson.
*/
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'codenarc'
apply plugin: 'project-report'
group = 'org.kar'
version = '0.2-SNAPSHOT'
repositories {
mavenCentral()
}
def HAMCREST = ['org.hamcrest:hamcrest-core:1.2@jar', 'org.hamcrest:hamcrest-library:1.2@jar']
dependencies {
compile gradleApi()
groovy group: 'org.codehaus.groovy', name: 'groovy', version: '1.7.6'
testCompile group: 'junit', name: 'junit', version: '4.8.2'
testCompile HAMCREST
}
idea.module {
downloadJavadoc = true
outputDir = "$rootProject.projectDir/intellij/out" as File
testOutputDir = "$rootProject.projectDir/intellij/testOut" as File
}
idea.project.ipr {
withXml { provider ->
def node = provider.asNode()
// Use git
def vcsConfig = node.component.find { it.'@name' == 'VcsDirectoryMappings' }
vcsConfig.mapping[0].'@vcs' = 'Git'
// Set gradle home
def gradleSettings = node.appendNode('component', [name: 'GradleSettings'])
gradleSettings.appendNode('option', [name: 'SDK_HOME', value: gradle.gradleHomeDir.absolutePath])
}
}
task wrapper(type:Wrapper){
gradleVersion = '1.0-rc-3'
}
defaultTasks 'clean', 'build'