build.gradle 991 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. }
  14. processResources {
  15. enabled = false
  16. }
  17. jar {
  18. enabled = true
  19. }
  20. test {
  21. useJUnitPlatform()
  22. }
  23. tasks.register('runInstallJarLibrary', Exec) {
  24. doFirst {
  25. println "its-spring library install mvn repository..."
  26. def os = org.gradle.internal.os.OperatingSystem.current()
  27. workingDir = file('.')
  28. if (os.isWindows()) {
  29. commandLine 'cmd', '/C', 'start', 'install.bat'
  30. } else {
  31. commandLine 'sh', './install.sh'
  32. }
  33. }
  34. }
  35. jar.finalizedBy runInstallJarLibrary
  36. compileJava.options.encoding = 'UTF-8'
  37. tasks.withType(JavaCompile).configureEach {
  38. options.compilerArgs << '-Xlint:unchecked'
  39. options.deprecation = true
  40. options.encoding = 'UTF-8'
  41. }