init 2
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
[versions]
|
||||
mapstruct = "1.6.3"
|
||||
archunit-junit5 = "1.4.2"
|
||||
checkstyle = "13.4.2"
|
||||
jacoco = "0.8.14"
|
||||
# jhipster-needle-gradle-dependency-catalog-version - JHipster will add additional versions for convention plugins here
|
||||
|
||||
[libraries]
|
||||
jhipster-framework = { module = "tech.jhipster:jhipster-framework", version = "9.1.0" }
|
||||
springdoc-openapi-starter-webmvc-api = { module = "org.springdoc:springdoc-openapi-starter-webmvc-api", version = "3.0.3" }
|
||||
archunit-junit5-api = { module = "com.tngtech.archunit:archunit-junit5-api", version.ref = "archunit-junit5" }
|
||||
archunit-junit5-engine = { module = "com.tngtech.archunit:archunit-junit5-engine", version.ref = "archunit-junit5" }
|
||||
mapstruct = { module = "org.mapstruct:mapstruct", version.ref = "mapstruct" }
|
||||
mapstruct-processor = { module = "org.mapstruct:mapstruct-processor", version.ref = "mapstruct" }
|
||||
# jhipster-needle-gradle-dependency-catalog-libraries - JHipster will add additional libraries versions
|
||||
|
||||
[plugins]
|
||||
gradle-git-properties = { id = "com.gorylenko.gradle-git-properties", version = "3.0.3" }
|
||||
spring-boot = { id = "org.springframework.boot", version = "4.0.6" }
|
||||
# jhipster-needle-gradle-dependency-catalog-plugins - JHipster will add additional plugins versions
|
||||
@@ -0,0 +1,53 @@
|
||||
configurations {
|
||||
liquibaseRuntime.extendsFrom sourceSets.main.compileClasspath
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.liquibase:liquibase-core"
|
||||
liquibaseRuntime "org.liquibase:liquibase-core"
|
||||
// Dependency required to parse options. Refer to https://github.com/liquibase/liquibase-gradle-plugin/tree/Release_2.2.0#news.
|
||||
liquibaseRuntime "info.picocli:picocli:4.7.7"
|
||||
if (project.hasProperty("prod") || project.hasProperty("gae")) {
|
||||
liquibaseRuntime "com.oracle.database.jdbc:ojdbc8"
|
||||
}
|
||||
liquibaseRuntime "org.liquibase.ext:liquibase-hibernate6:${liquibaseVersion}"
|
||||
// jhipster-needle-gradle-dependency - JHipster will add additional dependencies here
|
||||
}
|
||||
|
||||
project.ext.diffChangelogFile = "src/main/resources/config/liquibase/changelog/" + new Date().format("yyyyMMddHHmmss") + "_changelog.xml"
|
||||
if (!project.hasProperty("runList")) {
|
||||
project.ext.runList = "main"
|
||||
}
|
||||
|
||||
liquibase {
|
||||
activities {
|
||||
main {
|
||||
driver "org.h2.Driver"
|
||||
url "jdbc:h2:file:./build/h2db/db/sisvietnamvn"
|
||||
username "sisvietnamvn"
|
||||
changelogFile "src/main/resources/config/liquibase/master.xml"
|
||||
logLevel "debug"
|
||||
classpath "src/main/resources/"
|
||||
}
|
||||
diffLog {
|
||||
driver "org.h2.Driver"
|
||||
url "jdbc:h2:file:./build/h2db/db/sisvietnamvn"
|
||||
username "sisvietnamvn"
|
||||
changelogFile project.ext.diffChangelogFile
|
||||
referenceUrl "hibernate:spring:com.sisvietnamvn.web.domain?dialect=org.hibernate.dialect.H2Dialect&hibernate.physical_naming_strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.hibernate.SpringImplicitNamingStrategy"
|
||||
logLevel "debug"
|
||||
classpath layout.buildDirectory.dir("classes/java/main").get().asFile.absolutePath
|
||||
}
|
||||
}
|
||||
|
||||
runList = project.ext.runList
|
||||
}
|
||||
|
||||
tasks.named('liquibaseDiff').configure { dependsOn(tasks.named('compileJava')) }
|
||||
tasks.named('liquibaseDiffChangelog').configure { dependsOn(tasks.named('compileJava')) }
|
||||
|
||||
ext {
|
||||
if (project.hasProperty("no-liquibase")) {
|
||||
springProfiles += ",no-liquibase"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
dependencies {
|
||||
developmentOnly "org.springframework.boot:spring-boot-devtools"
|
||||
implementation "com.h2database:h2"
|
||||
// jhipster-needle-gradle-dependency - JHipster will add additional dependencies here
|
||||
}
|
||||
|
||||
springBoot {
|
||||
buildInfo {
|
||||
excludes = ['time']
|
||||
}
|
||||
}
|
||||
|
||||
bootRun {
|
||||
args = ["--spring.profiles.active=${springProfiles}"]
|
||||
}
|
||||
|
||||
|
||||
processResources {
|
||||
inputs.property('version', version)
|
||||
inputs.property('springProfiles', springProfiles)
|
||||
filesMatching("**/application.yml") {
|
||||
filter {
|
||||
it.replace("@project.version@", version)
|
||||
}
|
||||
filter {
|
||||
it.replace("@spring.profiles.active@", springProfiles)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def integrationTest = tasks.register('integrationTest', Test) {
|
||||
maxHeapSize = "1G"
|
||||
useJUnitPlatform()
|
||||
description = "Execute integration tests."
|
||||
group = "verification"
|
||||
include "**/*IT*", "**/*IntTest*"
|
||||
testLogging {
|
||||
events = ['FAILED', 'SKIPPED']
|
||||
exceptionFormat = "full"
|
||||
}
|
||||
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
|
||||
dependsOn(tasks.named('test'))
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
dependencies {
|
||||
testImplementation "org.testcontainers:testcontainers-oracle-xe"
|
||||
// jhipster-needle-gradle-dependency - JHipster will add additional dependencies here
|
||||
}
|
||||
|
||||
ext {
|
||||
if (project.hasProperty("api-docs")) {
|
||||
springProfiles += ",api-docs"
|
||||
}
|
||||
}
|
||||
|
||||
springBoot {
|
||||
buildInfo()
|
||||
}
|
||||
|
||||
bootRun {
|
||||
args = ["--spring.profiles.active=${springProfiles}"]
|
||||
}
|
||||
|
||||
|
||||
processResources {
|
||||
inputs.property('version', version)
|
||||
inputs.property('springProfiles', springProfiles)
|
||||
filesMatching("**/application.yml") {
|
||||
filter {
|
||||
it.replace("@project.version@", version)
|
||||
}
|
||||
filter {
|
||||
it.replace("@spring.profiles.active@", springProfiles)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def integrationTest = tasks.register('integrationTest', Test) {
|
||||
maxHeapSize = "1G"
|
||||
useJUnitPlatform()
|
||||
description = "Execute integration tests."
|
||||
group = "verification"
|
||||
include "**/*IT*", "**/*IntTest*"
|
||||
testLogging {
|
||||
events = ['FAILED', 'SKIPPED']
|
||||
exceptionFormat = "full"
|
||||
}
|
||||
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
|
||||
dependsOn(tasks.named('test'))
|
||||
}
|
||||
|
||||
@@ -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')) }
|
||||
@@ -0,0 +1,12 @@
|
||||
apply plugin: "war"
|
||||
|
||||
bootWar {
|
||||
mainClass = "com.sisvietnamvn.web.SisvietnamvnApp"
|
||||
includes = ["WEB-INF/**", "META-INF/**"]
|
||||
}
|
||||
|
||||
war {
|
||||
enabled = true
|
||||
archiveExtension = "war.original"
|
||||
includes = ["WEB-INF/**", "META-INF/**"]
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -0,0 +1,4 @@
|
||||
dependencies {
|
||||
implementation "io.micrometer:micrometer-tracing-bridge-brave"
|
||||
implementation "io.zipkin.reporter2:zipkin-reporter-brave"
|
||||
}
|
||||
Reference in New Issue
Block a user