Spring Initializr build.gradle: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 37: Line 37:
     runtimeOnly('org.springframework.boot:spring-boot-devtools')
     runtimeOnly('org.springframework.boot:spring-boot-devtools')
     compileOnly('org.projectlombok:lombok:1.18.4')
     compileOnly('org.projectlombok:lombok:1.18.4')
    // dependencies required to write unit tests (JUnit) for the project
     testImplementation('org.springframework.boot:spring-boot-starter-test')
     testImplementation('org.springframework.boot:spring-boot-starter-test')
}
}
</syntaxhighlight>
</syntaxhighlight>

Revision as of 22:46, 31 October 2018

Internal

Example

buildscript {
    ext {
        springBootVersion = '2.0.5.RELEASE'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

group = 'playground.spring.springBootWithInitializrFromIntellij'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8

repositories {
    mavenCentral()
}


dependencies {
    implementation('org.springframework.boot:spring-boot-starter')
    runtimeOnly('org.springframework.boot:spring-boot-devtools')
    compileOnly('org.projectlombok:lombok:1.18.4')

    // dependencies required to write unit tests (JUnit) for the project
    testImplementation('org.springframework.boot:spring-boot-starter-test')
}