Skip to content

Commit

Permalink
compile -> implementation|api and force -> version strictly
Browse files Browse the repository at this point in the history
and other warnings
  • Loading branch information
tylerbenson committed May 18, 2021
1 parent c9008ad commit 781c8d9
Show file tree
Hide file tree
Showing 180 changed files with 1,135 additions and 1,104 deletions.
12 changes: 6 additions & 6 deletions dd-java-agent/agent-bootstrap/agent-bootstrap.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ minimumBranchCoverage = 0.0
minimumInstructionCoverage = 0.0

dependencies {
compile project(':dd-java-agent:agent-logging')
compile project(':dd-trace-api')
compile project(':internal-api')
implementation project(':internal-api:internal-api-8')
compile deps.slf4j
api project(':dd-trace-api')
api project(':internal-api')
api project(':internal-api:internal-api-8')
api project(':dd-java-agent:agent-logging')
api deps.slf4j
// ^ Generally a bad idea for libraries, but we're shadowing.

testCompile project(':dd-java-agent:testing')
testImplementation project(':dd-java-agent:testing')
}

// Must use Java 11 to build JFR enabled code - there is no JFR in OpenJDK 8 (revisit once JFR in Java 8 is available)
Expand Down
6 changes: 3 additions & 3 deletions dd-java-agent/agent-jmxfetch/agent-jmxfetch.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ plugins {
apply from: "$rootDir/gradle/java.gradle"

dependencies {
compile('com.datadoghq:jmxfetch:0.43.1') {
api('com.datadoghq:jmxfetch:0.43.1') {
exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl'
exclude group: 'org.apache.logging.log4j', module: 'log4j-core'
exclude group: 'org.slf4j', module: 'slf4j-api'
}
compile deps.slf4j
compile project(':internal-api')
api deps.slf4j
api project(':internal-api')
}

shadowJar {
Expand Down
4 changes: 2 additions & 2 deletions dd-java-agent/agent-logging/agent-logging.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ excludedClassesCoverage += [

dependencies {
// This is fine since this project is shadowed into the agent-jar by dd-java-agent:agent-bootstrap
compile group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
compile project(':internal-api')
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
api project(':internal-api')
}
12 changes: 6 additions & 6 deletions dd-java-agent/agent-profiling/agent-profiling.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ apply from: "$rootDir/gradle/java.gradle"
apply from: "$rootDir/gradle/version.gradle"

dependencies {
compile deps.slf4j
compile project(':internal-api')
api deps.slf4j
api project(':internal-api')

compile project(':dd-java-agent:agent-profiling:profiling-uploader')
compile project(':dd-java-agent:agent-profiling:profiling-controller')
compile project(':dd-java-agent:agent-profiling:profiling-controller-openjdk')
compile project(':dd-java-agent:agent-profiling:profiling-controller-oracle')
api project(':dd-java-agent:agent-profiling:profiling-uploader')
api project(':dd-java-agent:agent-profiling:profiling-controller')
api project(':dd-java-agent:agent-profiling:profiling-controller-openjdk')
api project(':dd-java-agent:agent-profiling:profiling-controller-oracle')
}

sourceCompatibility = JavaVersion.VERSION_1_8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apply from: "$rootDir/gradle/java.gradle"

dependencies {
compile deps.slf4j
implementation deps.slf4j

testCompile deps.junit5
testImplementation deps.junit5
}

excludedClassesCoverage += ['com.datadog.profiling.controller.jfr.JdkTypeIDs']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ apply from: "$rootDir/gradle/java.gradle"
apply plugin: 'idea'

dependencies {
compile deps.slf4j
compile project(':internal-api')
compile project(':dd-java-agent:agent-profiling:profiling-controller')
compile project(':dd-java-agent:agent-profiling:profiling-controller-jfr')
api deps.slf4j
api project(':internal-api')
api project(':dd-java-agent:agent-profiling:profiling-controller')
api project(':dd-java-agent:agent-profiling:profiling-controller-jfr')

testCompile deps.junit5
testCompile deps.mockito
testCompile group: 'org.hamcrest', name: 'hamcrest', version: '2.1'
testCompile files(project(':dd-java-agent:agent-profiling:profiling-controller-jfr').sourceSets.test.output)
testImplementation deps.junit5
testImplementation deps.mockito
testImplementation group: 'org.hamcrest', name: 'hamcrest', version: '2.1'
testImplementation files(project(':dd-java-agent:agent-profiling:profiling-controller-jfr').sourceSets.test.output)
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ minimumInstructionCoverage = 0.7
excludedClassesCoverage += ['com.datadog.profiling.controller.oracle.JdkTypeIDs_8']

dependencies {
compile deps.slf4j
compile project(':internal-api')
compile project(':dd-java-agent:agent-profiling:profiling-controller')
compile project(':dd-java-agent:agent-profiling:profiling-controller-jfr')

testCompile deps.junit5
testCompile deps.mockito
testCompile group: 'org.hamcrest', name: 'hamcrest', version: '2.1'
testCompile files(project(':dd-java-agent:agent-profiling:profiling-controller-jfr').sourceSets.test.output)
api deps.slf4j
api project(':internal-api')
api project(':dd-java-agent:agent-profiling:profiling-controller')
api project(':dd-java-agent:agent-profiling:profiling-controller-jfr')

testImplementation deps.junit5
testImplementation deps.mockito
testImplementation group: 'org.hamcrest', name: 'hamcrest', version: '2.1'
testImplementation files(project(':dd-java-agent:agent-profiling:profiling-controller-jfr').sourceSets.test.output)
}

// make sure the code is compiled to Java 8 bytecode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ excludedClassesCoverage += [
]

dependencies {
compile deps.slf4j
compile project(':internal-api')
api deps.slf4j
api project(':internal-api')

testCompile deps.junit5
testCompile deps.guava
testCompile deps.mockito
testCompile group: 'org.awaitility', name: 'awaitility', version: '4.0.1'
testImplementation deps.junit5
testImplementation deps.guava
testImplementation deps.mockito
testImplementation group: 'org.awaitility', name: 'awaitility', version: '4.0.1'
}

sourceCompatibility = JavaVersion.VERSION_1_8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ excludedClassesCoverage += [// These classes are using only for testing
'com.datadog.profiling.testing.*',]

dependencies {
compile deps.guava
compile deps.okhttp
compile group: 'org.javadelight', name: 'delight-fileupload', version: '0.0.5'
compile group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1'
compile group: 'com.squareup.okhttp3', name: 'mockwebserver', version: versions.okhttp
api deps.guava
api deps.okhttp
api group: 'org.javadelight', name: 'delight-fileupload', version: '0.0.5'
api group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1'
api group: 'com.squareup.okhttp3', name: 'mockwebserver', version: versions.okhttp
}

/* We use Java8 features, but there is no code needing JFR libraries */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ excludedClassesCoverage += [
]

dependencies {
compile deps.slf4j
compile project(':utils:container-utils')
compile project(':internal-api')
implementation deps.slf4j
implementation project(':utils:container-utils')
implementation project(':internal-api')

compile project(':dd-java-agent:agent-profiling:profiling-controller')
implementation project(':dd-java-agent:agent-profiling:profiling-controller')

compile deps.okhttp
compile group: 'com.github.jnr', name: 'jnr-posix', version: '3.0.52'
compile group: 'org.lz4', name: 'lz4-java', version: '1.7.1'
implementation deps.okhttp
implementation group: 'com.github.jnr', name: 'jnr-posix', version: '3.0.52'
implementation group: 'org.lz4', name: 'lz4-java', version: '1.7.1'

testCompile deps.junit5
testCompile project(':dd-java-agent:agent-profiling:profiling-testing')
testCompile deps.mockito
testCompile group: 'com.squareup.okhttp3', name: 'mockwebserver', version: versions.okhttp
testImplementation deps.junit5
testImplementation project(':dd-java-agent:agent-profiling:profiling-testing')
testImplementation deps.mockito
testImplementation group: 'com.squareup.okhttp3', name: 'mockwebserver', version: versions.okhttp
}

/* We use Java8 features, but there is no code needing JFR libraries */
Expand Down
21 changes: 9 additions & 12 deletions dd-java-agent/agent-tooling/agent-tooling.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,22 @@ excludedClassesCoverage += ['datadog.trace.agent.tooling.*']

configurations {
// classpath used by the instrumentation muzzle plugin
instrumentationMuzzle
instrumentationMuzzle.extendsFrom implementation
}

dependencies {
compile(project(':dd-java-agent:agent-bootstrap')) {
api(project(':dd-java-agent:agent-bootstrap')) {
exclude group: 'com.datadoghq', module: 'agent-logging'
}
compile group: 'com.blogspot.mydailyjava', name: 'weak-lock-free', version: '0.17'
compile group: 'com.googlecode.concurrentlinkedhashmap', name: 'concurrentlinkedhashmap-lru', version: '1.4.2'
compile deps.bytebuddy
compile deps.bytebuddyagent
api group: 'com.blogspot.mydailyjava', name: 'weak-lock-free', version: '0.17'
api group: 'com.googlecode.concurrentlinkedhashmap', name: 'concurrentlinkedhashmap-lru', version: '1.4.2'
api deps.bytebuddy
api deps.bytebuddyagent

compile project(':dd-trace-core')
compile project(':dd-trace-core:jfr-openjdk')
api project(':dd-trace-core')
api project(':dd-trace-core:jfr-openjdk')

testCompile project(':dd-java-agent:testing')

instrumentationMuzzle sourceSets.main.output
instrumentationMuzzle configurations.compile
testImplementation project(':dd-java-agent:testing')
}

// Use Java 11 to build a delegating ClassFileTransformer that understands Java modules
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
dependencies {
compile project(':dd-trace-api')
compile project(':dd-java-agent:benchmark-integration')
compile group: 'io.opentracing', name: 'opentracing-api', version: '0.32.0'
compile group: 'io.opentracing', name: 'opentracing-util', version: '0.32.0'
implementation project(':dd-trace-api')
implementation project(':dd-java-agent:benchmark-integration')
implementation group: 'io.opentracing', name: 'opentracing-api', version: '0.32.0'
implementation group: 'io.opentracing', name: 'opentracing-util', version: '0.32.0'

compile group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.4.1.v20170120'
compile group: 'org.eclipse.jetty', name: 'jetty-servlet', version: '9.4.1.v20170120'
implementation group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.4.1.v20170120'
implementation group: 'org.eclipse.jetty', name: 'jetty-servlet', version: '9.4.1.v20170120'
}

jar {
Expand Down
17 changes: 9 additions & 8 deletions dd-java-agent/dd-java-agent.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,17 @@ tasks.withType(GenerateMavenPom).configureEach { task ->
}

dependencies {
testCompile(project(':dd-java-agent:agent-bootstrap')) {
testImplementation(project(':dd-java-agent:agent-bootstrap')) {
exclude group: 'com.datadoghq', module: 'agent-logging'
}
testCompile project(':dd-trace-api')
testCompile project(':dd-trace-core')
testCompile project(':utils:test-utils')

testCompile deps.testLogging
testCompile deps.guava
testCompile group: 'io.opentracing', name: 'opentracing-util', version: '0.31.0'
testImplementation project(':dd-trace-api')
testImplementation project(':dd-trace-core')
testImplementation project(':utils:test-utils')

testImplementation deps.testLogging
testImplementation deps.guava
testImplementation deps.okhttp
testImplementation group: 'io.opentracing', name: 'opentracing-util', version: '0.31.0'

// Includes for the top level shadow jar
shadowInclude project(path: ':dd-java-agent:agent-bootstrap')
Expand Down
6 changes: 3 additions & 3 deletions dd-java-agent/instrumentation/aerospike-4/aerospike-4.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ muzzle {
dependencies {
compileOnly group: 'com.aerospike', name: 'aerospike-client', version: '4.0.0'

testCompile group: 'com.aerospike', name: 'aerospike-client', version: '4.0.0'
testCompile group: 'org.testcontainers', name: 'testcontainers', version: '1.15.0'
latestDepTestCompile group: 'com.aerospike', name: 'aerospike-client', version: '+'
testImplementation group: 'com.aerospike', name: 'aerospike-client', version: '4.0.0'
testImplementation group: 'org.testcontainers', name: 'testcontainers', version: '1.15.0'
latestDepTestImplementation group: 'com.aerospike', name: 'aerospike-client', version: '+'
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ tasks.named("compileLatestDepTestGroovy").configure {
dependencies {
compileOnly group: 'com.typesafe.akka', name: "akka-actor_$scalaVersion", version: akkaVersion

testCompile deps.scala
testCompile project(':dd-java-agent:instrumentation:trace-annotation')
testCompile group: 'com.typesafe.akka', name: "akka-actor_$scalaVersion", version: akkaVersion
testCompile group: 'com.typesafe.akka', name: "akka-testkit_$scalaVersion", version: akkaVersion
testImplementation deps.scala
testImplementation project(':dd-java-agent:instrumentation:trace-annotation')
testImplementation group: 'com.typesafe.akka', name: "akka-actor_$scalaVersion", version: akkaVersion
testImplementation group: 'com.typesafe.akka', name: "akka-testkit_$scalaVersion", version: akkaVersion

latestDepTestCompile group: 'com.typesafe.akka', name: "akka-actor_$scalaVersion", version: '+'
latestDepTestCompile group: 'com.typesafe.akka', name: "akka-testkit_$scalaVersion", version: '+'
latestDepTestImplementation group: 'com.typesafe.akka', name: "akka-actor_$scalaVersion", version: '+'
latestDepTestImplementation group: 'com.typesafe.akka', name: "akka-testkit_$scalaVersion", version: '+'
}

[configurations.akka23TestCompile, configurations.akka23TestRuntime].each {
Expand Down
42 changes: 21 additions & 21 deletions dd-java-agent/instrumentation/akka-http-10.0/akka-http-10.0.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,33 +90,33 @@ dependencies {
main_java8CompileOnly group: 'com.typesafe.akka', name: 'akka-http_2.11', version: '10.0.0'

// These are the common dependencies that are inherited by the other test sets
testCompile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.6.0'
testCompile project(':dd-java-agent:instrumentation:trace-annotation')
testCompile project(':dd-java-agent:instrumentation:akka-concurrent')
testCompile project(':dd-java-agent:instrumentation:scala-concurrent')
testCompile project(':dd-java-agent:instrumentation:scala-promise:scala-promise-2.10')
testCompile project(':dd-java-agent:instrumentation:scala-promise:scala-promise-2.13')

baseTestCompile deps.scala211
testImplementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.6.0'
testImplementation project(':dd-java-agent:instrumentation:trace-annotation')
testImplementation project(':dd-java-agent:instrumentation:akka-concurrent')
testImplementation project(':dd-java-agent:instrumentation:scala-concurrent')
testImplementation project(':dd-java-agent:instrumentation:scala-promise:scala-promise-2.10')
testImplementation project(':dd-java-agent:instrumentation:scala-promise:scala-promise-2.13')

baseTestImplementation deps.scala211
// First 10.0.x version with a convenient way to test http2 support
baseTestCompile group: 'com.typesafe.akka', name: 'akka-http_2.11', version: '10.0.10'
baseTestCompile group: 'com.typesafe.akka', name: 'akka-http2-support_2.11', version: '10.0.10'
baseTestImplementation group: 'com.typesafe.akka', name: 'akka-http_2.11', version: '10.0.10'
baseTestImplementation group: 'com.typesafe.akka', name: 'akka-http2-support_2.11', version: '10.0.10'

// There are some internal API changes in 10.1 that we would like to test separately for
version101TestCompile deps.scala212
version101TestCompile group: 'com.typesafe.akka', name: 'akka-http_2.12', version: '10.1.+'
version101TestCompile group: 'com.typesafe.akka', name: 'akka-http2-support_2.12', version: '10.1.+'
version101TestCompile group: 'com.typesafe.akka', name: 'akka-stream_2.12', version: '2.5.+'
version101TestImplementation deps.scala212
version101TestImplementation group: 'com.typesafe.akka', name: 'akka-http_2.12', version: '10.1.+'
version101TestImplementation group: 'com.typesafe.akka', name: 'akka-http2-support_2.12', version: '10.1.+'
version101TestImplementation group: 'com.typesafe.akka', name: 'akka-stream_2.12', version: '2.5.+'

latestDepTestCompile deps.scala213
latestDepTestCompile group: 'com.typesafe.akka', name: 'akka-http_2.13', version: '10.2.+'
latestDepTestImplementation deps.scala213
latestDepTestImplementation group: 'com.typesafe.akka', name: 'akka-http_2.13', version: '10.2.+'
// http2 support is included in akka-http since 10.2.x
latestDepTestCompile group: 'com.typesafe.akka', name: 'akka-stream_2.13', version: '2.6.+'
latestDepTestImplementation group: 'com.typesafe.akka', name: 'akka-stream_2.13', version: '2.6.+'

lagomTestCompile deps.scala211
lagomTestCompile group: 'com.typesafe.akka', name: 'akka-http_2.11', version: '10.0.0'
lagomTestCompile project(':dd-java-agent:instrumentation:akka-init')
lagomTestCompile group: 'com.lightbend.lagom', name: 'lagom-javadsl-testkit_2.11', version: '1.4.0'
lagomTestImplementation deps.scala211
lagomTestImplementation group: 'com.typesafe.akka', name: 'akka-http_2.11', version: '10.0.0'
lagomTestImplementation project(':dd-java-agent:instrumentation:akka-init')
lagomTestImplementation group: 'com.lightbend.lagom', name: 'lagom-javadsl-testkit_2.11', version: '1.4.0'
}

tasks.named("test").configure {
Expand Down
16 changes: 8 additions & 8 deletions dd-java-agent/instrumentation/akka-init/akka-init.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ testSets {
dependencies {
compileOnly group: 'com.typesafe.akka', name: "akka-actor_$scalaVersion", version: akkaVersion

testCompile deps.scala
testCompile group: 'com.typesafe.akka', name: "akka-actor_$scalaVersion", version: akkaVersion
testCompile project(':dd-java-agent:instrumentation:akka-concurrent')
testCompile project(':dd-java-agent:instrumentation:scala-concurrent')
testCompile project(':dd-java-agent:instrumentation:scala-promise:scala-promise-2.10')
testCompile project(':dd-java-agent:instrumentation:scala-promise:scala-promise-2.13')

latestDepTestCompile group: 'com.typesafe.akka', name: "akka-actor_$scalaVersion", version: '+'
testImplementation deps.scala
testImplementation group: 'com.typesafe.akka', name: "akka-actor_$scalaVersion", version: akkaVersion
testImplementation project(':dd-java-agent:instrumentation:akka-concurrent')
testImplementation project(':dd-java-agent:instrumentation:scala-concurrent')
testImplementation project(':dd-java-agent:instrumentation:scala-promise:scala-promise-2.10')
testImplementation project(':dd-java-agent:instrumentation:scala-promise:scala-promise-2.13')

latestDepTestImplementation group: 'com.typesafe.akka', name: "akka-actor_$scalaVersion", version: '+'
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ testSets {
dependencies {
compileOnly group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '4.0'

testCompile group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '4.0'
testImplementation group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '4.0'

latestDepTestCompile group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '+'
latestDepTestImplementation group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '+'
}
Loading

0 comments on commit 781c8d9

Please sign in to comment.