Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

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