plugins {
id 'java'
id 'org.springframework.boot'
+ id 'io.spring.dependency-management'
id 'org.jetbrains.kotlin.jvm'
id 'org.jetbrains.kotlin.plugin.jpa' version '1.3.31'
id 'org.jetbrains.kotlin.plugin.spring'
id 'com.palantir.docker'
}
-apply plugin: 'java'
-apply plugin: 'io.spring.dependency-management'
-
payapiVersion = gitVersion()
def details = versionDetails()
bootJar {
mainClassName = payapiStartClass
manifest {
- attributes('Payapi-Version': payapiVersion,'Payapi-Buildtime':new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").format(new Date()))
+ attributes('Payapi-Version': payapiVersion,
+ 'Payapi-Buildtime': new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").format(new Date()))
}
}
baseName = 'payapi'
}
+ext {
+ set('springCloudVersion', "Greenwich.SR2")
+}
+
docker {
def imageVersion
if (details.gitHashFull.startsWith(details.lastTag) || !details.isCleanTag) {
implementation 'org.springframework.boot:spring-boot-starter-cache'
implementation 'org.springframework.kafka:spring-kafka'
implementation 'org.springframework.social:spring-social-web:1.1.6.RELEASE'
+ implementation 'org.springframework.kafka:spring-kafka:2.2.8.RELEASE'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
implementation 'commons-codec:commons-codec:1.12'
implementation 'net.javacrumbs.shedlock:shedlock-spring:2.5.0'
implementation 'net.javacrumbs.shedlock:shedlock-provider-redis-spring:2.5.0'
- implementation 'org.springframework.cloud:spring-cloud-starter-consul-discovery:2.1.2.RELEASE'
+ implementation 'org.springframework.cloud:spring-cloud-starter'
+ implementation 'org.springframework.cloud:spring-cloud-starter-consul-discovery'
+ implementation 'org.springframework.cloud:spring-cloud-starter-netflix-hystrix'
+ implementation 'org.springframework.cloud:spring-cloud-starter-netflix-hystrix-dashboard'
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5'
- implementation 'org.springframework.kafka:spring-kafka:2.2.8.RELEASE'
runtime("org.springframework.boot:spring-boot-devtools")
implementation 'org.postgresql:postgresql:42.2.5'
testImplementation 'org.hamcrest:hamcrest:2.1'
}
+dependencyManagement {
+ imports {
+ mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
+ }
+}
+
compileKotlin {
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict']