Devang
Devang

Reputation: 171

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

Upvotes: 12

Views: 2784

Answers (1)

Volodymyr
Volodymyr

Reputation: 6569

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

Upvotes: 2

Related Questions