build.gradle.kts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. plugins {
  2. `kotlin-dsl`
  3. // When updating, update below in dependencies too
  4. id("com.diffplug.spotless") version "6.25.0"
  5. }
  6. spotless {
  7. java {
  8. googleJavaFormat()
  9. licenseHeaderFile(
  10. rootProject.file("../buildscripts/spotless.license.java"),
  11. "(package|import|public)"
  12. )
  13. target("src/**/*.java")
  14. }
  15. kotlinGradle {
  16. // not sure why it's not using the indent settings from .editorconfig
  17. ktlint().editorConfigOverride(mapOf(
  18. "indent_size" to "2",
  19. "continuation_indent_size" to "2",
  20. "max_line_length" to "160",
  21. "ktlint_standard_no-wildcard-imports" to "disabled",
  22. // ktlint does not break up long lines, it just fails on them
  23. "ktlint_standard_max-line-length" to "disabled",
  24. // ktlint makes it *very* hard to locate where this actually happened
  25. "ktlint_standard_trailing-comma-on-call-site" to "disabled",
  26. // depends on ktlint_standard_wrapping
  27. "ktlint_standard_trailing-comma-on-declaration-site" to "disabled",
  28. // also very hard to find out where this happens
  29. "ktlint_standard_wrapping" to "disabled"
  30. ))
  31. target("**/*.gradle.kts")
  32. }
  33. }
  34. repositories {
  35. mavenCentral()
  36. gradlePluginPortal()
  37. }
  38. tasks.withType<Test>().configureEach {
  39. useJUnitPlatform()
  40. }
  41. dependencies {
  42. implementation(gradleApi())
  43. implementation(localGroovy())
  44. // dependencySubstitution is applied to this dependency (see seetings.gradle.kts)
  45. implementation("io.opentelemetry.instrumentation:gradle-plugins")
  46. implementation("org.eclipse.aether:aether-connector-basic:1.1.0")
  47. implementation("org.eclipse.aether:aether-transport-http:1.1.0")
  48. implementation("org.apache.maven:maven-aether-provider:3.3.9")
  49. // When updating, update above in plugins too
  50. implementation("com.diffplug.spotless:spotless-plugin-gradle:6.25.0")
  51. implementation("com.google.guava:guava:33.2.1-jre")
  52. implementation("gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.8.18")
  53. implementation("com.github.johnrengelman:shadow:8.1.1")
  54. implementation("org.apache.httpcomponents:httpclient:4.5.14")
  55. implementation("com.gradle.develocity:com.gradle.develocity.gradle.plugin:3.17.5")
  56. implementation("org.owasp:dependency-check-gradle:9.2.0")
  57. implementation("ru.vyarus:gradle-animalsniffer-plugin:1.7.1")
  58. implementation("org.spdx:spdx-gradle-plugin:0.8.0")
  59. // When updating, also update dependencyManagement/build.gradle.kts
  60. implementation("net.bytebuddy:byte-buddy-gradle-plugin:1.14.17")
  61. implementation("gradle.plugin.io.morethan.jmhreport:gradle-jmh-report:0.9.6")
  62. implementation("me.champeau.jmh:jmh-gradle-plugin:0.7.2")
  63. implementation("net.ltgt.gradle:gradle-errorprone-plugin:4.0.0")
  64. implementation("net.ltgt.gradle:gradle-nullaway-plugin:2.0.0")
  65. implementation("me.champeau.gradle:japicmp-gradle-plugin:0.4.3")
  66. testImplementation(enforcedPlatform("org.junit:junit-bom:5.10.2"))
  67. testImplementation("org.junit.jupiter:junit-jupiter-api")
  68. testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
  69. testImplementation("org.assertj:assertj-core:3.26.0")
  70. }