Skip to content

Instantly share code, notes, and snippets.

@entzik
Created May 26, 2018 22:22
Show Gist options
  • Select an option

  • Save entzik/a094f95dd59afdff748faa051eb47ff1 to your computer and use it in GitHub Desktop.

Select an option

Save entzik/a094f95dd59afdff748faa051eb47ff1 to your computer and use it in GitHub Desktop.
buildscript {
ext {
springBootVersion = '1.5.11.RELEASE'
wrapperVersion = '1.0.9.RELEASE'
shadowVersion = '2.0.1'
}
repositories {
jcenter()
mavenLocal()
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
classpath "com.github.jengelman.gradle.plugins:shadow:${shadowVersion}"
classpath("org.springframework.boot.experimental:spring-boot-thin-gradle-plugin:${wrapperVersion}")
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'spring-boot'
apply plugin: 'org.springframework.boot.experimental.thin-launcher'
group = 'io.spring.sample'
version = '1.0.0.BUILD-SNAPSHOT'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
ext {
springCloudFunctionVersion = "1.0.0.BUILD-SNAPSHOT"
awsLambdaEventsVersion = "2.1.0"
awsLambdaCoreVersion = "1.2.0"
}
ext['reactor.version'] = "3.1.2.RELEASE"
assemble.dependsOn = [shadowJar, bootRepackage]
jar {
manifest {
attributes 'Start-Class': 'com.thekirschners.iot.home.monitoring.Config'
}
}
ext {
mainClass = 'com.thekirschners.iot.home.monitoring.Application'
}
shadowJar {
classifier = 'aws'
mergeServiceFiles()
mergeGroovyExtensionModules()
manifest {
attributes(
'Main-Class': mainClass,
'Start-Class': mainClass,
'Spring-Boot-Classes': ''
)
}
dependencies {
exclude dependency("org.springframework.cloud:spring-cloud-function-web:$springCloudFunctionVersion")
}
transform(com.github.jengelman.gradle.plugins.shadow.transformers.PropertiesFileTransformer) {
mergeSeparator = ','
mergeStrategy = 'append'
paths = [
'META-INF/spring.factories',
'META-INF/spring.handlers',
'META-INF/spring.provides',
'META-INF/spring.schemas',
'META-INF/spring.tooling',
'META-INF/spring-autoconfigure-metadata.properties',
]
}
}
configurations {
testCompile.extendsFrom(compileOnly)
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile("org.springframework.cloud:spring-cloud-starter-function-web:${springCloudFunctionVersion}")
compile("org.springframework.cloud:spring-cloud-function-adapter-aws:${springCloudFunctionVersion}")
compile("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
compile("org.hibernate:hibernate-core")
compile("org.hibernate:hibernate-entitymanager")
compile('org.liquibase:liquibase-core')
runtime('org.postgresql:postgresql')
compile('com.zaxxer:HikariCP')
compile("com.amazonaws:aws-lambda-java-events:${awsLambdaEventsVersion}")
compile("com.amazonaws:aws-lambda-java-core:${awsLambdaCoreVersion}")
testCompile('org.springframework.boot:spring-boot-starter-test')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment