init 2
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
ext {
|
||||
if (project.hasProperty("prod")) {
|
||||
springProfiles = "prod"
|
||||
springTestProfiles = "test,testprod"
|
||||
} else {
|
||||
springProfiles = "dev"
|
||||
springTestProfiles = "test,testdev"
|
||||
}
|
||||
if (project.hasProperty("tls")) {
|
||||
springProfiles += ",tls"
|
||||
}
|
||||
if (project.hasProperty("e2e")) {
|
||||
springProfiles += ",e2e"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
// jhipster-needle-gradle-apply-from - JHipster will add additional gradle scripts to be applied here
|
||||
|
||||
if (project.hasProperty("prod")) {
|
||||
apply from: "gradle/profile_prod.gradle"
|
||||
} else {
|
||||
apply from: "gradle/profile_dev.gradle"
|
||||
}
|
||||
|
||||
if (project.hasProperty("war")) {
|
||||
apply from: "gradle/war.gradle"
|
||||
}
|
||||
|
||||
|
||||
defaultTasks "bootRun"
|
||||
|
||||
springBoot {
|
||||
mainClass = "com.sisvietnamvn.web.SisvietnamvnApp"
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
exclude "**/*IT*", "**/*IntTest*"
|
||||
testLogging {
|
||||
events = ['FAILED', 'SKIPPED']
|
||||
exceptionFormat = "full"
|
||||
}
|
||||
jvmArgs += '-Xmx512m'
|
||||
|
||||
systemProperty('spring.profiles.active', springTestProfiles)
|
||||
|
||||
// uncomment if the tests reports are not generated
|
||||
// see https://github.com/jhipster/generator-jhipster/pull/2771 and https://github.com/jhipster/generator-jhipster/pull/4484
|
||||
// ignoreFailures true
|
||||
reports.html.required = false
|
||||
}
|
||||
|
||||
tasks.named('check').configure { dependsOn(tasks.named('integrationTest')) }
|
||||
|
||||
tasks.register('testReport', TestReport) {
|
||||
destinationDirectory = layout.buildDirectory.dir("reports/tests")
|
||||
testResults.from(test)
|
||||
}
|
||||
|
||||
tasks.register('integrationTestReport', TestReport) {
|
||||
destinationDirectory = layout.buildDirectory.dir("reports/tests")
|
||||
testResults.from(tasks.named('integrationTest'))
|
||||
}
|
||||
|
||||
gitProperties {
|
||||
failOnNoGitDirectory = false
|
||||
keys = ["git.branch", "git.commit.id.abbrev", "git.commit.id.describe"]
|
||||
}
|
||||
|
||||
tasks.named('generateGitProperties') {
|
||||
outputs.doNotCacheIf("Task is always executed") { true }
|
||||
}
|
||||
|
||||
tasks.register('cleanResources', Delete) {
|
||||
delete "build/resources"
|
||||
}
|
||||
|
||||
tasks.named('compileJava').configure { dependsOn(tasks.named('processResources')) }
|
||||
tasks.named('processResources').configure { dependsOn(tasks.named('bootBuildInfo')) }
|
||||
Reference in New Issue
Block a user