@@ -1,93 +1,52 @@
|
||||
buildscript {
|
||||
ext {
|
||||
springBootVersion = '2.6.7'
|
||||
wrapperVersion = '1.0.29.BUILD-SNAPSHOT'
|
||||
shadowVersion = '5.1.0'
|
||||
}
|
||||
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}")
|
||||
classpath("io.spring.gradle:dependency-management-plugin:1.0.8.RELEASE")
|
||||
}
|
||||
/*
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*/
|
||||
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
apply plugin: 'org.springframework.boot'
|
||||
apply plugin: 'org.springframework.boot.experimental.thin-launcher'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
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" }
|
||||
}
|
||||
mavenLocal()
|
||||
maven {
|
||||
url = uri('https://repo.spring.io/snapshot')
|
||||
}
|
||||
|
||||
ext {
|
||||
springCloudFunctionVersion = "3.2.4"
|
||||
awsLambdaEventsVersion = "3.9.0"
|
||||
awsLambdaCoreVersion = "1.1.0"
|
||||
}
|
||||
ext['reactor.version'] = "3.1.7.RELEASE"
|
||||
maven {
|
||||
url = uri('https://repo.spring.io/milestone')
|
||||
}
|
||||
|
||||
assemble.dependsOn = [shadowJar, thinJar]
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes 'Main-Class': 'example.FunctionConfiguration'
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "org.springframework.cloud:spring-cloud-function-dependencies:${springCloudFunctionVersion}"
|
||||
}
|
||||
maven {
|
||||
url = uri('https://repo.maven.apache.org/maven2/')
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.springframework.cloud:spring-cloud-function-adapter-aws")
|
||||
implementation("org.springframework.cloud:spring-cloud-starter-function-webflux")
|
||||
implementation("org.springframework.boot:spring-boot-configuration-processor")
|
||||
compileOnly("com.amazonaws:aws-lambda-java-events:${awsLambdaEventsVersion}")
|
||||
compileOnly("com.amazonaws:aws-lambda-java-core:${awsLambdaCoreVersion}")
|
||||
testCompile('org.springframework.boot:spring-boot-starter-test')
|
||||
api 'org.springframework.cloud:spring-cloud-function-adapter-aws:4.0.3-SNAPSHOT'
|
||||
api 'com.amazonaws:aws-lambda-java-events:3.9.0'
|
||||
api 'org.springframework.boot:spring-boot-configuration-processor:3.0.5'
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test:3.0.5'
|
||||
compileOnly 'com.amazonaws:aws-lambda-java-core:1.1.0'
|
||||
}
|
||||
|
||||
group = 'io.spring.sample'
|
||||
version = '4.0.0.RELEASE'
|
||||
description = 'function-sample-aws'
|
||||
java.sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
maven(MavenPublication) {
|
||||
from(components.java)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
tasks.withType(Javadoc) {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user