forked from GradleUp/shadow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
116 lines (99 loc) · 3.21 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
import org.gradle.wrapper.Download
import org.gradle.wrapper.GradleUserHomeLookup
import org.gradle.wrapper.Install
import org.gradle.wrapper.PathAssembler
import org.gradle.wrapper.WrapperConfiguration
import org.gradle.wrapper.WrapperExecutor
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:0.5'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.0.0"
classpath "org.asciidoctor:asciidoctor-gradle-plugin:0.7.3"
}
}
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'project-report'
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
apply from: file('gradle/docs.gradle')
apply from: file('gradle/publish.gradle')
repositories {
jcenter()
maven {
url 'http://dl.bintray.com/johnrengelman/gradle-plugins'
}
}
sourceSets {
testUtils
}
dependencies {
compile localGroovy()
compile gradleApi()
compile 'org.jdom:jdom2:2.0.5'
compile 'org.ow2.asm:asm:5.0.3'
compile 'org.ow2.asm:asm-commons:5.0.3'
compile 'commons-io:commons-io:2.4'
compile 'org.apache.ant:ant:1.9.4'
testUtilsCompile localGroovy()
testUtilsCompile gradleApi()
testUtilsCompile 'com.github.jengelman.gradle.plugins:gradle-test-kit:0.2'
testCompile configurations.testUtilsCompile
testCompile("org.spockframework:spock-core:0.7-groovy-1.8") {
exclude module: 'groovy-all'
}
testCompile 'xmlunit:xmlunit:1.3'
}
test {
if (System.env.CI == 'true') {
testLogging.showStandardStreams = true
}
}
jar {
from rootProject.file('LICENSE')
from rootProject.file('NOTICE')
}
idea {
project {
jdkName = '1.7'
languageLevel = '1.6'
}
module {
testSourceDirs += sourceSets.testUtils.allSource.srcDirs
scopes.TEST.plus += configurations.testUtilsRuntime
}
}
sourceCompatibility = '1.6'
targetCompatibility = '1.6'
sourceSets.test.compileClasspath += sourceSets.testUtils.output
sourceSets.test.runtimeClasspath += sourceSets.testUtils.output
asciidoctor {
baseDir = project.file('src/asciidoc')
options = [
attributes: [
toc : 'left',
doctype : 'book',
icons : 'font',
encoding : 'utf-8',
sectlink : true,
sectanchors : true,
numbered : true,
linkattrs : true,
imagesdir : 'images',
linkcss : true,
// stylesheet : 'css/style.css',
]
]
}
task installWrappers << {
WrapperExecutor wrapperExecutor = WrapperExecutor.forWrapperPropertiesFile(file('gradle/wrapper/gradle-wrapper.properties'), System.out)
['1.11', '1.12', '2.0', '2.1', '2.2'].each {
WrapperConfiguration config = wrapperExecutor.config
config.setDistribution(new URI("https://services.gradle.org/distributions/gradle-$it-bin.zip"))
Install install = new Install(new Download("gradlew", it),
new PathAssembler(GradleUserHomeLookup.gradleUserHome()))
install.createDist(config)
}
}