LoginSignup
0
0

More than 5 years have passed since last update.

gradle で作成されるディストリビューションにスクリプトを追加する

Last updated at Posted at 2017-10-22

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

上記参考に

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
}

タスクに以下プロパティを設定可能

  • mainClassName
  • classpath
  • outputDir
  • applicationName
  • defaultJvmOpts
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0