Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Remove boilerplate from gradle scripts #176

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,22 @@ subprojects {
apply plugin: 'signing'
apply plugin: 'checkstyle'


compileJava {
sourceCompatibility = 1.6
targetCompatibility = 1.6
}

compileTestJava {
sourceCompatibility = 1.7
targetCompatibility = 1.7
sourceCompatibility = 1.8
targetCompatibility = 1.8
}

jar {
from sourceSets.main.output
manifest {
attributes('Implementation-Title': project.name, 'Implementation-Version': project.version)
}
}

animalsniffer {
Expand Down
21 changes: 0 additions & 21 deletions jaeger-apachehttpclient/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,3 @@ dependencies {

signature 'org.codehaus.mojo.signature:java16:1.1@signature'
}

sourceSets {
main {
java {
srcDir 'src/main/java'
}
}

test {
java {
srcDir 'src/test/java'
}
}
}

jar {
from sourceSets.main.output
manifest {
attributes('Implementation-Title': 'jaeger-apachehttpclient', 'Implementation-Version': project.version)
}
}
21 changes: 0 additions & 21 deletions jaeger-b3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,3 @@ dependencies {

signature 'org.codehaus.mojo.signature:java16:1.1@signature'
}

sourceSets {
main {
java {
srcDir 'src/main/java'
}
}

test {
java {
srcDir 'src/test/java'
}
}
}

jar {
from sourceSets.main.output
manifest {
attributes('Implementation-Title': 'jaeger-b3', 'Implementation-Version': project.version)
}
}
21 changes: 0 additions & 21 deletions jaeger-context/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,3 @@ dependencies {

signature 'org.codehaus.mojo.signature:java16:1.1@signature'
}

sourceSets {
main {
java {
srcDir 'src/main/java'
}
}

test {
java {
srcDir 'src/test/java'
}
}
}

jar {
from sourceSets.main.output
manifest {
attributes('Implementation-Title': 'jaeger-context', 'Implementation-Version': project.version)
}
}
24 changes: 0 additions & 24 deletions jaeger-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,6 @@ dependencies {
signature 'org.codehaus.mojo.signature:java16:1.1@signature'
}

sourceSets {
main {
java {
srcDir 'src/main/java'
}
resources {
includes = ["**/jaeger.properties"]
}
}

test {
java {
srcDir 'src/test/java'
}
}
}

jar {
from sourceSets.main.output
manifest {
attributes('Implementation-Title': 'jaeger-core', 'Implementation-Version': project.version)
}
}

task jaegerVersion {
doLast {
def dirPath = 'src/main/resources/com/uber/jaeger/'
Expand Down
2 changes: 1 addition & 1 deletion jaeger-crossdock/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM maven:3.3-jdk-7
FROM openjdk:8u121-jdk-alpine
EXPOSE 8080-8082

ADD build/libs/jaeger-crossdock.jar /
Expand Down
21 changes: 2 additions & 19 deletions jaeger-crossdock/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ext.jacksonVersion = '2.7.4'
shadowJar.archiveName = 'jaeger-crossdock.jar'

compileJava {
sourceCompatibility = 1.7
targetCompatibility = 1.7
sourceCompatibility = 1.8
targetCompatibility = 1.8
}

dependencies {
Expand All @@ -29,25 +29,8 @@ dependencies {
signature 'org.codehaus.mojo.signature:java17:1.0@signature'
}

sourceSets {
main {
java {
srcDir 'src/main/java'
}
}

test {
java {
srcDir 'src/test/java'
}
}
}

jar {
from sourceSets.main.output
from sourceSets.test.output
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed test-classes from jar, as are not used in crossdock image

manifest {
attributes('Implementation-Title': 'jaeger-crossdock', 'Implementation-Version': project.version)
attributes 'Main-Class': 'com.uber.jaeger.crossdock.JerseyServer'
}
}
21 changes: 0 additions & 21 deletions jaeger-dropwizard/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,3 @@ dependencies {

signature 'org.codehaus.mojo.signature:java16:1.1@signature'
}

sourceSets {
main {
java {
srcDir 'src/main/java'
}
}

test {
java {
srcDir 'src/test/java'
}
}
}

jar {
from sourceSets.main.output
manifest {
attributes('Implementation-Title': 'jaeger-dropwizard', 'Implementation-Version': project.version)
}
}
21 changes: 0 additions & 21 deletions jaeger-jaxrs2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,3 @@ dependencies {

signature 'org.codehaus.mojo.signature:java16:1.1@signature'
}

sourceSets {
main {
java {
srcDir 'src/main/java'
}
}

test {
java {
srcDir 'src/test/java'
}
}
}

jar {
from sourceSets.main.output
manifest {
attributes('Implementation-Title': 'jaeger-jaxrs2', 'Implementation-Version': project.version)
}
}
11 changes: 0 additions & 11 deletions jaeger-thrift/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,6 @@ sourceSets {
java {
srcDir 'src/main/gen-java'
}
resources {
srcDirs = ['src/main/gen-java']
}
}

}

jar {
from sourceSets.main.output
manifest {
attributes('Implementation-Title': 'jaeger-thrift', 'Implementation-Version': project.version)
}
}

Expand Down
21 changes: 0 additions & 21 deletions jaeger-zipkin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,3 @@ dependencies {

signature 'org.codehaus.mojo.signature:java16:1.1@signature'
}

sourceSets {
main {
java {
srcDir 'src/main/java'
}
}

test {
java {
srcDir 'src/test/java'
}
}
}

jar {
from sourceSets.main.output
manifest {
attributes('Implementation-Title': 'jaeger-zipkin', 'Implementation-Version': project.version)
}
}