Generates proguard config file with -keepnames for all classes required by dagger
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Dagger Proguard Helper

Generates proguard config file with -keepnames for all classes required by Dagger.


You should add to your pom.xml:


Also add to your <repositories>:


The Dagger Proguard Helper annotation processor will generate dagger-proguard-keepnames.cfg at root of your project. You have to add this config file to proguard configuration. If you are using android-maven-plugin the configuration should be like following:


The recommended section for Dagger in your proguard.cfg:

    # Dagger
    -dontwarn dagger.internal.codegen.**
    -keepclassmembers,allowobfuscation class * {
        @javax.inject.* *;
        @dagger.* *;
    -keep class dagger.* { *; }
    -keep class javax.inject.* { *; }
    -keep class * extends dagger.internal.Binding
    -keep class * extends dagger.internal.ModuleAdapter
    -keep class * extends dagger.internal.StaticInjection


         Copyright 2013 iDa Mobile.
       Licensed under the Apache License, Version 2.0 (the "License");
       you may not use this file except in compliance with the License.
       You may obtain a copy of the License at
       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.