build.gradle.kts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * This file was generated by the Gradle 'init' task.
  3. *
  4. * This generated file contains a sample Java application project to get you started.
  5. * For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.4/userguide/building_java_projects.html in the Gradle documentation.
  6. */
  7. plugins {
  8. // Apply the application plugin to add support for building a CLI application in Java.
  9. application
  10. }
  11. repositories {
  12. // Use Maven Central for resolving dependencies.
  13. mavenCentral()
  14. }
  15. dependencies {
  16. // Use JUnit Jupiter for testing.
  17. testImplementation("org.junit.jupiter:junit-jupiter:5.9.3")
  18. testRuntimeOnly("org.junit.platform:junit-platform-launcher")
  19. // This dependency is used by the application.
  20. implementation("com.google.guava:guava:32.1.1-jre")
  21. }
  22. // Apply a specific Java toolchain to ease working on different environments.
  23. java {
  24. toolchain {
  25. languageVersion.set(JavaLanguageVersion.of(17))
  26. }
  27. }
  28. application {
  29. // Define the main class for the application.
  30. mainClass.set("com.yangyi.App")
  31. }
  32. tasks.named<Test>("test") {
  33. // Use JUnit Platform for unit tests.
  34. useJUnitPlatform()
  35. }