The apktool and dex2jar tasks should fail if for whatever reason no output is produced. This would stop gradle from caching those "results" as valid, if they are ever produced. I observed one instance (that I was not able to reproduce later) in which gradle cached a success of the dex2jar task as producing no output, and a manual reset of the gradle task result cache was required to fix the issue.
The apktool and dex2jar tasks should fail if for whatever reason no output is produced. This would stop gradle from caching those "results" as valid, if they are ever produced. I observed one instance (that I was not able to reproduce later) in which gradle cached a success of the dex2jar task as producing no output, and a manual reset of the gradle task result cache was required to fix the issue.