build.gradle 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. description = "benchmark"
  2. apply plugin: "java"
  3. apply plugin: "application"
  4. apply plugin: 'cn.taketoday.application'
  5. apply plugin: 'io.spring.dependency-management'
  6. configure(allprojects) {
  7. group = "cn.taketoday.benchmark"
  8. repositories {
  9. mavenCentral()
  10. maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
  11. }
  12. }
  13. dependencies {
  14. implementation 'cn.taketoday:today-starter-netty'
  15. implementation 'cn.taketoday:today-starter-json'
  16. implementation 'cn.taketoday:today-starter-jdbc'
  17. implementation 'cn.taketoday:today-starter-web'
  18. implementation 'cn.taketoday:today-starter-freemarker'
  19. implementation 'mysql:mysql-connector-java'
  20. implementation 'ch.qos.logback:logback-classic'
  21. implementation('io.netty:netty-transport-native-epoll') {
  22. artifact {
  23. classifier = 'linux-x86_64'
  24. }
  25. }
  26. // implementation('io.netty:netty-transport-native-kqueue') {
  27. // artifact {
  28. // classifier = 'osx-aarch_64'
  29. // }
  30. // }
  31. }
  32. java {
  33. sourceCompatibility = JavaVersion.VERSION_17
  34. targetCompatibility = JavaVersion.VERSION_17
  35. }
  36. application {
  37. mainClass = 'cn.taketoday.benchmark.BenchmarkApplication'
  38. applicationDefaultJvmArgs = [
  39. "-server",
  40. "-XX:+UseNUMA",
  41. "-XX:+UseG1GC",
  42. "-XX:+DisableExplicitGC",
  43. "-XX:-StackTraceInThrowable",
  44. "-XX:+UseStringDeduplication",
  45. "-Dinfra.profiles.active=test",
  46. "-Dio.netty.buffer.checkBounds=false",
  47. "-Dio.netty.buffer.checkAccessible=false",
  48. "-Dio.netty.leakDetection.level=disabled",
  49. "--add-opens=java.base/java.nio=ALL-UNNAMED",
  50. "--add-opens=java.base/sun.nio.ch=ALL-UNNAMED"
  51. ]
  52. }