build.gradle 758 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. mavenCentral()
  10. }
  11. dependencies {
  12. implementation 'commons-io:commons-io:2.11.0'
  13. testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
  14. testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
  15. }
  16. jar {
  17. manifest {
  18. attributes(
  19. "Manifest-Version": 1.0,
  20. "Main-Class": "org.example.Main")
  21. }
  22. archiveFileName = 'app.jar'
  23. from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
  24. into('assets') {
  25. from 'assets'
  26. }
  27. }
  28. test {
  29. useJUnitPlatform()
  30. }