|
| 1 | +plugins { |
| 2 | + `java-library` |
| 3 | +} |
| 4 | + |
| 5 | +description = "communication" |
| 6 | + |
| 7 | +apply(from = rootDir.resolve("gradle/java.gradle")) |
| 8 | + |
| 9 | +dependencies { |
| 10 | + implementation(libs.slf4j) |
| 11 | + |
| 12 | + api(project(":remote-config:remote-config-api")) |
| 13 | + implementation(project(":remote-config:remote-config-core")) |
| 14 | + implementation(project(":internal-api")) |
| 15 | + implementation(project(":utils:container-utils")) |
| 16 | + implementation(project(":utils:socket-utils")) |
| 17 | + implementation(project(":utils:version-utils")) |
| 18 | + |
| 19 | + api(libs.okio) |
| 20 | + api(libs.okhttp) |
| 21 | + api(libs.moshi) |
| 22 | + implementation(libs.dogstatsd) |
| 23 | + |
| 24 | + testImplementation(project(":utils:test-utils")) |
| 25 | + testImplementation(libs.bundles.junit5) |
| 26 | + testImplementation(libs.truth) |
| 27 | + testImplementation(libs.bytebuddy) |
| 28 | + testImplementation("org.msgpack:msgpack-core:0.8.20") |
| 29 | + testImplementation("org.msgpack:jackson-dataformat-msgpack:0.8.20") |
| 30 | + testImplementation( |
| 31 | + group = "com.squareup.okhttp3", |
| 32 | + name = "mockwebserver", |
| 33 | + version = libs.versions.okhttp.legacy.get() // actually a version range |
| 34 | + ) |
| 35 | +} |
| 36 | + |
| 37 | +val minimumBranchCoverage by extra(0.5) |
| 38 | +val minimumInstructionCoverage by extra(0.8) |
| 39 | +val excludedClassesCoverage by extra( |
| 40 | + listOf( |
| 41 | + "datadog.communication.ddagent.ExternalAgentLauncher", |
| 42 | + "datadog.communication.ddagent.ExternalAgentLauncher.NamedPipeHealthCheck", |
| 43 | + "datadog.communication.ddagent.SharedCommunicationObjects.FixedConfigUrlSupplier", |
| 44 | + "datadog.communication.ddagent.SharedCommunicationObjects.RetryConfigUrlSupplier", |
| 45 | + "datadog.communication.http.OkHttpUtils", |
| 46 | + "datadog.communication.http.OkHttpUtils.1", |
| 47 | + "datadog.communication.http.OkHttpUtils.ByteBufferRequestBody", |
| 48 | + "datadog.communication.http.OkHttpUtils.CustomListener", |
| 49 | + "datadog.communication.http.OkHttpUtils.GZipByteBufferRequestBody", |
| 50 | + "datadog.communication.http.OkHttpUtils.GZipRequestBodyDecorator", |
| 51 | + "datadog.communication.http.OkHttpUtils.JsonRequestBody", |
| 52 | + "datadog.communication.monitor.DDAgentStatsDConnection", |
| 53 | + "datadog.communication.monitor.DDAgentStatsDConnection.*", |
| 54 | + "datadog.communication.monitor.LoggingStatsDClient", |
| 55 | + "datadog.communication.BackendApiFactory", |
| 56 | + "datadog.communication.BackendApiFactory.Intake", |
| 57 | + "datadog.communication.EvpProxyApi", |
| 58 | + "datadog.communication.IntakeApi", |
| 59 | + "datadog.communication.util.IOUtils", |
| 60 | + "datadog.communication.util.IOUtils.1", |
| 61 | + ) |
| 62 | +) |
| 63 | +val excludedClassesBranchCoverage by extra( |
| 64 | + listOf( |
| 65 | + "datadog.communication.ddagent.TracerVersion", |
| 66 | + "datadog.communication.BackendApiFactory", |
| 67 | + "datadog.communication.EvpProxyApi", |
| 68 | + "datadog.communication.IntakeApi", |
| 69 | + ) |
| 70 | +) |
| 71 | +val excludedClassesInstructionCoverage by extra( |
| 72 | + listOf( |
| 73 | + // can't reach the error condition now |
| 74 | + "datadog.communication.fleet.FleetServiceImpl", |
| 75 | + "datadog.communication.ddagent.SharedCommunicationObjects", |
| 76 | + "datadog.communication.ddagent.TracerVersion", |
| 77 | + "datadog.communication.BackendApiFactory", |
| 78 | + "datadog.communication.BackendApiFactory.Intake", |
| 79 | + "datadog.communication.EvpProxyApi", |
| 80 | + "datadog.communication.IntakeApi", |
| 81 | + "datadog.communication.util.IOUtils", |
| 82 | + "datadog.communication.util.IOUtils.1", |
| 83 | + ) |
| 84 | +) |
0 commit comments