forked from square/dagger
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
When a class is annotated with @AndroidEntryPoint
annotation the generated class doesn't have @Suppress
annotation the original class has.
Steps to reproduce:
- Create an android entry point class inheriting from a deprecated class and annotate it with
@Suppress("deprecation")
, e.g.
@AndroidEntryPoint
@Suppress("deprecation")
class FooService : JobIntentService() { ... }
- Build project
Expected result
Generated class retains @Suppress
annotation and no warnings are raised during build.
Actual result
Generated class doesn't have @Suppress
annotation and warning is raised during the build process, e.g.
/**
* A generated base class to be extended by the @dagger.hilt.android.AndroidEntryPoint annotated class. If using the Gradle plugin, this is swapped as the base class via bytecode transformation.
*/
public abstract class Hilt_FooService extends JobIntentService implements GeneratedComponentManagerHolder { ... }
with warning produced during build:
/<generated sources location>/Hilt_FooService.java:4: warning: [deprecation] JobIntentService in androidx.core.app has been deprecated
import androidx.core.app.JobIntentService;