init 2
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
plugins {
|
||||
id 'groovy-gradle-plugin'
|
||||
}
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation libs.jib.plugin
|
||||
implementation libs.modernizer.plugin
|
||||
implementation libs.nohttp.plugin
|
||||
implementation libs.sonarqube.plugin
|
||||
implementation libs.spotless.plugin
|
||||
// jhipster-needle-gradle-dependency - JHipster will add additional dependencies for convention plugins here
|
||||
// jhipster-needle-gradle-build-src-dependency - Deprecated: JHipster will add additional dependencies for convention plugins here
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
[versions]
|
||||
# jhipster-needle-gradle-dependency-catalog-version - JHipster will add additional versions for convention plugins here
|
||||
# jhipster-needle-gradle-build-src-dependency-catalog-version - Deprecated: JHipster will add additional versions for convention plugins here
|
||||
|
||||
[libraries]
|
||||
jib-plugin = { module = "com.google.cloud.tools:jib-gradle-plugin", version = "3.5.3" }
|
||||
modernizer-plugin = { module = "com.github.andygoossens:gradle-modernizer-plugin", version = "1.13.0" }
|
||||
nohttp-plugin = { module = "io.spring.nohttp:nohttp-gradle", version = "0.0.11" }
|
||||
sonarqube-plugin = { module = "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin", version = "7.3.0.8198" }
|
||||
spotless-plugin = { module = "com.diffplug.spotless:spotless-plugin-gradle", version = "8.5.1" }
|
||||
# jhipster-needle-gradle-dependency-catalog-libraries - JHipster will add additional libraries versions
|
||||
|
||||
[plugins]
|
||||
# jhipster-needle-gradle-dependency-catalog-plugins - JHipster will add additional plugins versions
|
||||
@@ -0,0 +1,64 @@
|
||||
plugins {
|
||||
id "jacoco"
|
||||
id "org.sonarqube"
|
||||
id "com.diffplug.spotless"
|
||||
id "com.github.andygoossens.gradle-modernizer-plugin"
|
||||
id "io.spring.nohttp"
|
||||
}
|
||||
|
||||
jacoco {
|
||||
toolVersion = "${libs.versions.jacoco.get()}"
|
||||
}
|
||||
|
||||
jacocoTestReport {
|
||||
executionData(tasks.withType(Test))
|
||||
classDirectories.from = files(sourceSets.main.output.classesDirs)
|
||||
sourceDirectories.from = files(sourceSets.main.java.srcDirs)
|
||||
|
||||
reports {
|
||||
xml.required = true
|
||||
}
|
||||
}
|
||||
|
||||
file("sonar-project.properties").withReader {
|
||||
Properties sonarProperties = new Properties()
|
||||
sonarProperties.load(it)
|
||||
|
||||
sonarProperties.each { key, value ->
|
||||
sonarqube {
|
||||
properties {
|
||||
property(key, value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
spotless {
|
||||
java {
|
||||
target 'src/*/java/**/*.java'
|
||||
// removeUnusedImports()
|
||||
}
|
||||
}
|
||||
|
||||
modernizer {
|
||||
failOnViolations = true
|
||||
includeTestClasses = true
|
||||
}
|
||||
|
||||
checkstyle {
|
||||
toolVersion = "${libs.versions.checkstyle.get()}"
|
||||
configFile = file("checkstyle.xml")
|
||||
ignoreFailures = true
|
||||
checkstyleTest.enabled = false
|
||||
}
|
||||
|
||||
nohttp {
|
||||
source.include("build.gradle", "README.md")
|
||||
}
|
||||
|
||||
// workaround for https://github.com/checkstyle/checkstyle/issues/14123
|
||||
configurations.checkstyle {
|
||||
resolutionStrategy.capabilitiesResolution.withCapability("com.google.collections:google-collections") {
|
||||
select("com.google.guava:guava:0")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
plugins {
|
||||
id "com.google.cloud.tools.jib"
|
||||
}
|
||||
|
||||
jib {
|
||||
configurationName = "productionRuntimeClasspath"
|
||||
from {
|
||||
image = "eclipse-temurin:25-jre-noble"
|
||||
platforms {
|
||||
platform {
|
||||
architecture = "${findProperty('jibArchitecture') ?: 'amd64'}"
|
||||
os = "linux"
|
||||
}
|
||||
}
|
||||
}
|
||||
to {
|
||||
image = "sisvietnamvn:latest"
|
||||
}
|
||||
container {
|
||||
entrypoint = ["bash", "-c", "/entrypoint.sh"]
|
||||
ports = ["8080"]
|
||||
environment = [
|
||||
SPRING_OUTPUT_ANSI_ENABLED: "ALWAYS",
|
||||
JHIPSTER_SLEEP: "0"
|
||||
]
|
||||
creationTime = "USE_CURRENT_TIMESTAMP"
|
||||
user = 1000
|
||||
}
|
||||
extraDirectories {
|
||||
paths = file("src/main/docker/jib")
|
||||
permissions = ["/entrypoint.sh": "755"]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user