2016-06-30 5 views
1

私はgradleを使用してビルドを行っています。 「gradle clean build」を実行すると、すべてのテストケースが実行され、ビルドが成功します。私はgradleクリーンcoberturaを行うときに私のcoberturaレポートを生成します。私は、coberturaのレポートをgradle buildの一部として統合したいと思っています。私はbuild.gradleで以下のオプションを試しましたが、エラーが出ます。Coberturaタスクは、グラデルビルドの一部として含まれていません。

build{ 

dependsOn cobertura 

} 

エラーが発生しました。これについての考えは?

Could not determine the dependencies of task ':build'. 
> Cannot convert n[email protected]528e5e38 to a task. 
The following types/formats are supported: 
- A String or CharSequence task name or path 
- A Task instance 
- A Buildable instance 
- A TaskDependency instance 
- A Closure instance that returns any of the above types 
- A Callable instance that returns any of the above types 
- An Iterable, Collection, Map or array instance that contains any of the above types 

答えて

1

coberturaは拡張子の名前です。 coberturaレポートを作成するタスクはcoberturaReportと呼ばれます。

だから、あなたがしなければならない。

build.dependsOn coberturaReport 
関連する問題