Files
initializr/templates/starter-build.gradle
Justin Wayne f75833c488 correcting typo
Double ' removed.
2014-06-12 10:29:35 -04:00

59 lines
1.7 KiB
Groovy

buildscript {
ext {
springBootVersion = '${bootVersion}'
}
repositories {
mavenCentral()<% if (!bootVersion.contains("RELEASE")) { %>
maven { url "http://repo.spring.io/snapshot" }
maven { url "http://repo.spring.io/milestone" }
<% } %>
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:\${springBootVersion}")
}
}
apply plugin: '${language}'<% if (packaging=='war') { %>
apply plugin: 'eclipse-wtp'<% } else { %>
apply plugin: 'eclipse'<% } %>
apply plugin: 'idea'
apply plugin: 'spring-boot' <% if (packaging=='war') { %>
apply plugin: 'war'
<% } %>
<% if (packaging=='war') { %>war<% } else { %>jar<% } %> {
baseName = '${artifactId}'
version = '${version}'
}
sourceCompatibility = ${javaVersion}
targetCompatibility = ${javaVersion}
repositories {
mavenCentral()<% if (!bootVersion.contains("RELEASE")) { %>
maven { url "http://repo.spring.io/snapshot" }
maven { url "http://repo.spring.io/milestone" }
<% } %>
}
<% if (packaging=='war') { %>configurations {
providedRuntime
}
<% } %>
dependencies {<% styles.each { %>
compile("org.springframework.boot:spring-boot-starter${it}")<% } %><% if (language=='groovy') { %>
compile("org.codehaus.groovy:groovy")<% } %><% if (packaging=='war') { %>
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")<% } %>
testCompile("org.springframework.boot:spring-boot-starter-test")
}
eclipse {
classpath {
containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER')
containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-${javaVersion}'
}
}
task wrapper(type: Wrapper) {
gradleVersion = '1.12'
}