bootRun
with Custom Active Profiles
bootRun
with Custom Active Profilestasks.register("bootRun-UAT-James-LocalDB-JamesStripe") { group = "application" description = "bootRun with James self-localhosted-DB and James Stripe Account" doFirst { tasks.bootRun.configure { args("--spring.profiles.active=uat,james_db_and_james_stripe") } } finalizedBy("bootRun") }
Result:
Known Issue. If we run debugger using a custom task, the process will not be killed by ending the debug process.
Set MainClass for boorJar
Created jar
file
boorJar
Created jar
filetasks.getByName<Jar>("jar") { manifest { attributes["Main-Class"] = "com.billie.payment.PaymentApplicationKt" } }
Skip Running Tests
tasks.named<Test>("test") { enabled = false }
Skip Compiling Test Files, i.e., Skip compileTestKotlin
compileTestKotlin
tasks.named<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>("compileTestKotlin") { enabled = false }
Customize the Jar Name for bootRun
tasks.bootJar { archiveFileName.set("application.jar") }