-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
162 lines (140 loc) · 5.26 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
plugins {
id 'java'
}
allprojects {
group 'io.redskap.aws.dynamodb.java'
version '1.0-SNAPSHOT'
}
//<editor-fold desc="Project Publishing Properties">
ext.publishProjectName = 'Redskap.io Aws DynamoDB Java Test Utils'
ext.publishProjectDescription = 'Test Utilities for developing applications with AWS DynamoDB.'
ext.publishProjectUrl = 'https://github.com/redskap/redskap-aws-dynamodb-java-test-utils'
ext.publishProjectScmConnection = 'scm:git:git://github.com/redskap/redskap-aws-dynamodb-java-test-utils.git'
ext.publishProjectScmDevDevConnection = 'scm:git:ssh://github.com:redskap/redskap-aws-dynamodb-java-test-utils.git'
ext.publishProjectScmUrl = 'https://github.com/redskap/redskap-aws-dynamodb-java-test-utils'
ext.publishProjectDevelopers = [["redskap", "redskap.io", "[email protected]"], ["mracsko", "Balazs Sandor Mracsko", "[email protected]"]]
//</editor-fold>
dependencies {
compile 'com.google.guava:guava:26.0-jre'
testCompile 'org.junit.jupiter:junit-jupiter-api:5.3.1'
testCompile 'org.junit.jupiter:junit-jupiter-params:5.3.1'
testRuntime 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
testCompile 'com.amazonaws:DynamoDBLocal:1.11.119'
testCompile 'com.amazonaws:aws-java-sdk-dynamodb:1.11.434'
}
repositories {
mavenCentral()
maven {
name "DynamoDB Local Release Repository - EU (Frankfurt) Region"
url "https://s3.eu-central-1.amazonaws.com/dynamodb-local-frankfurt/release"
}
}
allprojects {
pluginManager.withPlugin('java') {
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'checkstyle'
test {
useJUnitPlatform()
testLogging {
events "skipped", "failed"
}
}
checkstyle {
toolVersion = "8.14"
}
}
}
//<editor-fold desc="Project Publishing Setup">
allprojects {
pluginManager.withPlugin('java') {
apply plugin: 'maven-publish'
apply plugin: 'signing'
sourceCompatibility = 1.8
targetCompatibility = 1.8
// Custom install task as alias for local repository deployment
task install {
dependsOn publishToMavenLocal
}
//<editor-fold desc="JavaDoc & Sources">
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
}
task javadocJar(type: Jar) {
from javadoc
classifier = 'javadoc'
}
build.dependsOn sourcesJar
build.dependsOn javadocJar
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
//</editor-fold>
//<editor-fold desc="Publishing">
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = publishProjectName
description = publishProjectDescription
url = publishProjectUrl
scm {
connection = publishProjectScmConnection
developerConnection = publishProjectScmDevDevConnection
url = publishProjectScmUrl
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
publishProjectDevelopers.each { dev ->
developer {
id = dev[0]
name = dev[1]
email = dev[2]
}
}.collect()
}
}
}
}
repositories {
if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
credentials {
username = ossrhUsername
password = ossrhPassword
}
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}
}
//</editor-fold>
//<editor-fold desc="Signing">
if (project.hasProperty('signing.keyId')) {
signing {
sign publishing.publications.mavenJava
}
}
tasks.withType(PublishToMavenRepository).each { t ->
t.dependsOn build
}
tasks.withType(PublishToMavenLocal).each { t ->
t.dependsOn build
}
//</editor-fold>
}
}
//</editor-fold>