From 55655d69ac697f4bcd8cea3f3105a4df1cb4dd15 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Tue, 5 Sep 2017 11:52:43 +0100 Subject: [PATCH] Update thin plugin in AWS Sample gradle build See also gh-109. So there is a TODO in there to fix the configuration and when the thin launcher 1.0.7 comes out we should update the version as well. But it's working now, and quite similar to the Maven output, except for the thin.properties. Fixes gh-108 --- .../spring-cloud-function-adapter-sample/build.gradle | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spring-cloud-function-adapters/spring-cloud-function-adapter-samples/spring-cloud-function-adapter-sample/build.gradle b/spring-cloud-function-adapters/spring-cloud-function-adapter-samples/spring-cloud-function-adapter-sample/build.gradle index 7599d943e..23f6e9b03 100644 --- a/spring-cloud-function-adapters/spring-cloud-function-adapter-samples/spring-cloud-function-adapter-sample/build.gradle +++ b/spring-cloud-function-adapters/spring-cloud-function-adapter-samples/spring-cloud-function-adapter-sample/build.gradle @@ -1,6 +1,7 @@ buildscript { ext { springBootVersion = '1.5.2.RELEASE' + wrapperVersion = '1.0.7.BUILD-SNAPSHOT' shadowVersion = '2.0.1' } repositories { @@ -12,6 +13,7 @@ buildscript { } 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}") } } @@ -21,6 +23,7 @@ apply plugin: 'maven' apply plugin: 'eclipse' apply plugin: 'com.github.johnrengelman.shadow' apply plugin: 'spring-boot' +apply plugin: 'org.springframework.boot.experimental.thin-launcher' group = 'com.example' version = '0.0.1-SNAPSHOT' @@ -50,6 +53,7 @@ jar { } shadowJar { + classifier = 'aws' dependencies { exclude(dependency("org.springframework.cloud:spring-cloud-function-web:${springCloudFunctionVersion}")) } @@ -59,6 +63,9 @@ configurations { testCompile.extendsFrom(compileOnly) } +// TODO: remove this when pom.xml generator is fixed +jar.dependsOn = [thinProperties] + dependencies { compile("org.springframework.cloud:spring-cloud-function-web:${springCloudFunctionVersion}") compile("org.springframework.cloud:spring-cloud-function-adapter-aws:${springCloudFunctionVersion}")