forked from agorapulse/micronaut-aws-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
191 lines (156 loc) · 5.75 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
191
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2018-2021 Agorapulse.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/
plugins {
id 'org.kordamp.gradle.groovy-project'
id 'org.kordamp.gradle.checkstyle'
id 'org.kordamp.gradle.codenarc'
id 'org.kordamp.gradle.coveralls'
id 'io.github.gradle-nexus.publish-plugin'
}
logger.lifecycle "Using Micronaut $micronautVersion"
if (!project.hasProperty('ossrhUsername')) ext.ossrhUsername = System.getenv('SONATYPE_USERNAME') ?: '**UNDEFINED**'
if (!project.hasProperty('ossrhPassword')) ext.ossrhPassword = System.getenv('SONATYPE_PASSWORD') ?: '**UNDEFINED**'
if (!project.hasProperty('signingKeyId')) ext.signingKeyId = System.getenv('SIGNING_KEY_ID') ?: '**UNDEFINED**'
if (!project.hasProperty('signingPassword')) ext.signingPassword = System.getenv('SIGNING_PASSWORD') ?: '**UNDEFINED**'
if (!project.hasProperty('signingSecretKey')) ext.signingSecretKey = System.getenv('SIGNING_SECRET_KEY_PATH') ? rootProject.file(System.getenv('SIGNING_SECRET_KEY_PATH')).text : '**UNDEFINED**'
config {
release = (rootProject.findProperty('release') ?: false).toBoolean()
info {
name = 'Micronaut Libraries'
vendor = 'Agorapulse'
description = 'Set of useful libraries for Micronaut'
links {
website = "https://github.com/${slug}"
issueTracker = "https://github.com/${slug}/issues"
scm = "https://github.com/${slug}.git"
}
people {
person {
id = 'musketyr'
name = 'Vladimir Orany'
roles = ['developer']
}
}
repositories {
repository {
name = 'localRelease'
url = "${project.rootProject.buildDir}/repos/local/release"
}
repository {
name = 'localSnapshot'
url = "${project.rootProject.buildDir}/repos/local/snapshot"
}
}
}
licensing {
licenses {
license {
id = 'Apache-2.0'
}
}
}
publishing {
signing {
enabled = true
keyId = signingKeyId
secretKey = signingSecretKey
password = signingPassword
}
releasesRepository = 'localRelease'
snapshotsRepository = 'localSnapshot'
}
quality {
checkstyle {
toolVersion = '8.27'
}
codenarc {
toolVersion = '1.5'
}
}
docs {
groovydoc {
enabled = false
aggregate {
enabled = false
}
}
}
}
nexusPublishing {
repositories {
sonatype {
username = ossrhUsername
password = ossrhPassword
}
}
}
allprojects {
repositories {
mavenCentral()
maven { url "https://repo.spring.io/release" }
}
license {
exclude '**/*.json'
exclude '***.yml'
}
}
subprojects { Project subproject ->
if (subproject.name == 'guide' || subproject.name == 'micronaut-aws-sdk-dependencies') return
apply plugin: 'groovy'
dependencies {
annotationProcessor platform("io.micronaut:micronaut-bom:$micronautVersion")
compile platform(project(':micronaut-aws-sdk-dependencies'))
annotationProcessor "io.micronaut:micronaut-inject-java"
// Groovy
if (subproject.name.startsWith('micronaut-amazon-awssdk')) {
compileOnly "org.codehaus.groovy:groovy:$groovyVersion"
testCompile "org.codehaus.groovy:groovy:$groovyVersion"
} else {
compile "org.codehaus.groovy:groovy:$groovyVersion"
compile "io.micronaut:micronaut-runtime-groovy"
compileOnly "io.micronaut:micronaut-inject-groovy"
}
compile "io.micronaut:micronaut-inject"
compile "io.micronaut:micronaut-runtime"
compileOnly "io.micronaut:micronaut-inject-java"
runtime "ch.qos.logback:logback-classic:1.2.3"
testAnnotationProcessor platform("io.micronaut:micronaut-bom:$micronautVersion")
testAnnotationProcessor "io.micronaut:micronaut-inject-java"
testCompile platform("io.micronaut:micronaut-bom:$micronautVersion")
testCompile "io.micronaut:micronaut-inject-groovy"
testCompile("org.spockframework:spock-core:$spockVersion") {
exclude group: "org.codehaus.groovy", module: "groovy-all"
}
testCompile 'cglib:cglib-nodep:3.2.0'
testCompile 'org.objenesis:objenesis:1.2'
testCompileOnly 'com.agorapulse:remember:0.4.2'
}
compileJava.options.compilerArgs += '-parameters'
compileTestJava.options.compilerArgs += '-parameters'
test {
environment 'AWS_CBOR_DISABLE', 'true'
systemProperty 'TEST_RESOURCES_FOLDER', new File(subproject.projectDir, 'src/test/resources').canonicalPath
systemProperty 'user.timezone', 'UTC'
systemProperty 'user.language', 'en'
}
task cleanOut(type: Delete) {
delete file('out')
}
clean.dependsOn cleanOut
}
check.dependsOn('aggregateCheckstyle', 'aggregateCodenarc', 'aggregateAllTestReports', 'coveralls')