-
Notifications
You must be signed in to change notification settings - Fork 312
Convert some build file to kotlin dsl #8743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3204885
chore(gradle): Convert :telemetry build file to kotlin
bric3 e65d613
chore(gradle): Convert :utils:socket-utils build file to kotlin
bric3 e9877b7
chore(gradle): Convert :utils:container-utils build file to kotlin
bric3 097fb9f
chore(gradle): Convert more :utils project to kotlin dsl
bric3 ba255b8
chore(gradle): Convert :remote-config project to kotlin dsl
bric3 ed8d3fb
chore(build): tweak compile configuration
bric3 4ecf4b5
Merge remote-tracking branch 'origin/master' into migrate-telemetry-b…
bric3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apply(from = "$rootDir/gradle/java.gradle") | ||
|
||
val excludedClassesBranchCoverage by extra( | ||
listOf( | ||
"datadog.remoteconfig.ConfigurationChangesListener.PollingHinterNoop" | ||
) | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
plugins { | ||
`java-library` | ||
} | ||
|
||
apply(from = "$rootDir/gradle/java.gradle") | ||
|
||
val minimumBranchCoverage by extra(0.6) | ||
val minimumInstructionCoverage by extra(0.8) | ||
val excludedClassesCoverage by extra( | ||
listOf( | ||
// not used yet | ||
"datadog.remoteconfig.tuf.RemoteConfigRequest.ClientInfo.AgentInfo", | ||
// only half the adapter interface used | ||
"datadog.remoteconfig.tuf.InstantJsonAdapter", | ||
// idem | ||
"datadog.remoteconfig.tuf.RawJsonAdapter", | ||
"datadog.remoteconfig.ExceptionHelper", | ||
) | ||
) | ||
val excludedClassesBranchCoverage by extra( | ||
listOf( | ||
"datadog.remoteconfig.tuf.FeaturesConfig", | ||
"datadog.remoteconfig.PollerRequestFactory", | ||
) | ||
) | ||
val excludedClassesInstructionCoverage by extra( | ||
listOf( | ||
"datadog.remoteconfig.ConfigurationChangesListener.PollingHinterNoop", | ||
) | ||
) | ||
|
||
dependencies { | ||
api(project(":remote-config:remote-config-api")) | ||
|
||
implementation(libs.slf4j) | ||
implementation(libs.okhttp) | ||
implementation(libs.moshi) | ||
implementation(libs.bundles.cafe.crypto) | ||
|
||
implementation(project(":internal-api")) | ||
|
||
testImplementation(project(":utils:test-utils")) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
plugins { | ||
id("me.champeau.jmh") | ||
id("java-library") | ||
} | ||
|
||
apply(from = "$rootDir/gradle/java.gradle") | ||
|
||
val minimumBranchCoverage by extra(0.6) | ||
val minimumInstructionCoverage by extra(0.8) | ||
val excludedClassesCoverage by extra( | ||
listOf( | ||
"datadog.telemetry.TelemetryRunnable.ThreadSleeperImpl", | ||
"datadog.telemetry.HostInfo", | ||
"datadog.telemetry.HostInfo.Os", | ||
"datadog.telemetry.dependency.LocationsCollectingTransformer", | ||
"datadog.telemetry.dependency.JbossVirtualFileHelper", | ||
"datadog.telemetry.RequestBuilder.NumberJsonAdapter", | ||
"datadog.telemetry.RequestBuilderSupplier", | ||
"datadog.telemetry.TelemetrySystem", | ||
"datadog.telemetry.api.*", | ||
"datadog.telemetry.metric.CiVisibilityMetricPeriodicAction" | ||
) | ||
) | ||
val excludedClassesBranchCoverage by extra( | ||
listOf( | ||
"datadog.telemetry.PolymorphicAdapterFactory.1", | ||
"datadog.telemetry.HostInfo", | ||
"datadog.telemetry.HostInfo.Os" | ||
) | ||
) | ||
val excludedClassesInstructionCoverage by extra(emptyList<String>()) | ||
|
||
dependencies { | ||
implementation(libs.slf4j) | ||
|
||
implementation(project(":internal-api")) | ||
|
||
compileOnly(project(":dd-java-agent:agent-tooling")) | ||
testImplementation(project(":dd-java-agent:agent-tooling")) | ||
testImplementation(project(":dd-java-agent:agent-logging")) | ||
|
||
compileOnly(project(":communication")) | ||
testImplementation(project(":communication")) | ||
|
||
compileOnly(project(":utils:container-utils")) | ||
testImplementation(project(":utils:container-utils")) | ||
|
||
api(libs.okhttp) | ||
api(libs.moshi) | ||
|
||
testImplementation(project(":utils:test-utils")) | ||
testImplementation(group = "org.hamcrest", name = "hamcrest", version = "2.2") | ||
testImplementation(group = "org.jboss", name = "jboss-vfs", version = "3.2.16.Final") | ||
} | ||
|
||
jmh { | ||
jmhVersion = "1.28" | ||
duplicateClassesStrategy = DuplicatesStrategy.EXCLUDE | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
plugins { | ||
`java-library` | ||
} | ||
|
||
apply(from = "$rootDir/gradle/java.gradle") | ||
|
||
dependencies { | ||
implementation(libs.slf4j) | ||
|
||
testImplementation(project(":utils:test-utils")) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis | ||
import groovy.lang.Closure | ||
import org.gradle.kotlin.dsl.extra | ||
|
||
plugins { | ||
`java-library` | ||
idea | ||
} | ||
|
||
val minJavaVersionForTests by extra(JavaVersion.VERSION_17) | ||
|
||
apply(from = "$rootDir/gradle/java.gradle") | ||
|
||
dependencies { | ||
implementation(libs.slf4j) | ||
implementation(project(":internal-api")) | ||
implementation(libs.jnr.unixsocket) | ||
testImplementation(files(sourceSets["main_java17"].output)) | ||
} | ||
|
||
tasks.named<CheckForbiddenApis>("forbiddenApisMain_java17") { | ||
failOnMissingClasses = false | ||
} | ||
|
||
fun AbstractCompile.setJavaVersion(javaVersionInteger: Int) { | ||
(project.extra.get("setJavaVersion") as Closure<*>).call(this, javaVersionInteger) | ||
} | ||
|
||
listOf("compileMain_java17Java", "compileTestJava").forEach { | ||
tasks.named<JavaCompile>(it).configure { | ||
setJavaVersion(17) | ||
sourceCompatibility = JavaVersion.VERSION_1_8.toString() | ||
targetCompatibility = JavaVersion.VERSION_1_8.toString() | ||
} | ||
} | ||
|
||
idea { | ||
module { | ||
jdkName = "17" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
plugins { | ||
`java-library` | ||
} | ||
|
||
apply(from = "$rootDir/gradle/java.gradle") | ||
|
||
val minimumInstructionCoverage by extra(0.8) | ||
val excludedClassesCoverage by extra( | ||
listOf( | ||
"datadog.trace.test.agent.decoder.v04.raw.*", | ||
"datadog.trace.test.agent.decoder.v05.raw.*", | ||
) | ||
) | ||
|
||
dependencies { | ||
implementation(group = "org.msgpack", name = "msgpack-core", version = "0.8.24") | ||
testImplementation(libs.bundles.junit5) | ||
testImplementation(libs.truth) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
plugins { | ||
`java-library` | ||
} | ||
|
||
apply(from = "$rootDir/gradle/java.gradle") | ||
|
||
dependencies { | ||
api(libs.groovy) | ||
api(libs.bundles.spock) | ||
|
||
api(libs.bytebuddy) | ||
api(libs.bytebuddyagent) | ||
|
||
api(group = "com.github.stefanbirkner", name = "system-rules", version = "1.19.0") | ||
api(group = "commons-fileupload", name = "commons-fileupload", version = "1.5") | ||
|
||
compileOnly(libs.logback.core) | ||
compileOnly(libs.logback.classic) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
plugins { | ||
`java-library` | ||
} | ||
|
||
apply(from = "$rootDir/gradle/java.gradle") | ||
|
||
val excludedClassesCoverage by extra( | ||
listOf( | ||
"datadog.trace.api.time.ControllableTimeSource:", | ||
"datadog.trace.api.time.SystemTimeSource" | ||
) | ||
) | ||
|
||
dependencies { | ||
testImplementation(project(":utils:test-utils")) | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any idea why this one have
idea
specifically enabled?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to force the jdk to 17 for this module. It was used before.
In order to not break anything at this point, so I kept the configuration. We can revisit this later.