build.gradle 732 B

12345678910111213141516171819202122232425262728293031323334
  1. plugins {
  2. id 'java'
  3. }
  4. group 'org.example'
  5. version '1.0-SNAPSHOT'
  6. sourceCompatibility = 17
  7. repositories {
  8. maven { url 'https://maven.aliyun.com/nexus/content/groups/public' }
  9. }
  10. dependencies {
  11. implementation 'commons-io:commons-io:2.11.0'
  12. testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
  13. testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
  14. }
  15. jar {
  16. manifest {
  17. attributes(
  18. "Manifest-Version": 1.0,
  19. "Main-Class": "org.example.Main")
  20. }
  21. archiveName = 'app.jar'
  22. from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
  23. into('assets') {
  24. from 'assets'
  25. }
  26. }
  27. test {
  28. useJUnitPlatform()
  29. }