buildscript {
	ext {
		{{#buildPropertiesGradle}}
		{{key}} = '{{value}}'
		{{/buildPropertiesGradle}}
	}
	repositories {
		mavenCentral()
		{{^isRelease}}
		maven { url "https://repo.spring.io/snapshot" }
		maven { url "https://repo.spring.io/milestone" }
		{{/isRelease}}
	}
	dependencies {
		classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
		{{^bootOneThreeAvailable}}
		classpath('io.spring.gradle:dependency-management-plugin:{{dependencyManagementPluginVersion}}')
		{{/bootOneThreeAvailable}}
		{{#kotlin}}
		classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
		classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
		{{/kotlin}}
	}
}

apply plugin: '{{language}}'
{{#kotlin}}
apply plugin: 'kotlin-spring'
{{/kotlin}}
{{#war}}
apply plugin: 'eclipse-wtp'
{{/war}}
{{^war}}
apply plugin: 'eclipse'
{{/war}}
apply plugin: '{{springBootPluginName}}'
{{^bootOneThreeAvailable}}
apply plugin: 'io.spring.dependency-management'
{{/bootOneThreeAvailable}}
{{#bootTwoZeroAvailable}}
apply plugin: 'io.spring.dependency-management'
{{/bootTwoZeroAvailable}}
{{#war}}
apply plugin: 'war'
{{/war}}

version = '{{version}}'
sourceCompatibility = {{javaVersion}}{{#kotlin}}{{#isJava8}}
compileKotlin {
	kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
	kotlinOptions.jvmTarget = "1.8"
}{{/isJava8}}{{/kotlin}}

repositories {
	mavenCentral()
	{{#repositoryValues}}
	maven { url "{{value.url}}" }
	{{/repositoryValues}}
}

{{#providedDependencies}}
configurations {
	providedRuntime
}
{{/providedDependencies}}

{{^buildPropertiesVersions.empty}}
ext {
	{{#buildPropertiesVersions}}
	{{key}} = '{{value}}'
{{/buildPropertiesVersions}}
}

{{/buildPropertiesVersions.empty}}
dependencies {
	{{#compileDependencies}}
	compile('{{groupId}}:{{artifactId}}{{#version}}:{{version}}{{/version}}{{#type}}@{{type}}{{/type}}')
	{{/compileDependencies}}
	{{#groovy}}
	compile('org.codehaus.groovy:groovy')
	{{/groovy}}
	{{#kotlin}}
	{{#isJava6}}
	compile("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
	{{/isJava6}}
	{{#isJava7}}
	compile("org.jetbrains.kotlin:kotlin-stdlib-jre7:${kotlinVersion}")
	{{/isJava7}}
	{{#isJava8}}
	compile("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
	{{/isJava8}}
	compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
	{{/kotlin}}
	{{#runtimeDependencies}}
	runtime('{{groupId}}:{{artifactId}}{{#version}}:{{version}}{{/version}}{{#type}}@{{type}}{{/type}}')
	{{/runtimeDependencies}}
	{{#compileOnlyDependencies}}
	compileOnly('{{groupId}}:{{artifactId}}{{#version}}:{{version}}{{/version}}{{#type}}@{{type}}{{/type}}')
	{{/compileOnlyDependencies}}
	{{#providedDependencies}}
	providedRuntime('{{groupId}}:{{artifactId}}{{#version}}:{{version}}{{/version}}{{#type}}@{{type}}{{/type}}')
	{{/providedDependencies}}
	testCompile('org.springframework.boot:spring-boot-starter-test')
	{{#testDependencies}}
	testCompile('{{groupId}}:{{artifactId}}{{#version}}:{{version}}{{/version}}{{#type}}@{{type}}{{/type}}')
	{{/testDependencies}}
}
{{#hasBoms}}

dependencyManagement {
	imports {
		{{#reversedBoms}}
		mavenBom "{{groupId}}:{{artifactId}}:{{versionToken}}"
		{{/reversedBoms}}
	}
}
{{/hasBoms}}