Spring Initializr build.gradle: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 36: Line 36:
     implementation('org.springframework.boot:spring-boot-starter')
     implementation('org.springframework.boot:spring-boot-starter')
     runtimeOnly('org.springframework.boot:spring-boot-devtools')
     runtimeOnly('org.springframework.boot:spring-boot-devtools')
     compileOnly('org.projectlombok:lombok')
     compileOnly('org.projectlombok:lombok:1.18.4')
     testImplementation('org.springframework.boot:spring-boot-starter-test')
     testImplementation('org.springframework.boot:spring-boot-starter-test')
}
}
</syntaxhighlight>
</syntaxhighlight>

Revision as of 17:57, 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')
    testImplementation('org.springframework.boot:spring-boot-starter-test')
}