build.gradle.kts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. plugins {
  2. `kotlin-dsl`
  3. // When updating, update below in dependencies too
  4. id("com.diffplug.spotless") version "6.18.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. // also very hard to find out where this happens
  27. "ktlint_standard_wrapping" to "disabled"
  28. ))
  29. target("**/*.gradle.kts")
  30. }
  31. }
  32. repositories {
  33. mavenCentral()
  34. gradlePluginPortal()
  35. }
  36. tasks.withType<Test>().configureEach {
  37. useJUnitPlatform()
  38. }
  39. dependencies {
  40. implementation(gradleApi())
  41. implementation(localGroovy())
  42. // dependencySubstitution is applied to this dependency (see seetings.gradle.kts)
  43. implementation("io.opentelemetry.instrumentation:gradle-plugins")
  44. implementation("org.eclipse.aether:aether-connector-basic:1.1.0")
  45. implementation("org.eclipse.aether:aether-transport-http:1.1.0")
  46. implementation("org.apache.maven:maven-aether-provider:3.3.9")
  47. // When updating, update above in plugins too
  48. implementation("com.diffplug.spotless:spotless-plugin-gradle:6.18.0")
  49. implementation("com.google.guava:guava:31.1-jre")
  50. implementation("gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.8.18")
  51. implementation("gradle.plugin.com.github.johnrengelman:shadow:8.0.0")
  52. implementation("org.apache.httpcomponents:httpclient:4.5.14")
  53. implementation("com.gradle.enterprise:com.gradle.enterprise.gradle.plugin:3.13")
  54. implementation("org.owasp:dependency-check-gradle:8.2.1")
  55. implementation("ru.vyarus:gradle-animalsniffer-plugin:1.7.0")
  56. // When updating, also update dependencyManagement/build.gradle.kts
  57. implementation("net.bytebuddy:byte-buddy-gradle-plugin:1.14.4")
  58. implementation("gradle.plugin.io.morethan.jmhreport:gradle-jmh-report:0.9.0")
  59. implementation("me.champeau.jmh:jmh-gradle-plugin:0.7.1")
  60. implementation("net.ltgt.gradle:gradle-errorprone-plugin:3.1.0")
  61. implementation("net.ltgt.gradle:gradle-nullaway-plugin:1.5.0")
  62. implementation("me.champeau.gradle:japicmp-gradle-plugin:0.4.1")
  63. testImplementation(enforcedPlatform("org.junit:junit-bom:5.9.3"))
  64. testImplementation("org.junit.jupiter:junit-jupiter-api")
  65. testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
  66. testImplementation("org.assertj:assertj-core:3.24.2")
  67. }