-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
124 lines (105 loc) · 3.39 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
plugins {
id "com.gradle.plugin-publish" version "0.9.9"
id "java-gradle-plugin"
id "com.github.hierynomus.license" version "0.14.0"
id 'nebula.nebula-release' version '4.0.1'
id "com.jfrog.bintray" version "1.8.0"
}
apply plugin: 'groovy'
dependencies {
compile gradleApi()
compile localGroovy()
compile "com.xebialabs.deployit.engine:remote-booter:2017.5.0"
compile group: 'com.google.guava', name: 'guava', version: '23.0'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
gradlePlugin {
plugins {
xlDeployGradlePlugin {
id = "com.xebialabs.xl-deploy"
implementationClass = "com.xebialabs.gradle.xldeploy.XlDeployPlugin"
}
}
}
release {
defaultVersionStrategy = nebula.plugin.release.NetflixOssStrategies.FINAL
}
tasks.release.dependsOn tasks.publishPlugins
tasks.release.dependsOn tasks.bintrayUpload
tasks.releaseCheck.dependsOn tasks.clean
tasks.releaseCheck.dependsOn tasks.licenseTest
if (!project.hasProperty('release.scope')) {
project.ext['release.scope'] = 'patch'
}
clean.doLast {
project.delete 'src/test/resources/HelloDeployment/build'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
pluginBundle {
website = 'https://github.com/xebialabs-community/gradle-xld-plugin'
vcsUrl = 'https://github.com/xebialabs-community/gradle-xld-plugin.git'
tags = ['deployment', 'deploy', 'xldeploy', 'cd', 'continuous delivery']
description = """\
This Gradle plugin allows you to deploy your application to an environment as a part of the build process. It uses XL Deploy (http://xebialabs.com/products/xl-deploy/) server to perform the deployment.
Please find more information and usage instructions on the GitHub project page (https://github.com/xebialabs-community/gradle-xld-plugin/blob/master/README.md).
NOTE: THIS PLUGIN DEPENDS ON SOME ADDITIONAL REPOSITORIES:
buildscript {
repositories {
maven {
url "https://dist.xebialabs.com/public/maven2/"
}
}
}
plugins {
id "com.xebialabs.xl-deploy" version "x.x.x"
}
"""
plugins {
xlDeployPlugin {
id = 'com.xebialabs.xl-deploy'
displayName = 'Gradle XL Deploy plugin'
}
}
mavenCoordinates {
groupId = 'com.xebialabs.gradle'
artifactId = 'xl-deploy-gradle-plugin'
}
}
license {
header rootProject.file('License.md')
strictCheck false
ext.year = Calendar.getInstance().get(Calendar.YEAR)
ext.name = 'XEBIALABS'
excludes(["**/*.txt","**/gradlew*","**/gradle-wrapper.*","src/test/resources/HelloDeployment/.gradle/**"])
}
clean.doLast {
delete "src/test/resources/HelloDeployment/.gradle",
"src/test/resources/HelloDeployment/build",
"src/test/resources/HelloDeployment/userHome"
}
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://dist.xebialabs.com/public/maven2/"
}
}
apply from: 'extra_publication.gradle'
// Pass to the external maven repositories after any modifications have been done during
// the evaluation phase (as in an init.gradle script). Needed for builds that are done
// inside a corporate firewall.
afterEvaluate {
String gradleMavenRepos = repositories.withType(MavenArtifactRepository).findAll {
it.name != 'MavenLocal' && it.name != 'Embedded Kotlin Repository'
}.url.join(',')
test {
systemProperty 'gradleMavenRepos', gradleMavenRepos
}
}