[JAVA] Add scripts to distributions created with gradle

https://www.mkyong.com/gradle/gradle-multiple-start-script-examples/ http://gradle.monochromeroad.com/docs/userguide/application_plugin.html (45.4)

For reference above

build.gradle


task createExtScript(type: CreateStartScripts) {
    mainClassName = "Main"
    classpath = startScripts.classpath
    classpath += files('/tmp/hoge')
    outputDir = startScripts.outputDir
    applicationName = 'extra_shell'
    defaultJvmOpts = ["-Xms1024m", "-Xmx2048m"]
}

applicationDistribution.into("bin") {
    duplicatesStrategy= DuplicatesStrategy.EXCLUDE
    from(createExtScript)
    fileMode = 0755
}

The following properties can be set for the task

Recommended Posts

Add scripts to distributions created with gradle
Add foreign key to column with migrate
Add spring boot and gradle to eclipse
Add class only to specific elements with V-for
Downgrade an existing app created with rails 5.2.4 to 5.1.6
Add a project in any folder with Gradle
[Java] Article to add validation with Spring Boot 2.3.1.
I wanted to gradle spring boot with multi-project
Try to display hello world with spring + gradle
Add packages to your project with Swift PM
How to build docker environment with Gradle for intelliJ
How to install Gradle and Kotlin with SDKMAN (Mac)
Add files to jar files
Use ProGuard with Gradle
Integration Test with Gradle
Install Gradle with ubuntu16.04
Use jlink with gradle
Add a local Swift Package to your project with Swift PM
I made a plugin to execute jextract with Gradle task
Update to the latest version without specifying the version with gradle wrapper