build.gradle 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. buildscript {
  2. repositories {
  3. mavenCentral()
  4. maven { url "http://maven.aliyun.com/nexus/content/groups/public/"}
  5. maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
  6. mavenLocal()
  7. }
  8. dependencies {
  9. classpath("org.springframework.boot:spring-boot-gradle-plugin:2.1.1.RELEASE")
  10. }
  11. }
  12. plugins {
  13. id 'org.springframework.boot' version '2.1.1.RELEASE'
  14. }
  15. apply plugin: 'java'
  16. apply plugin: 'eclipse'
  17. apply plugin: 'idea'
  18. apply plugin: 'maven'
  19. apply plugin: 'org.springframework.boot'
  20. apply plugin: 'io.spring.dependency-management'
  21. sourceCompatibility = 1.8
  22. targetCompatibility = 1.8
  23. group = 'org.example'
  24. version = '1.0.0-SNAPSHOT'
  25. repositories {
  26. mavenLocal()
  27. mavenCentral()
  28. maven { url "http://maven.aliyun.com/nexus/content/groups/public/"}
  29. maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
  30. maven { url "https://dl.bintray.com/ethereum/maven/" }
  31. maven { url "https://oss.sonatype.org/service/local/staging/deploy/maven2"}
  32. }
  33. configurations {
  34. compileOnly {
  35. extendsFrom annotationProcessor
  36. }
  37. all {
  38. }
  39. }
  40. dependencies {
  41. implementation 'org.springframework.boot:spring-boot-starter-web'
  42. implementation 'org.slf4j:slf4j-api:1.7.5'
  43. compileOnly 'org.projectlombok:lombok'
  44. annotationProcessor 'org.projectlombok:lombok'
  45. testImplementation('org.springframework.boot:spring-boot-starter-test') {
  46. exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
  47. }
  48. compile ('org.fisco-bcos.java-sdk:fisco-bcos-java-sdk:2.9.1') {
  49. exclude group: 'org.slf4j'
  50. }
  51. }
  52. sourceSets {
  53. main {
  54. java {
  55. srcDir 'src/main/java'
  56. }
  57. resources {
  58. srcDir 'src/main/resources'
  59. }
  60. }
  61. }
  62. test {
  63. useJUnitPlatform()
  64. }
  65. bootJar {
  66. destinationDir file('dist')
  67. archiveName project.name + '-exec.jar'
  68. doLast {
  69. copy {
  70. from file('src/main/resources')
  71. into 'dist'
  72. }
  73. }
  74. }
  75. clean {
  76. println "delete ${projectDir}/dist"
  77. delete "${projectDir}/dist"
  78. }