This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
95 lines (82 loc) · 2.91 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
subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'signing'
group = 'com.amazonaws'
version = '0.1.0-SNAPSHOT'
sourceCompatibility = '8'
ext.isReleaseVersion = !version.endsWith('SNAPSHOT')
repositories {
mavenCentral()
}
java {
withJavadocJar()
}
javadoc {
def javaApiDocLink = [
(JavaVersion.VERSION_1_8): 'https://docs.oracle.com/javase/8/docs/api',
(JavaVersion.VERSION_11): 'https://docs.oracle.com/en/java/javase/11/docs/api'
]
source = sourceSets.main.allJava
classpath = sourceSets.main.runtimeClasspath
options.links = [javaApiDocLink.get(JavaVersion.current())]
options.encoding = 'UTF-8'
}
test {
useJUnitPlatform()
}
publishing {
publications {
release(MavenPublication) {
repositories {
maven {
name = 'sonatype'
url = isReleaseVersion ? 'https://aws.oss.sonatype.org/service/local/staging/deploy/maven2/' : 'https://aws.oss.sonatype.org/content/repositories/snapshots/'
credentials {
username findProperty('sonatypeUsername')
password findProperty('sonatypePassword')
}
}
}
pom {
name = project.name
description = project.description
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'amazonwebservices'
name = 'Amazon Web Services'
url = 'https://aws.amazon.com'
}
}
scm {
connection = 'scm:git:https://github.com/awslabs/aws-xray-sdk-with-opentelemetry.git'
developerConnection = 'scm:git:[email protected]:awslabs/aws-xray-sdk-with-opentelemetry.git'
url = 'https://github.com/awslabs/aws-xray-sdk-with-opentelemetry'
}
}
from(components.java)
}
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
signing {
required { isReleaseVersion }
//https://github.com/gradle/gradle/issues/11387
if (required) {
useInMemoryPgpKeys(findProperty('signingKey'), findProperty('signingPassword'))
sign publishing.publications.release
}
}
}
defaultTasks 'build'
wrapper {
gradleVersion = '6.0'
}