Created
February 16, 2024 05:26
-
-
Save fzn0x/3b8da1c151ded6dc92dcadaed0866dc4 to your computer and use it in GitHub Desktop.
Gradle Configuration - Maven Configuration Comparison
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id 'org.springframework.boot' version '3.2.2' | |
id 'io.spring.dependency-management' version '1.0.11.RELEASE' | |
} | |
group = 'com.example' | |
version = '0.0.1-SNAPSHOT' | |
sourceCompatibility = '21' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
implementation 'org.springframework.boot:spring-boot-starter-web' | |
testImplementation 'org.springframework.boot:spring-boot-starter-test' | |
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' | |
developmentOnly 'org.springframework.boot:spring-boot-devtools' | |
} | |
bootJar { | |
archiveFileName = "${project.name}.jar" | |
archiveVersion = "" | |
} | |
war { | |
exclude '**/WEB-INF/lib/*gson*.jar' | |
} | |
tasks.withType(org.springframework.boot.gradle.tasks.bundling.BootBuildImage).configureEach { | |
builder = 'jib' | |
} | |
task copyFrontendResources(type: Copy) { | |
from 'src/main/frontend/build/static' | |
into 'build/resources/main/static' | |
} | |
task copyFrontendBuild(type: Copy) { | |
from 'src/main/frontend/build' | |
into 'build/resources/main' | |
} | |
processResources.dependsOn copyFrontendResources, copyFrontendBuild |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pom.xml