build.gradle 865 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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-network library install mvn repository..."
  27. workingDir = file('.')
  28. commandLine = ['cmd', '/C', 'start', 'install.bat']
  29. // cmd /C start ./install.bat
  30. }
  31. }
  32. jar.finalizedBy runInstallJarLibrary
  33. compileJava.options.encoding = 'UTF-8'
  34. tasks.withType(JavaCompile).configureEach {
  35. options.compilerArgs << '-Xlint:unchecked'
  36. options.deprecation = true
  37. options.encoding = 'UTF-8'
  38. }