build.gradle 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. plugins {
  2. id 'java'
  3. }
  4. group = 'com.its'
  5. version = '0.0.1'
  6. sourceCompatibility = '1.8'
  7. targetCompatibility = '1.8'
  8. compileJava.options.encoding = 'UTF-8'
  9. repositories {
  10. mavenCentral()
  11. }
  12. dependencies {
  13. implementation 'io.netty:netty-all:4.1.52.Final'
  14. }
  15. processResources {
  16. enabled = false
  17. }
  18. jar {
  19. enabled = true
  20. }
  21. test {
  22. useJUnitPlatform()
  23. }
  24. tasks.register('runInstallJarLibrary', Exec) {
  25. doFirst {
  26. println "its-cluster library install mvn repository..."
  27. def os = org.gradle.internal.os.OperatingSystem.current()
  28. workingDir = file('.')
  29. if (os.isWindows()) {
  30. commandLine 'cmd', '/C', 'start', 'install.bat'
  31. } else {
  32. commandLine 'sh', './install.sh'
  33. }
  34. }
  35. }
  36. jar.finalizedBy runInstallJarLibrary
  37. compileJava.options.encoding = 'UTF-8'
  38. tasks.withType(JavaCompile).configureEach {
  39. options.compilerArgs << '-Xlint:unchecked'
  40. options.deprecation = true
  41. options.encoding = 'UTF-8'
  42. }