-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
152 lines (130 loc) · 4.15 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
buildscript {
repositories {
mavenCentral()
mavenLocal()
}
}
plugins {
id "java"
id "java-library"
id "checkstyle"
id "signing"
id "maven-publish"
id "de.marcphilipp.nexus-publish" version "0.3.0"
id "io.codearte.nexus-staging" version "0.30.0"
id "idea"
}
configurations.all {
// check for updates every build for dependencies with: 'changing: true'
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
repositories {
mavenLocal()
// Before LaunchDarkly release artifacts get synced to Maven Central they are here along with snapshots:
maven { url "https://oss.sonatype.org/content/groups/public/" }
mavenCentral()
}
allprojects {
group = 'com.launchdarkly'
version = "${version}"
archivesBaseName = 'launchdarkly-java-server-sdk-dynamodb-store'
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
ext.versions = [
"sdk": "6.0.0", // the *lowest* version we're compatible with
"dynamodb": "2.10.32"
]
ext.libraries = [:]
dependencies {
api "com.launchdarkly:launchdarkly-java-server-sdk:${versions.sdk}"
api "software.amazon.awssdk:dynamodb:${versions.dynamodb}"
testImplementation "org.hamcrest:hamcrest-all:1.3"
testImplementation "junit:junit:4.12"
testImplementation "com.launchdarkly:launchdarkly-java-server-sdk:${versions.sdk}:test" // our unit tests use helper classes from the SDK
testImplementation "com.google.guava:guava:28.2-jre" // required by SDK tests, not used in this library itself
testImplementation "com.google.code.gson:gson:2.7" // same as above
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar, javadocJar
}
test {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
showStandardStreams = true
exceptionFormat = 'full'
}
}
checkstyle {
toolVersion = "9.3"
configFile = file("${project.rootDir}/checkstyle.xml")
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
nexusStaging {
packageGroup = "com.launchdarkly"
numberOfRetries = 40 // we've seen extremely long delays in closing repositories
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
groupId = 'com.launchdarkly'
artifactId = project.archivesBaseName
artifact sourcesJar
artifact javadocJar
pom {
name = project.archivesBaseName
description = 'LaunchDarkly Java SDK DynamoDB integration'
url = 'https://github.com/launchdarkly/java-server-sdk-dynamodb'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
name = 'LaunchDarkly'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/launchdarkly/java-server-sdk-dynamodb.git'
developerConnection = 'scm:git:ssh:[email protected]:launchdarkly/java-server-sdk-dynamodb.git'
url = 'https://github.com/launchdarkly/java-server-sdk-dynamodb'
}
}
}
}
repositories {
mavenLocal()
}
}
nexusPublishing {
clientTimeout = java.time.Duration.ofMinutes(3) // we've seen extremely long delays in creating repositories
repositories {
sonatype {
username = ossrhUsername
password = ossrhPassword
}
}
}
signing {
sign publishing.publications.mavenJava
}
tasks.withType(Sign) {
onlyIf { !"1".equals(project.findProperty("LD_SKIP_SIGNING")) } // so we can build jars for testing in CI
}