/
build.gradle
85 lines (75 loc) · 2.32 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
buildscript {
ext {
springBootVersion = '2.0.3.RELEASE'
wrapperVersion = '1.0.13.BUILD-SNAPSHOT'
shadowVersion = '2.0.1'
}
repositories {
mavenLocal()
jcenter()
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: 'eclipse'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.springframework.boot'
apply plugin: 'org.springframework.boot.experimental.thin-launcher'
group = 'io.spring.sample'
version = '2.0.0.RELEASE'
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 = "2.0.0.BUILD-SNAPSHOT"
awsLambdaEventsVersion = "1.2.1"
awsLambdaCoreVersion = "1.1.0"
}
ext['reactor.version'] = "3.1.7.RELEASE"
assemble.dependsOn = [shadowJar, thinJar]
jar {
manifest {
attributes 'Main-Class': 'example.Config'
}
}
import com.github.jengelman.gradle.plugins.shadow.transformers.*
shadowJar {
classifier = 'aws'
dependencies {
exclude(
dependency("org.springframework.cloud:spring-cloud-function-web:${springCloudFunctionVersion}"))
}
// Required for Spring
mergeServiceFiles()
append 'META-INF/spring.handlers'
append 'META-INF/spring.schemas'
append 'META-INF/spring.tooling'
transform(PropertiesFileTransformer) {
paths = ['META-INF/spring.factories']
mergeStrategy = "append"
}
}
configurations {
testCompile.extendsFrom(compileOnly)
}
dependencies {
compile("org.springframework.cloud:spring-cloud-starter-function-web:${springCloudFunctionVersion}")
compile("org.springframework.cloud:spring-cloud-function-adapter-aws:${springCloudFunctionVersion}")
compileOnly("com.amazonaws:aws-lambda-java-events:${awsLambdaEventsVersion}")
compileOnly("com.amazonaws:aws-lambda-java-core:${awsLambdaCoreVersion}")
testCompile('org.springframework.boot:spring-boot-starter-test')
}