This repository was archived by the owner on Aug 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.gradle
More file actions
181 lines (158 loc) · 5.47 KB
/
build.gradle
File metadata and controls
181 lines (158 loc) · 5.47 KB
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
/*
* Copyright (c) 2017 CA. All rights reserved.
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
plugins {
id "com.gradle.plugin-publish" version "0.10.0"
id "org.sonarqube" version "2.6.2"
id "com.srcclr.gradle" version "3.0.3"
id "com.jfrog.bintray" version "1.8.4"
}
description = 'The modular assertion builder plugin can be used to build modular assertions for the CA API Gateway'
group 'com.ca.apim.gateway'
tag {
message {
"version: ${version} build-date: " + new Date().format('yyyy-MM-dd\'T\'HH:mm:ss')
}
}
project.ext.'gradle.publish.key' = System.env.GRADLE_PUBLISH_KEY
project.ext.'gradle.publish.secret' = System.env.GRADLE_PUBLISH_SECRET
apply plugin: 'base'
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'com.srcclr.gradle'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile gradleApi()
testCompile 'junit:junit:4.12'
}
repositories {
mavenCentral()
}
test {
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
}
}
task sourceJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
task javadocJar(type: Jar) {
from javadoc
classifier = 'javadoc'
}
artifacts {
archives javadocJar, sourceJar
}
jar {
manifest {
attributes(
"Implementation-Title": name,
"Implementation-Version": version)
}
}
// Create the pom configuration:
publishing {
publications {
gwPlugin( MavenPublication ) {
from components.java
artifact( sourceJar ) {
classifier = 'sources'
}
artifact( javadocJar ) {
classifier = "javadoc"
}
pom {
name = project.name
description = project.description
url = 'https://github.com/ca-api-gateway/modular-assertion-builder'
organization {
name = 'CA API Gateway'
url = 'https://github.com/ca-api-gateway'
}
licenses {
license {
name = 'MIT'
url = 'https://github.com/ca-api-gateway/modular-assertion-builder/blob/master/LICENSE'
}
}
scm {
url = 'https://github.com/ca-api-gateway/modular-assertion-builder'
connection = 'scm:git:https://github.com/ca-api-gateway/modular-assertion-builder.git'
developerConnection = 'scm:git:git@github.com:ca-api-gateway/modular-assertion-builder.git'
}
issueManagement {
system = 'github'
url = 'https://github.com/ca-api-gateway/modular-assertion-builder/issues'
}
developers {
developer {
id = 'apigatewayopensource'
name = 'CA API Gateway Bot'
email = 'API-Gateway-OpenSource@ca.com'
organization = 'CA API Gateway'
organizationUrl = 'https://github.com/ca-api-gateway'
}
}
}
}
}
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
publications = ['gwPlugin']
publish = true
pkg {
repo = 'modular-assertion-builder'
userOrg = 'ca-api-gateway'
name = project.name
desc = project.description
licenses = ['MIT']
websiteUrl = 'https://github.com/ca-api-gateway/modular-assertion-builder'
vcsUrl = 'https://github.com/ca-api-gateway/modular-assertion-builder.git'
githubRepo = 'ca-api-gateway/modular-assertion-builder'
version {
name = project.version
released = new Date()
vcsTag = 'release/' + project.version
gpg {
sign = true
}
mavenCentralSync {
sync = true
user = project.hasProperty('ossrhUsername') ? project.property('ossrhUsername') : System.getenv('OSS_USER') //OSS user token: mandatory
password = project.hasProperty('ossrhPassword') ? project.property('ossrhPassword') : System.getenv('OSS_PASSWORD') //OSS user password: mandatory
}
}
}
}
pluginBundle {
website = 'https://github.com/ca-api-gateway/modular-assertion-builder'
vcsUrl = 'https://github.com/ca-api-gateway/modular-assertion-builder'
plugins {
greetingsPlugin {
id = 'com.ca.apim.gateway.modular-assertion-builder'
displayName = 'CA API Gateway Modular Assertion Builder Gradle Plugin'
description = 'The modular assertion builder plugin can be used to build modular assertions for the CA API Gateway'
tags = ['ca api gateway','building']
}
}
}
model {
tasks.generatePomFileForGwPluginPublication {
destination = file( "${buildDir}/generated-pom.xml" )
}
}
task generatePomFile( dependsOn: 'generatePomFileForGwPluginPublication' )
wrapper {
gradleVersion = '4.10.2'
}