Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not get unknown property 'assembleRelease' while using gradle 2.14.1

When using older version then gradle 2.14.1 then below statement compiled and
run successfully but after updating with gradle 2.14.1, its not working.

code:

assembleRelease.dependsOn 'increaseVersionCodeAndName'

Thanks,

Devang

like image 848
Devang Avatar asked Aug 11 '16 11:08

Devang


1 Answers

You may change your task increaseVersionCodeAndName that it will depend on release like:

task increaseVersionCodeAndName() << {
    //your code
    dependsOn 'assembleRelease'
}

Instead of calling gradle assemble call your own gradle task increaseVersionCodeAndName

like image 97
Volodymyr Avatar answered Oct 17 '22 19:10

Volodymyr