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 1434d63c94..e8deba8ec9 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 @@ -135,9 +135,7 @@ publishing.publications.withType(MavenPublication) { plugin { delegate.groupId('org.graalvm.buildtools') delegate.artifactId('native-maven-plugin') - configuration { - delegate.extensions('true') - } + delegate.extensions('true') } plugin { delegate.groupId('io.github.git-commit-id') @@ -233,13 +231,6 @@ publishing.publications.withType(MavenPublication) { profiles { profile { delegate.id("native") - delegate.dependencies { - dependency { - delegate.groupId('org.junit.platform') - delegate.artifactId('junit-platform-launcher') - delegate.scope('test') - } - } build { plugins { plugin { @@ -252,12 +243,7 @@ publishing.publications.withType(MavenPublication) { delegate.goal('process-aot') } } - execution { - delegate.id('process-test-aot') - goals { - delegate.goal('process-test-aot') - } - } } + } } plugin { delegate.groupId('org.graalvm.buildtools') @@ -280,6 +266,50 @@ publishing.publications.withType(MavenPublication) { } } } + profile { + delegate.id("nativeTest") + delegate.dependencies { + dependency { + delegate.groupId('org.junit.platform') + delegate.artifactId('junit-platform-launcher') + delegate.scope('test') + } + } + build { + plugins { + plugin { + delegate.groupId('org.springframework.boot') + delegate.artifactId('spring-boot-maven-plugin') + executions { + execution { + delegate.id('process-test-aot') + goals { + delegate.goal('process-test-aot') + } + } + } + } + plugin { + delegate.groupId('org.graalvm.buildtools') + delegate.artifactId('native-maven-plugin') + configuration { + delegate.classesDirectory('${project.build.outputDirectory}') + metadataRepository { + delegate.enabled('true') + } + } + executions { + execution { + delegate.id('native-test') + goals { + delegate.goal('test') + } + } + } + } + } + } + } } } }