mirror of
https://gitee.com/dcren/initializr.git
synced 2026-09-19 22:37:40 +08:00
46 lines
1.2 KiB
Groovy
46 lines
1.2 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}'
|
|
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" }
|
|
<% } %>
|
|
}
|
|
|
|
dependencies {<% styles.each { %>
|
|
compile("org.springframework.boot:spring-boot-starter${it}")<% } %>
|
|
<% if (language=='groovy') { %>compile("org.codehaus.groovy:groovy")<% } %>
|
|
testCompile("org.springframework.boot:spring-boot-starter-test")
|
|
}
|
|
|
|
task wrapper(type: Wrapper) {
|
|
gradleVersion = '1.12'
|
|
}
|