Merge pull request #1257 from georgeharley/update-sample-gradle-file
Update Gradle file in function-sample-aws to match reference docs
This commit is contained in:
@@ -1,19 +1,18 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'org.springframework.cloud.function.aws-lambda.packaging' version '1.0.0'
|
id 'java'
|
||||||
//id 'java'
|
id 'org.springframework.boot' version '3.4.4'
|
||||||
id 'org.springframework.boot' version '3.4.0'
|
id 'io.spring.dependency-management' version '1.1.7'
|
||||||
//id 'io.spring.dependency-management' version '1.1.3'
|
id 'com.github.johnrengelman.shadow' version '8.1.1'
|
||||||
//id 'com.github.johnrengelman.shadow' version '8.1.1'
|
id 'maven-publish'
|
||||||
//id 'maven-publish'
|
id 'org.springframework.boot.experimental.thin-launcher' version "1.0.31.RELEASE"
|
||||||
// id 'org.springframework.boot.experimental.thin-launcher' version "1.0.31.RELEASE"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
group = 'com.example'
|
group = 'com.example'
|
||||||
version = '0.0.1-SNAPSHOT'
|
version = '0.0.1-SNAPSHOT'
|
||||||
|
|
||||||
//java {
|
java {
|
||||||
// sourceCompatibility = '17'
|
sourceCompatibility = '17'
|
||||||
//}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@@ -22,53 +21,53 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
set('springCloudVersion', "2024.0.1-SNAPSHOT")
|
set('springCloudVersion', "2024.0.1")
|
||||||
}
|
}
|
||||||
|
|
||||||
//assemble.dependsOn = [thinJar, shadowJar]
|
assemble.dependsOn = [thinJar, shadowJar]
|
||||||
|
|
||||||
//publishing {
|
publishing {
|
||||||
// publications {
|
publications {
|
||||||
// maven(MavenPublication) {
|
maven(MavenPublication) {
|
||||||
// from components.java
|
from components.java
|
||||||
// versionMapping {
|
versionMapping {
|
||||||
// usage('java-api') {
|
usage('java-api') {
|
||||||
// fromResolutionOf('runtimeClasspath')
|
fromResolutionOf('runtimeClasspath')
|
||||||
// }
|
}
|
||||||
// usage('java-runtime') {
|
usage('java-runtime') {
|
||||||
// fromResolutionResult()
|
fromResolutionResult()
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
//shadowJar.mustRunAfter thinJar
|
shadowJar.mustRunAfter thinJar
|
||||||
|
|
||||||
|
import com.github.jengelman.gradle.plugins.shadow.transformers.*
|
||||||
|
|
||||||
//import com.github.jengelman.gradle.plugins.shadow.transformers.*
|
shadowJar {
|
||||||
|
archiveClassifier = 'aws'
|
||||||
//shadowJar {
|
manifest {
|
||||||
//archiveClassifier = 'aws'
|
inheritFrom(project.tasks.thinJar.manifest)
|
||||||
//manifest {
|
}
|
||||||
// inheritFrom(project.tasks.thinJar.manifest)
|
// Required for Spring
|
||||||
//}
|
mergeServiceFiles()
|
||||||
// Required for Spring
|
append 'META-INF/spring.handlers'
|
||||||
//mergeServiceFiles()
|
append 'META-INF/spring.schemas'
|
||||||
//append 'META-INF/spring.handlers'
|
append 'META-INF/spring.tooling'
|
||||||
//append 'META-INF/spring.schemas'
|
append 'META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports'
|
||||||
//append 'META-INF/spring.tooling'
|
append 'META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports'
|
||||||
//append 'META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports'
|
transform(PropertiesFileTransformer) {
|
||||||
//append 'META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports'
|
paths = ['META-INF/spring.factories']
|
||||||
//transform(PropertiesFileTransformer) {
|
mergeStrategy = "append"
|
||||||
// paths = ['META-INF/spring.factories']
|
}
|
||||||
// mergeStrategy = "append"
|
}
|
||||||
//}
|
|
||||||
//}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.springframework.boot:spring-boot-starter'
|
implementation 'org.springframework.boot:spring-boot-starter'
|
||||||
implementation 'org.springframework.cloud:spring-cloud-function-adapter-aws'
|
implementation 'org.springframework.cloud:spring-cloud-function-adapter-aws'
|
||||||
|
implementation 'org.springframework.cloud:spring-cloud-function-context'
|
||||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user