build.gradle 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. plugins {
  2. id 'java'
  3. }
  4. group 'org.example'
  5. version '1.0-SNAPSHOT'
  6. sourceCompatibility = 17
  7. targetCompatibility = 17
  8. tasks.withType(JavaCompile) {
  9. options.encoding = "UTF-8"
  10. }
  11. repositories {
  12. maven { url 'https://maven.aliyun.com/nexus/content/groups/public' }
  13. }
  14. dependencies {
  15. implementation 'commons-io:commons-io:2.11.0'
  16. implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.4'
  17. implementation 'org.apache.httpcomponents.client5:httpclient5:5.2.1'
  18. implementation 'com.aliyun.openservices:aliyun-log-producer:0.3.11'
  19. testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
  20. testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
  21. compileOnly 'org.projectlombok:lombok:1.18.24'
  22. annotationProcessor 'org.projectlombok:lombok:1.18.24'
  23. implementation 'com.beust:jcommander:1.82'
  24. }
  25. jar {
  26. manifest {
  27. attributes(
  28. "Manifest-Version": 1.0,
  29. "Main-Class": "org.example.Daka")
  30. }
  31. archiveFileName = 'app.jar'
  32. from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
  33. into('assets') {
  34. from 'assets'
  35. }
  36. duplicatesStrategy = 'include'
  37. }
  38. test {
  39. useJUnitPlatform()
  40. }