Make samples native build fully optional
- Add springShellSampleNative project property - Implement generic samples build logic in buildSrc - Fixes #873
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
plugins {
|
||||
id 'org.springframework.shell.sample'
|
||||
id 'org.springframework.boot'
|
||||
id 'org.graalvm.buildtools.native'
|
||||
}
|
||||
|
||||
description = 'Spring Shell Sample E2E'
|
||||
@@ -13,29 +11,3 @@ dependencies {
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
testImplementation 'org.awaitility:awaitility'
|
||||
}
|
||||
|
||||
springBoot {
|
||||
buildInfo {
|
||||
excludes = ['time']
|
||||
}
|
||||
}
|
||||
|
||||
if (project.hasProperty('springShellSampleE2E') && springShellSampleE2E.toBoolean()) {
|
||||
bootJar {
|
||||
archiveFileName = "${archiveBaseName.get()}.${archiveExtension.get()}"
|
||||
}
|
||||
}
|
||||
|
||||
graalvmNative {
|
||||
metadataRepository {
|
||||
enabled = true
|
||||
}
|
||||
binaries {
|
||||
main {
|
||||
if (project.hasProperty('springShellSampleMusl') && springShellSampleMusl.toBoolean()) {
|
||||
buildArgs.add('--static')
|
||||
buildArgs.add('--libc=musl')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user