Thursday 31 May 2018

Get annotated methods from gradle plugin

I'm developing a gradle plugin for android projects in kotlin and I need to scan the project source files in order to get all tests' names. I have implemented a directory scanner and I got an Arraylist<File> with all test classes.

I tried to apply reflection to this files but I got always a no class found exception. I suppose that the gradle plug in is trying to find the class inside the same gradle plugin the project instead of the Android project where the plugin is used.

Is there any way to scan each File object in my ArrayList and get all methods with the annotation @test?



from Get annotated methods from gradle plugin

1 comment:

  1. https://www.wizweb.in

    Wizweb Technology is a leading software development company custom website design, software development, SMS Provider, Bulk sms, transactional sms, promotional sms, mobile app development, Hosting Solution, seo(search engine optimization) and Digital marketing etc.

    ReplyDelete