android - Gradle test run fails after class rename -


we have gradle set build , test our android app. ran problem, gradle test runs fail reproducibly after class renamed somewhere in project:

execution failed task ':proj:compiledebugunittestjavawithjavac'. > unable read class file: '/path/to/class/with/the/name/before/renaming.class' 

this error reproducible both..

  • locally (run gradle tests android studio, or on command line using ./gradlew test), and
  • remotely, when tests run on our ci (a teamcity server).

what solves issue, manually triggering rebuild locally (e.g. in android studio build > rebuild project) or re-running teamcity task flag clean files in checkout directory before build set.

is there way can our tests not fail after class has been renamed?

while above solution simple enough kinda annoying simple rename makes our repo blow ci builds... want stay green. :)

this known issue in gradle 2.14 , 2.14.1 , there workaround in upcoming android gradle plugin release.

as workaround can clean build project. ci build, clean build idea anyway.


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -