This repository has been archived by the owner on Apr 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild.gradle
169 lines (137 loc) · 4.25 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
//
// ============================================================================
// (C) Copyright Schalk W. Cronje 2013-2015
//
// This software is licensed under the Apache License 2.0
// See http://www.apache.org/licenses/LICENSE-2.0 for license details
//
// 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.
//
// ============================================================================
//
// PLEASE NOTE: Integration Tests and Gradle Compatibility tests download a number of files.
plugins {
id 'com.gradle.build-scan' version '2.2.1'
id 'groovy'
id 'maven'
id 'java-gradle-plugin'
id 'com.gradle.plugin-publish' version '0.9.9'
id 'com.github.hierynomus.license' version '0.12.1'
id 'org.ysb33r.gradletest' version '2.0-rc.4'
id 'org.ysb33r.os' version '0.9'
}
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
apply from: 'gradle/integration-tests.gradle'
sourceCompatibility = 1.8
targetCompatibility = 1.8
ext {
ivyVersion = '2.4.0'
groovyLongVer = GroovySystem.version
groovyShortVer = GroovySystem.version.replaceAll(/\.\d+$/, '')
}
apply from: 'gradle/ivyAntVersions.gradle'
repositories {
jcenter()
}
configurations {
spock
ivy
testCompile.extendsFrom spock
integrationTestCompile.extendsFrom spock
remoteTestCompile.extendsFrom spock
}
dependencies {
spock "org.spockframework:spock-core:1.2-groovy-${groovyShortVer}", {
exclude module: 'groovy-all'
exclude group: 'org.codehaus.groovy'
}
compileOnly "org.apache.ivy:ivy:${ivyVersion}"
compile 'org.ysb33r.gradle:grolifant:0.12.1'
compile gradleApi()
compile localGroovy()
testCompile 'org.slf4j:slf4j-api:1.7.13'
testCompile 'org.slf4j:slf4j-simple:1.7.13'
integrationTestCompile gradleTestKit()
remoteTestCompile localGroovy()
remoteTestRuntime "org.codehaus.groovy:groovy-ant:${groovyLongVer}"
remoteTestRuntime "org.apache.ivy:ivy:${ivyVersion}"
}
tasks.withType(Test) {
if (gradle.startParameter.isOffline()) {
systemProperties OFFLINE: 1
}
}
processResources {
from generateIvyAntVersions, {
into 'META-INF'
}
}
license {
header = rootProject.file('config/HEADER')
strictCheck = true
ignoreFailures = false
mapping {
groovy = 'DOUBLESLASH_STYLE'
}
ext.year = '2013-2019'
excludes([
'**/*.ad',
'**/*.asciidoc',
'**/*.adoc',
'**/*.md',
'**/*.properties',
'**/*.dsl.groovySpec.groovy',
'**/*.dsl.kotlinSpec.groovy',
])
}
pluginBundle {
description = 'A plugin that keeps a local repository for offline of isolated environments'
website = 'https://github.com/ysb33r/ivypot-gradle-plugin'
vcsUrl = 'https://github.com/ysb33r/ivypot-gradle-plugin.git'
tags = ['repositoryManagement', 'repositories']
plugins {
ivypotPlugin {
id = 'org.ysb33r.ivypot'
displayName = 'Plugin for maintaining an offline respository'
}
binaryPotBasePlugin {
id = 'org.ysb33r.ivypot.binary.base'
displayName = 'Plugin that allows specification of arbitrary binaries to be cached by the ivypot plugin'
}
}
mavenCoordinates {
groupId = project.group
artifactId = 'ivypot'
}
}
publishPlugins {
group 'release'
onlyIf { !version.endsWith("SNAPSHOT") }
mustRunAfter build
}
gradleTest {
versions '6.1'
versions '5.4.1'
versions '5.0'
inputs.files jar
beforeTest {
println " ${it.name}"
}
if (OS.windows) {
gradleArguments '-g', file("${buildDir}/gradleTest/userHome").absolutePath.replaceAll(~$/\\/$, '/')
}
mustRunAfter test, integrationTest, remoteTest
}
task release {
group 'release'
description 'Life-cycle task for releasing the plugin'
dependsOn build, publishPlugins
}
pluginManager.withPlugin('idea') {
tasks.ideaModule.dependsOn processResources
}