私はgradleのCreateStartScriptsタスクを使用して、アプリケーションを起動するスクリプトを生成します。GradleのCreateStartScriptsタスクを使用するには
私は次のようにそれを使用:問題はルートプロジェクト「大港」を評価起こっ
:
apply plugin: 'java'
mainClass = 'UIMain';
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
}
task copyResources(type: Copy) {
from 'config.ini'
into 'build/dist'
}
task copyLibs(type: Copy) {
from configurations.default
from configurations.default.allArtifacts.files
into 'build/dist/libs'
}
task generateScript(type: CreateStartScripts) {
applicationName = "Dagang"
mainClassName = mainClass
outputDir = "build/dist/"
classpath = ""
}
task distribute(dependsOn: [
build,
copyLibs,
copyResources,
generateScript
]) <<{
description = 'Copies all the project libs to the distribution place.'
}
私はビルドを実行したときしかし、それは次のようにエラーに実行されます。 [org.gradle.BuildExceptionReporter]原因:ルートプロジェクト 'dagang'でプロパティ 'CreateStartScripts'を見つけることができませんでした。
誰も私に光を当てることはできますか?ありがとう。
これは私が必要とするものです。ありがとう。 – Wudong