Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

could not find property 'sourceSets' on root project gradle

I'm trying run gradle task. Before running one task I want to see all available tasks gradle tasks. To do it I go to the directory of my project, where is file build.gradle. When I have executed command I got an error

could not find property 'sourceSets' on root project gradle

like image 275
Viktoriia Avatar asked Aug 03 '16 08:08

Viktoriia


1 Answers

Plugins that are applied to build.gradle should be at the very beginning of the build.gradle script. Move:

apply plugin: 'java'
apply plugin: 'findbugs'

to the beginning of the script.

like image 87
Opal Avatar answered Oct 18 '22 17:10

Opal