-
Notifications
You must be signed in to change notification settings - Fork 1
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
chore: migrate to toml dependencies #56
base: main
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,51 @@ | ||||||
[versions] | ||||||
hypertrace-grpcUtils = "0.9.0" | ||||||
|
||||||
guice = "5.1.0" | ||||||
grpc = "1.48.0" | ||||||
jetty = "9.4.48.v20220622" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. might as well bump this to latest too
Suggested change
|
||||||
micrometer = "1.9.5" | ||||||
dropwizardMetrics = "4.2.10" | ||||||
prometheus = "0.12.0" | ||||||
mockito = "4.8.1" | ||||||
|
||||||
[libraries] | ||||||
hypertrace-grpc-client-utils = { module = "org.hypertrace.core.grpcutils:grpc-client-utils", version.ref = "hypertrace-grpcUtils"} | ||||||
hypertrace-grpc-server-utils = { module = "org.hypertrace.core.grpcutils:grpc-server-utils", version.ref = "hypertrace-grpcUtils"} | ||||||
|
||||||
grpc-api = { module = "io.grpc:grpc-api", version.ref = "grpc" } | ||||||
grpc-core = { module = "io.grpc:grpc-core", version.ref = "grpc" } | ||||||
grpc-services = { module = "io.grpc:grpc-services", version.ref = "grpc" } | ||||||
|
||||||
google-guice = { module = "com.google.inject:guice", version.ref = "guice" } | ||||||
google-guice-servlet = { module = "com.google.inject.extensions:guice-servlet", version.ref = "guice" } | ||||||
jetty-servlet = { module = "org.eclipse.jetty:jetty-servlet", version.ref = "jetty" } | ||||||
jetty-servlets = { module = "org.eclipse.jetty:jetty-servlets", version.ref = "jetty" } | ||||||
jetty-server = { module = "org.eclipse.jetty:jetty-server", version.ref = "jetty" } | ||||||
jetty-http = { module = "org.eclipse.jetty:jetty-http", version.ref = "jetty" } | ||||||
javax-servlet-api = { module = "javax.servlet:javax.servlet-api", version = "4.0.1" } | ||||||
dropwizard-metrics-core = {module = "io.dropwizard.metrics:metrics-core", version.ref = "dropwizardMetrics" } | ||||||
dropwizard-metrics-jvm = { module = "io.dropwizard.metrics:metrics-jvm", version.ref = "dropwizardMetrics" } | ||||||
dropwizard-metrics-servlets = { module = "io.dropwizard.metrics:metrics-servlets", version.ref = "dropwizardMetrics" } | ||||||
prometheus-dropwizard = { module = "io.prometheus:simpleclient_dropwizard", version.ref = "prometheus" } | ||||||
prometheus-servlet = { module = "io.prometheus:simpleclient_servlet", version.ref = "prometheus" } | ||||||
prometheus-pushgateway = { module = "io.prometheus:simpleclient_pushgateway", version.ref = "prometheus" } | ||||||
|
||||||
micrometer-core = { module = "io.micrometer:micrometer-core", version.ref = "micrometer" } | ||||||
micrometer-registry-prometheus = { module = "io.micrometer:micrometer-registry-prometheus", version.ref = "micrometer" } | ||||||
micrometer-jvm-extras = { module = "io.github.mweirauch:micrometer-jvm-extras", version = "0.2.2" } | ||||||
|
||||||
awaitility = { module = "org.awaitility:awaitility", version = "4.0.3" } | ||||||
google-guava = { module = "com.google.guava:guava", version = "31.1-jre" } | ||||||
typesafe-config = { module = "com.typesafe:config", version = "1.4.2" } | ||||||
lombok = { module = "org.projectlombok:lombok", version = "1.18.22" } | ||||||
slf4j-api = { module = "org.slf4j:slf4j-api", version = "1.7.32" } | ||||||
apache-log4j-slf4jImpl = { module = "org.apache.logging.log4j:log4j-slf4j-impl", version = "2.17.1" } | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
apache-httpclient = { module = "org.apache.httpcomponents:httpclient", version = "4.5.13" } | ||||||
|
||||||
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version = "5.8.2" } | ||||||
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" } | ||||||
mockito-junit = { module = "org.mockito:mockito-junit-jupiter", version.ref = "mockito" } | ||||||
|
||||||
[bundles] | ||||||
mockito = ["mockito-core", "mockito-junit"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,17 +6,16 @@ plugins { | |
} | ||
|
||
dependencies { | ||
api(project(":platform-service-framework")) | ||
api(platform("io.grpc:grpc-bom:1.47.0")) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you missed the grpc-bom - that's key! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought that was needed to sync grpc versions across (which is now achieved via toml), since other grpc libraries didn't really had versions mentioned. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I probably should have explained and messaged this, I just started doing it inconsistently 😳 So the idea of the BOM is that by declaring it here, it should get inherited when this library is used as a dependency. The version catalog helps us declare versions consistently within a project, but the bom helps us resolve consistently across projects. As an example of this, a common issue we see: |
||
api("io.grpc:grpc-api") | ||
api("io.grpc:grpc-services") | ||
api("org.hypertrace.core.grpcutils:grpc-client-utils:0.7.6") | ||
api("com.typesafe:config:1.4.2") | ||
api(project(":service-framework-spi")) | ||
api(projects.platformServiceFramework) | ||
api(libs.grpc.api) | ||
api(libs.grpc.services) | ||
api(libs.hypertrace.grpc.client.utils) | ||
api(libs.typesafe.config) | ||
api(projects.serviceFrameworkSpi) | ||
|
||
annotationProcessor("org.projectlombok:lombok:1.18.24") | ||
compileOnly("org.projectlombok:lombok:1.18.24") | ||
annotationProcessor(libs.lombok) | ||
compileOnly(libs.lombok) | ||
|
||
implementation("org.slf4j:slf4j-api:1.7.36") | ||
implementation("org.hypertrace.core.grpcutils:grpc-server-utils:0.7.6") | ||
implementation(libs.slf4j.api) | ||
implementation(libs.hypertrace.grpc.server.utils) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,31 +10,33 @@ tasks.test { | |
} | ||
|
||
dependencies { | ||
api(project(":service-framework-spi")) | ||
implementation(project(":platform-metrics")) | ||
api(projects.serviceFrameworkSpi) | ||
implementation(projects.platformMetrics) | ||
|
||
api("org.slf4j:slf4j-api:1.7.36") | ||
api("com.typesafe:config:1.4.2") | ||
api(libs.slf4j.api) | ||
api(libs.typesafe.config) | ||
|
||
// Use for thread dump servlet | ||
implementation("io.dropwizard.metrics:metrics-servlets:4.2.10") | ||
implementation("org.eclipse.jetty:jetty-servlet:9.4.48.v20220622") | ||
implementation(libs.dropwizard.metrics.servlets) | ||
implementation(libs.jetty.servlet) | ||
|
||
// Use for metrics servlet | ||
implementation("io.prometheus:simpleclient_servlet:0.12.0") | ||
implementation(libs.prometheus.servlet) | ||
|
||
// http client | ||
implementation("org.apache.httpcomponents:httpclient:4.5.13") | ||
|
||
constraints { | ||
implementation("commons-codec:commons-codec:1.15") { | ||
because("version 1.12 has a vulnerability https://snyk.io/vuln/SNYK-JAVA-COMMONSCODEC-561518") | ||
implementation(libs.apache.httpclient) | ||
|
||
testImplementation(libs.apache.log4j.slf4jImpl) | ||
testImplementation(libs.junit.jupiter) | ||
testImplementation(libs.bundles.mockito) | ||
testImplementation(libs.jetty.servlet) { | ||
artifact { | ||
classifier = "tests" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is this classifier? |
||
} | ||
} | ||
testImplementation(libs.jetty.http) { | ||
artifact { | ||
classifier = "tests" | ||
} | ||
} | ||
|
||
testImplementation("org.apache.logging.log4j:log4j-slf4j-impl:2.17.0") | ||
testImplementation("org.junit.jupiter:junit-jupiter:5.7.1") | ||
testImplementation("org.mockito:mockito-core:3.8.0") | ||
testImplementation("org.eclipse.jetty:jetty-servlet:9.4.48.v20220622:tests") | ||
testImplementation("org.eclipse.jetty:jetty-http:9.4.48.v20220622:tests") | ||
} |
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.
(that's the version it'll get from grpcutils anyway)