forked from amirkibbar/cherry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·123 lines (101 loc) · 2.83 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
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "com.gradle.publish:plugin-publish-plugin:0.9.1"
}
}
plugins {
id "com.jfrog.bintray" version "1.2"
}
group = "ajk.gradle.rabbit"
version = "0.0.4"
String repoName = 'cherry'
apply plugin: 'groovy'
apply plugin: 'maven-publish'
apply plugin: "com.gradle.plugin-publish"
compileGroovy {
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
}
repositories {
jcenter()
}
dependencies {
compile gradleApi()
compile localGroovy()
compile "de.undercouch:gradle-download-task:3.1.1"
compile "org.apache.httpcomponents:fluent-hc:4.4.1"
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
def pomConfig = {
licenses {
license {
name "The Apache Software License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution "repo"
}
}
}
publishing {
publications {
maven(MavenPublication) {
from components.java
artifact sourcesJar
pom.withXml {
def root = asNode()
root.appendNode('description', 'a gradle plugin for starting and stopping RabbitMQ during integration tests')
root.children().last() + pomConfig
}
}
}
}
task install(dependsOn: 'publishMavenPublicationToMavenLocal') << {
logger.info "installing $project.name"
}
model {
tasks.generatePomFileForMavenPublication {
destination = file("$buildDir/libs/${project.name}-${project.version}.pom")
}
}
bintray {
user = System.getenv("BINTRAY_USER")
key = System.getenv("BINTRAY_KEY")
publications = ['maven']
publish = true
pkg {
repo = 'maven'
name = project.name
websiteUrl = "https://github.com/amirkibbar/$repoName"
issueTrackerUrl = "https://github.com/amirkibbar/$repoName/issues"
vcsUrl = "https://github.com/amirkibbar/${repoName}.git"
licenses = ['Apache-2.0']
labels = ['gradle', 'plugin', 'rabbit', 'RabbitMQ', repoName]
version {
name = project.version
}
}
}
pluginBundle {
website = "https://github.com/amirkibbar/$repoName"
vcsUrl = "https://github.com/amirkibbar/${repoName}.git"
description = 'a RabbitMQ plugin for gradle to help running RabbitMQ during integration test'
tags = ['rabbit', 'RabbitMQ']
plugins {
greetingsPlugin {
id = project.group
displayName = 'Gradle RabbitMQ plugin'
}
}
mavenCoordinates {
groupId = project.group
artifactId = project.name
version = project.version
}
}
bintrayUpload.dependsOn = [sourcesJar]
publishPlugins.dependsOn = [bintrayUpload]