Skip to content

Commit 09eba7d

Browse files
committed
Fix gradlew file for AWS deployment sample
1 parent 550f8a4 commit 09eba7d

File tree

2 files changed

+32
-24
lines changed

2 files changed

+32
-24
lines changed

spring-cloud-function-samples/function-sample-aws/build.gradle

+25-24
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,25 @@ plugins {
77
id 'org.springframework.boot.experimental.thin-launcher' version "1.0.30.RELEASE"
88
}
99

10+
group = 'com.example'
11+
version = '0.0.1-SNAPSHOT'
12+
13+
java {
14+
sourceCompatibility = '17'
15+
}
16+
17+
repositories {
18+
mavenCentral()
19+
mavenLocal()
20+
maven { url 'https://repo.spring.io/milestone' }
21+
}
22+
23+
ext {
24+
set('springCloudVersion', "2023.0.0-M1")
25+
}
26+
27+
assemble.dependsOn = [thinJar, shadowJar]
28+
1029
publishing {
1130
publications {
1231
maven(MavenPublication) {
@@ -24,35 +43,17 @@ publishing {
2443
}
2544

2645
thinPom.mustRunAfter resolveMainClassName, test
27-
28-
group = 'com.example'
29-
version = '0.0.1-SNAPSHOT'
30-
31-
java {
32-
sourceCompatibility = '17'
33-
}
34-
35-
repositories {
36-
mavenCentral()
37-
maven { url 'https://repo.spring.io/milestone' }
38-
}
39-
40-
ext {
41-
set('springCloudVersion', "2023.0.0-M1")
42-
}
43-
44-
assemble.dependsOn = [shadowJar, thinJar]
46+
shadowJar.mustRunAfter thinJar
4547

4648

4749
import com.github.jengelman.gradle.plugins.shadow.transformers.*
4850

4951
shadowJar {
5052
archiveClassifier = 'aws'
51-
dependencies {
52-
exclude(
53-
dependency("org.springframework.cloud:spring-cloud-function-web:4.1.0-SNAPSHOT"))
54-
}
55-
// Required for Spring
53+
manifest {
54+
inheritFrom(project.tasks.thinJar.manifest)
55+
}
56+
// Required for Spring
5657
mergeServiceFiles()
5758
append 'META-INF/spring.handlers'
5859
append 'META-INF/spring.schemas'
@@ -65,9 +66,9 @@ shadowJar {
6566
}
6667
}
6768

68-
6969
dependencies {
7070
implementation 'org.springframework.boot:spring-boot-starter'
71+
implementation 'org.springframework.cloud:spring-cloud-function-adapter-aws'
7172
implementation 'org.springframework.cloud:spring-cloud-function-context'
7273
testImplementation 'org.springframework.boot:spring-boot-starter-test'
7374
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
pluginManagement {
2+
repositories {
3+
maven { url 'https://repo.spring.io/milestone' }
4+
gradlePluginPortal()
5+
}
6+
}
7+
rootProject.name = 'demo-function'

0 commit comments

Comments
 (0)