Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use kapt in androidTest scope

Is there a way to use kapt for the androidtest scope? Currently I am migrating from com.neenbedankt.gradle.plugins android-apt to kapt - which works fine - but I am not sure how to do it for the androidTest scope - so replacing:

apt "com.github.hotchemi:permissionsdispatcher-processor:$permissiondispatcher_version" apt "com.google.dagger:dagger-compiler:$dagger_version" 

with

kapt "com.github.hotchemi:permissionsdispatcher-processor:$permissiondispatcher_version" kapt "com.google.dagger:dagger-compiler:$dagger_version" 

works fine - but I found no way to migrate:

androidTestApt "com.google.dagger:dagger-compiler:$dagger_version" 
like image 642
ligi Avatar asked Jun 20 '16 15:06

ligi


People also ask

What is kapt used for?

What is KAPT used for? The answer to this is straight, it is used for annotation processing in Kotlin.

Is kapt deprecated?

app: Original kapt is deprecated.

What is kotlin annotation processing tool?

KAPT is Kotlin Annotation Processing Tool. Annotations used in Kotlin code are processed using KAPT tool. KAPT performs additional code generation or it can perform other actions based on annotations. Kotlin-Kapt Plugin allows us to use these generated classes inside our project.


1 Answers

As described in the documentation, it's kaptAndroidTest (and kaptTest for unit tests).

like image 151
Kirill Rakhman Avatar answered Sep 25 '22 17:09

Kirill Rakhman