You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.gradle 12KB

2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. import org.gradle.internal.os.OperatingSystem
  2. buildscript {
  3. repositories {
  4. mavenLocal()
  5. mavenCentral()
  6. maven { url "https://repo.spring.io/plugins-snapshot" }
  7. maven { url "https://plugins.gradle.org/m2/" }
  8. }
  9. dependencies {
  10. classpath "org.springframework.boot:spring-boot-gradle-plugin:${spring_boot_version}"
  11. classpath "io.spring.gradle:propdeps-plugin:0.0.8-SNAPSHOT"
  12. classpath "gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:1.5.2"
  13. //jhipster-needle-gradle-buildscript-dependency - JHipster will add additional gradle build script plugins here
  14. }
  15. }
  16. plugins {
  17. // open when run local env
  18. // id "ua.eshepelyuk.ManifestClasspath" version "1.0.0"
  19. id "org.sonarqube" version "2.6.2"
  20. id "net.ltgt.apt-eclipse" version "0.19"
  21. id "net.ltgt.apt-idea" version "0.19"
  22. id "net.ltgt.apt" version "0.19"
  23. id "io.spring.dependency-management" version "1.0.6.RELEASE"
  24. id "com.github.node-gradle.gulp" version "1.3.0"
  25. id 'org.liquibase.gradle' version '2.0.1'
  26. //jhipster-needle-gradle-plugins - JHipster will add additional gradle plugins here
  27. }
  28. apply plugin: 'java'
  29. sourceCompatibility=1.8
  30. targetCompatibility=1.8
  31. // Until JHipster supports JDK 9
  32. assert System.properties['java.specification.version'] == '1.8'
  33. apply plugin: 'maven'
  34. apply plugin: 'org.springframework.boot'
  35. apply plugin: 'war'
  36. apply plugin: 'propdeps'
  37. apply plugin: 'com.github.node-gradle.gulp'
  38. apply plugin: 'io.spring.dependency-management'
  39. apply plugin: 'idea'
  40. dependencyManagement {
  41. imports {
  42. mavenBom 'io.github.jhipster:jhipster-dependencies:' + jhipster_dependencies_version
  43. //jhipster-needle-gradle-dependency-management - JHipster will add additional dependencies management here
  44. }
  45. }
  46. defaultTasks 'bootRun'
  47. group = 'vn.azteam'
  48. version = '0.0.1-SNAPSHOT'
  49. description = ''
  50. bootWar {
  51. mainClassName = 'vn.azteam.tpf.TPFApp'
  52. }
  53. war {
  54. enabled = true
  55. classifier = 'original'
  56. }
  57. springBoot {
  58. mainClassName = 'vn.azteam.tpf.TPFApp'
  59. buildInfo()
  60. }
  61. if (OperatingSystem.current().isWindows()) {
  62. // https://stackoverflow.com/questions/40037487/the-filename-or-extension-is-too-long-error-using-gradle
  63. task classpathJar(type: Jar) {
  64. dependsOn configurations.runtime
  65. appendix = 'classpath'
  66. doFirst {
  67. manifest {
  68. attributes 'Class-Path': configurations.runtime.files.collect {
  69. it.toURI().toURL().toString().replaceFirst(/file:\/+/, '/').replaceAll(' ', '%20')
  70. }.join(' ')
  71. }
  72. }
  73. }
  74. bootRun {
  75. dependsOn classpathJar
  76. doFirst {
  77. classpath = files("$buildDir/classes/java/main", "$buildDir/resources/main", classpathJar.archivePath)
  78. }
  79. }
  80. }
  81. test {
  82. exclude '**/CucumberTest*'
  83. // uncomment if the tests reports are not generated
  84. // see https://github.com/jhipster/generator-jhipster/pull/2771 and https://github.com/jhipster/generator-jhipster/pull/4484
  85. // ignoreFailures true
  86. reports.html.enabled = false
  87. }
  88. task testReport(type: TestReport) {
  89. destinationDir = file("$buildDir/reports/tests")
  90. reportOn test
  91. }
  92. apply from: 'gradle/docker.gradle'
  93. apply from: 'gradle/sonar.gradle'
  94. //jhipster-needle-gradle-apply-from - JHipster will add additional gradle scripts to be applied here
  95. if (project.hasProperty('prod')) {
  96. apply from: 'gradle/profile_prod.gradle'
  97. } else {
  98. apply from: 'gradle/profile_dev.gradle'
  99. }
  100. if (!project.hasProperty('runList')) {
  101. project.ext.runList = 'main'
  102. }
  103. project.ext.diffChangelogFile = 'src/main/resources/config/liquibase/changelog/' + new Date().format('yyyyMMddHHmmss') + '_changelog.xml'
  104. liquibase {
  105. activities {
  106. main {
  107. driver 'com.mysql.jdbc.Driver'
  108. url 'jdbc:mysql://1.0.0.4:3306/smf'
  109. username 'root'
  110. password 'P@ssw0rdfarm'
  111. changeLogFile 'src/main/resources/config/liquibase/master.xml'
  112. defaultSchemaName 'smf'
  113. logLevel 'debug'
  114. classpath 'src/main/resources/'
  115. }
  116. diffLog {
  117. driver 'com.mysql.jdbc.Driver'
  118. url 'jdbc:mysql://1.0.0.4:3306/smf'
  119. username 'root'
  120. password 'P@ssw0rdfarm'
  121. changeLogFile project.ext.diffChangelogFile
  122. referenceUrl 'hibernate:spring:vn.azteam.smf.domain?dialect=org.hibernate.dialect.MySQL5InnoDBDialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy'
  123. defaultSchemaName 'smf'
  124. logLevel 'debug'
  125. classpath "$buildDir/classes/java/main"
  126. }
  127. }
  128. runList = project.ext.runList
  129. }
  130. configurations {
  131. providedRuntime
  132. compile.exclude module: "spring-boot-starter-tomcat"
  133. }
  134. repositories {
  135. mavenLocal()
  136. mavenCentral()
  137. jcenter()
  138. //jhipster-needle-gradle-repositories - JHipster will add additional repositories
  139. }
  140. dependencies {
  141. // Use ", version: jhipster_dependencies_version, changing: true" if you want
  142. // to use a SNAPSHOT release instead of a stable release
  143. // https://mvnrepository.com/artifact/com.google.firebase/firebase-admin
  144. compile group: 'com.google.firebase', name: 'firebase-admin', version: '7.0.1'
  145. // https://mvnrepository.com/artifact/org.casbin/casbin-spring-boot-starter
  146. compile group: 'org.casbin', name: 'casbin-spring-boot-starter', version: '0.0.9'
  147. compile group: "io.github.jhipster", name: "jhipster-framework"
  148. compile "org.apache.poi:poi:4.1.2"
  149. compile "org.apache.poi:poi-ooxml:4.1.2"
  150. compile "org.apache.poi:ooxml-schemas:1.4"
  151. // https://mvnrepository.com/artifact/org.apache.xmlbeans/xmlbeans
  152. compile group: 'org.apache.xmlbeans', name: 'xmlbeans', version: '3.1.0'
  153. compile "org.springframework.boot:spring-boot-starter-cache"
  154. compile "io.dropwizard.metrics:metrics-core"
  155. compile "io.dropwizard.metrics:metrics-jcache"
  156. compile "io.dropwizard.metrics:metrics-json"
  157. compile "io.dropwizard.metrics:metrics-jvm"
  158. compile "io.dropwizard.metrics:metrics-servlet"
  159. compile "io.dropwizard.metrics:metrics-servlets"
  160. compile "io.prometheus:simpleclient"
  161. compile "io.prometheus:simpleclient_dropwizard"
  162. compile "io.prometheus:simpleclient_servlet"
  163. compile "net.logstash.logback:logstash-logback-encoder"
  164. compile "com.fasterxml.jackson.datatype:jackson-datatype-hppc"
  165. compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310"
  166. compile "com.fasterxml.jackson.datatype:jackson-datatype-hibernate5"
  167. compile "com.fasterxml.jackson.core:jackson-annotations"
  168. compile "com.fasterxml.jackson.core:jackson-databind"
  169. compile "com.fasterxml.jackson.module:jackson-module-afterburner"
  170. compile "com.opencsv:opencsv:4.5"
  171. compile "com.ryantenney.metrics:metrics-spring"
  172. compile "javax.cache:cache-api"
  173. compile "org.hibernate:hibernate-core"
  174. compile "com.zaxxer:HikariCP"
  175. compile "org.apache.commons:commons-lang3"
  176. compile "commons-io:commons-io"
  177. compile "javax.transaction:javax.transaction-api"
  178. compile "org.ehcache:ehcache"
  179. compile "org.hibernate:hibernate-jcache"
  180. compile "org.hibernate:hibernate-entitymanager"
  181. compile "org.hibernate:hibernate-envers"
  182. compile "org.hibernate.validator:hibernate-validator"
  183. compile "org.liquibase:liquibase-core"
  184. compile "com.mattbertolini:liquibase-slf4j"
  185. liquibaseRuntime "org.liquibase:liquibase-core"
  186. liquibaseRuntime "org.liquibase.ext:liquibase-hibernate5:${liquibase_hibernate5_version}"
  187. liquibaseRuntime sourceSets.main.compileClasspath
  188. compile "org.springframework.boot:spring-boot-loader-tools"
  189. compile "org.springframework.boot:spring-boot-starter-mail"
  190. compile "org.springframework.boot:spring-boot-starter-logging"
  191. compile "org.springframework.boot:spring-boot-starter-actuator"
  192. compile "org.springframework.boot:spring-boot-starter-aop"
  193. compile "org.springframework.boot:spring-boot-starter-data-jpa"
  194. compile "org.springframework.boot:spring-boot-starter-data-elasticsearch"
  195. // Spring Data Jest dependencies for Elasticsearch
  196. compile ("com.github.vanroy:spring-boot-starter-data-jest") {
  197. exclude module: 'commons-logging'
  198. }
  199. // log4j needed to create embedded elasticsearch instance
  200. runtime "org.apache.logging.log4j:log4j-api:2.8.2"
  201. runtime "org.apache.logging.log4j:log4j-core:2.8.2"
  202. // end of Spring Data Jest dependencies
  203. compile "org.springframework.boot:spring-boot-starter-security"
  204. compile ("org.springframework.boot:spring-boot-starter-web") {
  205. exclude module: 'spring-boot-starter-tomcat'
  206. }
  207. compile "org.springframework.boot:spring-boot-starter-json"
  208. compile "org.springframework.boot:spring-boot-starter-undertow"
  209. compile "org.springframework.boot:spring-boot-starter-websocket"
  210. compile "org.springframework.boot:spring-boot-starter-thymeleaf"
  211. compile "org.zalando:problem-spring-web:0.24.0-RC.0"
  212. compile "org.springframework.boot:spring-boot-starter-cloud-connectors"
  213. compile "org.springframework.security:spring-security-config"
  214. compile "org.springframework.security:spring-security-data"
  215. compile "org.springframework.security:spring-security-web"
  216. compile "org.springframework.security:spring-security-messaging"
  217. compile "io.jsonwebtoken:jjwt-api"
  218. runtime "io.jsonwebtoken:jjwt-impl"
  219. runtime "io.jsonwebtoken:jjwt-jackson"
  220. // compile ("io.springfox:springfox-swagger2") {
  221. // exclude module: 'mapstruct'
  222. // }
  223. // https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-ui
  224. //https://www.baeldung.com/java-html-to-pdf
  225. implementation group: 'org.springdoc', name: 'springdoc-openapi-ui', version: '1.7.0'
  226. implementation 'org.jsoup:jsoup:1.17.2'
  227. //implementation group: 'org.xhtmlrenderer', name: 'flying-saucer-pdf-itext5', version: '9.7.1'
  228. implementation group: 'org.xhtmlrenderer', name: 'flying-saucer-pdf', version: '9.3.2'
  229. //implementation group: 'com.lowagie.text', name: 'com.springsource.com.lowagie.text', version: '2.1.7'
  230. implementation group: 'org.eclipse.birt.runtime.3_7_1', name: 'com.lowagie.text', version: '2.1.7'
  231. compile "com.google.zxing:core:3.3.0"
  232. compile 'com.google.zxing:javase:3.3.0'
  233. // https://www.geeksforgeeks.org/how-to-generate-and-read-qr-code-with-java-using-zxing-library/
  234. // compile "io.springfox:springfox-bean-validators"
  235. compile "mysql:mysql-connector-java"
  236. liquibaseRuntime "mysql:mysql-connector-java"
  237. compile "org.mapstruct:mapstruct-jdk8:${mapstruct_version}"
  238. annotationProcessor "org.mapstruct:mapstruct-processor:${mapstruct_version}"
  239. annotationProcessor "org.hibernate:hibernate-jpamodelgen"
  240. annotationProcessor ("org.springframework.boot:spring-boot-configuration-processor") {
  241. exclude group: 'com.vaadin.external.google', module: 'android-json'
  242. }
  243. testCompile "com.jayway.jsonpath:json-path"
  244. testCompile ("org.springframework.boot:spring-boot-starter-test") {
  245. exclude group: 'com.vaadin.external.google', module: 'android-json'
  246. }
  247. testCompile "org.springframework.security:spring-security-test"
  248. testCompile "org.springframework.boot:spring-boot-test"
  249. testCompile "org.assertj:assertj-core"
  250. testCompile "junit:junit"
  251. testCompile "org.mockito:mockito-core"
  252. testCompile "com.mattbertolini:liquibase-slf4j"
  253. testCompile "org.hamcrest:hamcrest-library"
  254. testCompile "com.h2database:h2"
  255. //jhipster-needle-gradle-dependency - JHipster will add additional dependencies here
  256. // https://mvnrepository.com/artifact/org.projectlombok/lombok
  257. provided group: 'org.projectlombok', name: 'lombok', version: '1.18.4'
  258. }
  259. task cleanResources(type: Delete) {
  260. delete 'build/resources'
  261. }
  262. wrapper {
  263. gradleVersion = '4.10.2'
  264. }
  265. task stage(dependsOn: 'bootWar') {
  266. }
  267. //if (project.hasProperty('nodeInstall')) {
  268. node {
  269. download = true
  270. version = "${node_version}"
  271. npmVersion = "${npm_version}"
  272. yarnVersion = "${yarn_version}"
  273. }
  274. //}
  275. bootWar.dependsOn war
  276. compileJava.dependsOn processResources
  277. processResources.dependsOn cleanResources,bootBuildInfo
  278. bootBuildInfo.mustRunAfter cleanResources