build.gradle 741 B

12345678910111213141516171819202122232425262728293031323334
  1. plugins {
  2. id 'java'
  3. }
  4. group 'com.sainyu.beidou3.demo'
  5. version '1.0-SNAPSHOT'
  6. repositories {
  7. mavenCentral()
  8. }
  9. dependencies {
  10. implementation fileTree(dir: 'libs', include: ['*.jar'])
  11. testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
  12. testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
  13. }
  14. test {
  15. useJUnitPlatform()
  16. }
  17. // my config
  18. apply plugin: 'java'
  19. apply plugin: 'application'
  20. mainClassName = 'com.sainyu.beidou3.demo.SocketFrame'
  21. //清除上次的编译过的文件
  22. task clearPj(type:Delete){
  23. delete 'build','target'
  24. }
  25. // 未经检查或不安全的操作,使用 -Xlint:unchecked 重新编译
  26. tasks.withType(JavaCompile) {
  27. options.compilerArgs << "-Xlint:unchecked" << "-Werror"
  28. }