This repository has been archived by the owner on Sep 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
190 lines (163 loc) · 4.97 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'com.netflix.nebula:nebula-dependency-recommender:4.2.0'
classpath 'com.netflix.nebula:nebula-publishing-plugin:4.2.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'org.starchartlabs.flare:flare-operations-plugins:2.0.0'
classpath 'org.starchartlabs.flare:flare-publishing-plugins:1.0.0'
}
}
apply plugin: 'groovy'
apply plugin: 'eclipse'
apply plugin: 'jacoco'
apply plugin: 'maven-publish'
apply plugin: 'nebula.dependency-recommender'
apply plugin: 'nebula.maven-resolved-dependencies'
apply plugin: 'nebula.maven-base-publish'
apply plugin: 'nebula.maven-dependencies'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'org.starchartlabs.flare.increase-test-logging'
apply plugin: 'org.starchartlabs.flare.dependency-reporting'
apply plugin: 'org.starchartlabs.flare.published-project'
description = 'Gradle plug-ins to enhance publishing operations such as jar and POM generation'
//Default all projects to a synchronized IDE version number
group = 'org.starchartlabs.flare'
dependencyRecommendations {
propertiesFile file: file("${rootDir}/dependencies.properties")
}
// Always download sources, to allow debugging, and use Eclipse containers for greater portability
eclipse {
classpath {
downloadSources=true
}
}
// JCenter is the Gradle plug-in standard
repositories {
jcenter()
}
// Dependency versions managed in $rootDir/dependencies.properties
dependencies {
compile gradleApi()
compile localGroovy()
testCompile 'org.testng:testng'
}
// Add LICENSE so it is included in all JARs, fulfilling the "distributions include license" requirement
jar{
from("${rootDir}"){
include 'LICENSE'
}
}
// All projects should provide source code and javadoc, and upload these with any released artifacts
sourcesJar{
from("${rootDir}"){
include 'LICENSE'
}
}
javadocJar{
from("${rootDir}"){
include 'LICENSE'
}
}
// Setup default test behavior, including failure logging
test {
useTestNG() {
useDefaultListeners = true
}
}
jacocoTestReport {
reports {
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
sourceSets project.sourceSets.main
xml.enabled true
csv.enabled false
html.enabled false
xml.destination file("${buildDir}/reports/jacoco/report.xml")
}
}
jacocoTestReport.dependsOn test
check.dependsOn jacocoTestReport
// If not a remote run, publish to local only
if(!project.hasProperty('remoteDeploy')){
publishing {
repositories {
mavenLocal()
}
}
}
publishedInfo {
url = 'https://github.com/Corona-IDE/flare-publishing-plugins'
scm{
github 'StarChart-Labs', 'flare-publishing-plugins'
}
licenses{
mit('repo')
}
developers{
github 'romeara', 'Ryan OMeara'
}
}
publishing {
publications {
nebula(MavenPublication) {
pom {
url = "${publishedInfo.url}"
licenses {
publishedInfo.licenses.each { lic ->
license {
name = "${lic.name}"
url = "${lic.url}"
distribution = "${lic.distribution}"
}
}
}
developers {
publishedInfo.developers.each{ dev ->
developer {
id = "${dev.id}"
name = "${dev.name}"
url = "${dev.url}"
}
}
}
contributors {
contributor {
name = 'DMaxfield-BDS'
url = 'https://github.com/DMaxfield-BDS'
}
}
scm {
connection = "${publishedInfo.scm.connection}"
developerConnection = "${publishedInfo.scm.developerConnection}"
url = "${publishedInfo.scm.url}"
}
}
}
}
}
bintray {
user = System.getProperty('bintray_user')
key = System.getProperty('bintray_key')
publications = [ 'nebula' ]
if(!project.hasProperty('remoteDeploy')){
dryRun = true
}
pkg {
repo = 'flare'
name = "${project.name}"
userOrg = 'starchart-labs'
licenses = ['MIT']
vcsUrl = 'https://github.com/StarChart-Labs/flare-publishing-plugins.git'
version {
name = "${project.version}"
desc = "${project.name} release ${project.version} final"
released = new Date()
vcsTag = "v${project.version}"
gpg {
sign = true
}
}
}
}