Chapter 04: Developing a Spring Boot Application: Difference between revisions

Line 183: Line 183:
Before diving into Gradle, let’s understand why we use build tools:
Before diving into Gradle, let’s understand why we use build tools:


'''What Build Tools Do:''' - Dependency management - Compilation and packaging - Running tests - Code quality checks - Deployment preparation
'''What Build Tools Do:'''  
* Dependency management  
* Compilation and packaging  
* Running tests  
* Code quality checks  
* Deployment preparation


'''Popular Build Tools for JVM:''' - '''Gradle''': Modern, flexible, uses Groovy or Kotlin DSL - '''Maven''': Mature, XML-based, extensive plugin ecosystem - '''Bazel''': Google’s build tool, excellent for monorepos - '''SBT''': Scala-focused but works with Kotlin
'''Popular Build Tools for JVM:'''  
* '''Gradle''': Modern, flexible, uses Groovy or Kotlin DSL  
* '''Maven''': Mature, XML-based, extensive plugin ecosystem  
* '''Bazel''': Google’s build tool, excellent for monorepos  
* '''SBT''': Scala-focused but works with Kotlin


We use Gradle with Kotlin DSL because: 1. Type-safe build scripts 2. IDE auto-completion 3. Kotlin syntax consistency 4. Better refactoring support
We use Gradle with Kotlin DSL because:  
# Type-safe build scripts  
# IDE auto-completion  
# Kotlin syntax consistency  
# Better refactoring support


<span id="gradle"></span>
<span id="gradle"></span>
=== 4.2.2 Gradle ===
=== 4.2.2 Gradle ===