Skip to content

Commit 0fe4be1

Browse files
Anuraag Agrawalwillarmiros
andauthored
Add Gradle build configuration. (#153)
* Add Gradle build configuration. * Explicitly set test script since with two builds Travis can't guess * Migrate benchmarks * Add publishing repo Co-authored-by: William Armiros <[email protected]>
1 parent 717b66e commit 0fe4be1

File tree

26 files changed

+775
-0
lines changed

26 files changed

+775
-0
lines changed

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,16 @@
88

99
*.iml
1010
/.idea
11+
12+
.gradle
13+
**/build/
14+
!src/**/build/
15+
16+
# Ignore Gradle GUI config
17+
gradle-app.setting
18+
19+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
20+
!gradle-wrapper.jar
21+
22+
# Cache of project
23+
.gradletasknamecache

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,14 @@ jdk:
1313
install:
1414
- mvn install -DskipTests -Dgpg.skip -Dmaven.javadoc.skip -B -V
1515

16+
script:
17+
- mvn test -B
18+
- ./gradlew build
19+
1620
sudo: false
1721
dist: trusty
22+
23+
cache:
24+
directories:
25+
- $HOME/.gradle/caches
26+
- $HOME/.m2
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
plugins {
2+
`java-library`
3+
`maven-publish`
4+
}
5+
6+
dependencies {
7+
api(project(":aws-xray-recorder-sdk-core"))
8+
9+
api("org.apache.httpcomponents:httpclient:4.5.2")
10+
11+
testImplementation("junit:junit:4.12")
12+
testImplementation("org.mockito:mockito-all:1.10.19")
13+
}
14+
15+
description = "AWS X-Ray Recorder SDK for Java - Apache HTTP Client Proxy"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
plugins {
2+
`java-library`
3+
`maven-publish`
4+
}
5+
6+
dependencies {
7+
compileOnly("com.fasterxml.jackson.core:jackson-annotations:2.11.0")
8+
9+
testImplementation("com.fasterxml.jackson.core:jackson-databind")
10+
testImplementation("junit:junit:4.12")
11+
testImplementation("org.mockito:mockito-all:1.10.19")
12+
}
13+
14+
description = "AWS X-Ray Recorder SDK for Java - AWS SDK Core"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
plugins {
2+
`java-library`
3+
`maven-publish`
4+
}
5+
6+
dependencies {
7+
compileOnly(project(":aws-xray-recorder-sdk-aws-sdk"))
8+
}
9+
10+
description = "AWS X-Ray Recorder SDK for Java - AWS SDK Instrumentor"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
plugins {
2+
`java-library`
3+
`maven-publish`
4+
}
5+
6+
dependencies {
7+
compileOnly(project(":aws-xray-recorder-sdk-aws-sdk-v2"))
8+
}
9+
10+
description = "AWS X-Ray Recorder SDK for Java - AWS SDK V2 Instrumentor"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
plugins {
2+
`java-library`
3+
`maven-publish`
4+
}
5+
6+
dependencies {
7+
api(project(":aws-xray-recorder-sdk-core"))
8+
9+
implementation(project(":aws-xray-recorder-sdk-aws-sdk-core"))
10+
11+
api("software.amazon.awssdk:aws-core:2.2.0")
12+
13+
testImplementation("junit:junit:4.12")
14+
testImplementation("org.mockito:mockito-all:1.10.19")
15+
testImplementation("org.skyscreamer:jsonassert:1.3.0")
16+
testImplementation("software.amazon.awssdk:dynamodb:2.2.0")
17+
testImplementation("software.amazon.awssdk:lambda:2.2.0")
18+
}
19+
20+
description = "AWS X-Ray Recorder SDK for Java - AWS SDK V2"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
plugins {
2+
`java-library`
3+
`maven-publish`
4+
}
5+
6+
dependencies {
7+
api(project(":aws-xray-recorder-sdk-core"))
8+
9+
implementation(project(":aws-xray-recorder-sdk-aws-sdk-core"))
10+
11+
api("com.amazonaws:aws-java-sdk:1.11.398")
12+
13+
testImplementation("junit:junit:4.12")
14+
testImplementation("org.mockito:mockito-all:1.10.19")
15+
testImplementation("org.skyscreamer:jsonassert:1.3.0")
16+
}
17+
18+
description = "AWS X-Ray Recorder SDK for Java - AWS SDK Handler"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
plugins {
2+
id("me.champeau.gradle.jmh") version "0.5.0"
3+
}
4+
5+
val JMH_VERSION = "1.23"
6+
7+
sourceSets {
8+
named("jmh") {
9+
java {
10+
srcDir("tst/main/java")
11+
}
12+
}
13+
}
14+
15+
dependencies {
16+
jmh(project(":aws-xray-recorder-sdk-core"))
17+
18+
jmh("org.openjdk.jmh:jmh-generator-annprocess:${JMH_VERSION}")
19+
jmhAnnotationProcessor("org.openjdk.jmh:jmh-generator-annprocess:${JMH_VERSION}")
20+
21+
add("jmhCompileClasspath", platform(project(":dependencyManagement")))
22+
add("jmhRuntimeClasspath", platform(project(":dependencyManagement")))
23+
}
24+
25+
jmh {
26+
fork = 1
27+
// Required when also including annotation processor.
28+
duplicateClassesStrategy = DuplicatesStrategy.EXCLUDE
29+
isZip64 = true
30+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
plugins {
2+
`java-platform`
3+
`maven-publish`
4+
}
5+
6+
description = "The AWS X-Ray Recorder SDK for Java - BOM"
7+
8+
dependencies {
9+
constraints {
10+
rootProject.subprojects {
11+
if (name.startsWith("aws-xray-recorder-sdk-") && !name.endsWith("-bom")) {
12+
api("${group}:${name}:${version}")
13+
}
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)