From 80470f0b2677c4f50656c6038e595822f31ce825 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 13 Apr 2022 09:56:21 +0100 Subject: [PATCH] Add native profile to spring-boot-starter-parent Closes gh-30830 Co-authored-by: Stephane Nicoll --- .../spring-boot-dependencies/build.gradle | 7 ++++ .../spring-boot-starter-parent/build.gradle | 33 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index e0be8b1ed87..f3f85a4e8b9 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1036,6 +1036,13 @@ bom { ] } } + library("Native Build Tools Plugin", "0.9.11") { + group("org.graalvm.buildtools") { + plugins = [ + "native-maven-plugin" + ] + } + } library("NekoHTML", "1.9.22") { group("net.sourceforge.nekohtml") { modules = [ diff --git a/spring-boot-project/spring-boot-starters/spring-boot-starter-parent/build.gradle b/spring-boot-project/spring-boot-starters/spring-boot-starter-parent/build.gradle index e13973f7ded..45087f60e0a 100644 --- a/spring-boot-project/spring-boot-starters/spring-boot-starter-parent/build.gradle +++ b/spring-boot-project/spring-boot-starters/spring-boot-starter-parent/build.gradle @@ -217,6 +217,39 @@ publishing.publications.withType(MavenPublication) { } } } + profiles { + profile { + delegate.id("native") + build { + plugins { + plugin { + delegate.groupId('org.springframework.boot') + delegate.artifactId('spring-boot-maven-plugin') + executions { + execution { + delegate.id('aot-generate') + goals { + delegate.goal('aot-generate') + } + } + } + } + plugin { + delegate.groupId('org.graalvm.buildtools') + delegate.artifactId('native-maven-plugin') + executions { + execution { + delegate.id('build-native') + goals { + delegate.goal('build') + } + } + } + } + } + } + } + } } } }