gradle custom task with package name -


i see when create custom task type in gradle, different package name 'org.gradle', cannot directly declare task in build file type name. need give qualified name of task

if package 'foo.bar' then

task blockc(type: testngblock) {     testngxml = "tests/testng-lrga-blockc.xml" } 

doesnt' work. need write below:

task blockc(type: foo.bar.testngblock) {     testngxml = "tests/testng-lrga-blockc.xml" } 

is there way import in java, can specify gradle package names resolving type, can use former approach define task.

yes. import in build.gradle works same in pure java class.

import foo.bar.testngblock  task blockc(type: testngblock) {   testngxml = "tests/testng-lrga-blockc.xml" } 

Comments

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -