AndroidProguardScala
AndroidProguardScala copied to clipboard
A.P.S. won't analyze code from required projects (project dependencies)
If an Android project uses another Scala project or library, there may be parts of Scala library that are used by them but not by Android project itself directly, and A.P.S. removes these parts, so the final .apk is broken, maybe there is a quick&dirty way to live with it?
You've got two choices in preferences for those: input or library. Does that not solve it for you? (If you mark them as input, code from there will end up in the minified jar. If you mark them as library, no code from them will be included in the minified jar, but proguard will walk through them to figure out what they use. Take a look at the proguard conf file to see exactly what's happening.)
Is there a way to reference a project, not packaged into jar? Its code is updated frequently, so it will be not very cool to make a jar of it every time.
I'm sorry for mentioning libraries, they are OK now, as I understand. Just didn't see that configuration page until posting.
Just a regular eclipse project? Right now the only way to include those is to use them as an input project. The problem with that is that you're going to get a lot of cache misses; any change in the referenced project is going to cause a proguard run.
It wouldn't be too hard to add this feature though - let me think about it.
The workaround right not would be to put them into an Android library project; those should work well.
Thanks!
@banshee Yes, just a regular eclipse project with scala code (that obviously uses some parts of scala library). But it can be treated as if its source files were in our main android project, isn't it? Input sources must be analysed anyway, because we must know what parts of Scala library they use. As I understand, the plugin does almost exactly this.
The code is already in the analysis system, you're right. The thing I'd need to add would be to tell Android that the code needs to be included in the Android build. I've been hoping the Android build system would add that feature so I wouldn't have to. If it were handled by Android, you'd just mark it as a library jar.
I'd love to have that, too. It would be useful for libgdx-based development, for example.
@jmhofer IntelliJ IDEA can handle this.
@magicgoose Thanks! - I haven't really tried Android development with IDEA yet, but will most probably do so on my next project.
@jmhofer take a look at https://github.com/magicgoose/android-scala-intellij-no-sbt-plugin