Update gradle for AWS sample
This commit is contained in:
@@ -1,52 +1,83 @@
|
|||||||
/*
|
|
||||||
* This file was generated by the Gradle 'init' task.
|
|
||||||
*/
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'java-library'
|
id 'java'
|
||||||
id 'maven-publish'
|
id 'org.springframework.boot' version '3.2.0-M2'
|
||||||
|
id 'io.spring.dependency-management' version '1.1.3'
|
||||||
|
id 'com.github.johnrengelman.shadow' version '8.1.1'
|
||||||
|
id 'maven-publish'
|
||||||
|
id 'org.springframework.boot.experimental.thin-launcher' version "1.0.30.RELEASE"
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
versionMapping {
|
||||||
|
usage('java-api') {
|
||||||
|
fromResolutionOf('runtimeClasspath')
|
||||||
|
}
|
||||||
|
usage('java-runtime') {
|
||||||
|
fromResolutionResult()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
thinPom.mustRunAfter resolveMainClassName, test
|
||||||
|
|
||||||
|
group = 'com.example'
|
||||||
|
version = '0.0.1-SNAPSHOT'
|
||||||
|
|
||||||
|
java {
|
||||||
|
sourceCompatibility = '17'
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenCentral()
|
||||||
maven {
|
maven { url 'https://repo.spring.io/milestone' }
|
||||||
url = uri('https://repo.spring.io/snapshot')
|
|
||||||
}
|
|
||||||
|
|
||||||
maven {
|
|
||||||
url = uri('https://repo.spring.io/milestone')
|
|
||||||
}
|
|
||||||
|
|
||||||
maven {
|
|
||||||
url = uri('https://repo.maven.apache.org/maven2/')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ext {
|
||||||
|
set('springCloudVersion', "2023.0.0-M1")
|
||||||
|
}
|
||||||
|
|
||||||
|
assemble.dependsOn = [shadowJar, thinJar]
|
||||||
|
|
||||||
|
|
||||||
|
import com.github.jengelman.gradle.plugins.shadow.transformers.*
|
||||||
|
|
||||||
|
shadowJar {
|
||||||
|
archiveClassifier = 'aws'
|
||||||
|
dependencies {
|
||||||
|
exclude(
|
||||||
|
dependency("org.springframework.cloud:spring-cloud-function-web:4.1.0-SNAPSHOT"))
|
||||||
|
}
|
||||||
|
// Required for Spring
|
||||||
|
mergeServiceFiles()
|
||||||
|
append 'META-INF/spring.handlers'
|
||||||
|
append 'META-INF/spring.schemas'
|
||||||
|
append 'META-INF/spring.tooling'
|
||||||
|
append 'META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports'
|
||||||
|
append 'META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports'
|
||||||
|
transform(PropertiesFileTransformer) {
|
||||||
|
paths = ['META-INF/spring.factories']
|
||||||
|
mergeStrategy = "append"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api 'org.springframework.cloud:spring-cloud-function-adapter-aws:4.0.3-SNAPSHOT'
|
implementation 'org.springframework.boot:spring-boot-starter'
|
||||||
api 'com.amazonaws:aws-lambda-java-events:3.9.0'
|
implementation 'org.springframework.cloud:spring-cloud-function-context'
|
||||||
api 'org.springframework.boot:spring-boot-configuration-processor:3.0.5'
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||||
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'
|
dependencyManagement {
|
||||||
version = '4.0.0.RELEASE'
|
imports {
|
||||||
description = 'function-sample-aws'
|
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
|
||||||
java.sourceCompatibility = JavaVersion.VERSION_1_8
|
}
|
||||||
|
|
||||||
publishing {
|
|
||||||
publications {
|
|
||||||
maven(MavenPublication) {
|
|
||||||
from(components.java)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.named('test') {
|
||||||
options.encoding = 'UTF-8'
|
useJUnitPlatform()
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType(Javadoc) {
|
|
||||||
options.encoding = 'UTF-8'
|
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -1,6 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -130,10 +130,13 @@ location of your Java installation."
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD=java
|
JAVACMD=java
|
||||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
if ! command -v java >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
|
|||||||
Reference in New Issue
Block a user