frankiesardo / icepick

Android Instance State made easy
Eclipse Public License 1.0
3.75k stars 208 forks source link

Question: Integrate the library to a project with modules. #85

Closed gastoncesarf closed 7 years ago

gastoncesarf commented 8 years ago

I have a problem with my project, he has N modules, and one of them is the "core" (in my case ChuckNorris module), for example:

App (main module)
Module A
    gradle{
        compile project(':ChuckNorris')
    }
Module B
    gradle{
        compile project(':ChuckNorris')
    }
...
Module N
    gradle{
        compile project(':ChuckNorris')
    }
Module ChuckNorris (Here is ChuckNorrisActivity)
    gradle{
         compile 'frankiesardo:icepick:x.x.x'
         provided 'frankiesardo:icepick-processor:x.x.x'
    }

So, I need to use icepick on an activity from main module and Module B, but all activities extend from ChuckNorrisActivity that is in ChuckNorris Module. For this to work should add _icepick_ dependency on the main module and module B. Therefore I must add in each module you need. There is another way to do this?

sebastian-uriel-flores commented 8 years ago

+1

abruno- commented 8 years ago

+1, I got the same question:

Should I have the Icepick declared in the APP Module? or in the Module ? or in Both ?

in the current scenery, If I declare icepick in a module, and use that module in others modules (where there isnt declare icepick) it doesn't work.

Duna commented 8 years ago

Error:Could not find frankiesardo:icepick:3.2.0. Required by:

frankiesardo commented 7 years ago

In the example folder there's exactly this scenario: a lib module and an app module.

The example project is working, could you take inspiration from that and fix the issue you're experiencing?