GradleBuild task issue, only shows the gradle help message


(Fab) #1

Hi everyone,

I’m new to Gradle, currently trying to get rid of an old ant build script, and I’m trying to get dependencies between projects to work automatically.

So I have two projects, one named async and the other core. async needs the core jar file to compile so in the async build.gradle file I tried

dependencies {
	compile files('../core/build/libs/core.jar') {
		builtBy 'buildCore'
	}	
}

and I created a buildCore task as follows

 task buildCore(type : GradleBuild) {
	buildFile='../core/build.gradle'
	tasks['build']
}

However the dependency is not build and when I run the task buildCore alone, I just get the gradle help message

:buildCore
:core:help

Welcome to Gradle 2.14.

To run a build, run gradle <task> ...

To see a list of available tasks, run gradle tasks

To see a list of command-line options, run gradle --help

To see more detail about a task, run gradle help --task <task>

BUILD SUCCESSFUL

not sure to understand what I’m doing wrong, any ideas ?

thanks for your help.


(Stefan Oehme) #2

There’s a typo, it should be tasks = ['build']


(Fab) #3

thank you it works now !