Question

I am trying to build "final APK" with obfuscated Scala code.
I have Eclipse + plugins: ADT, Scala, AndroidProguardScala.

When I select:
myproject <- right click to show ctx menu > Android Tools > Export Unsigned Application Package
there is generated APK but Scala code is not obfuscated.

On the other hand: enabling proguard in APT build config with:
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
generates hundreds of warnings and finally fails.

Wondering how to convince IDE to generate APK with obfuscated Scala code.

BTW. Maybe there is no purely IDE based solution? I saw sbt plugins for Android. Maybe these need to be used?

Was it helpful?

Solution

I'd highly recommend leaving the IDE and diving into the sbt world for developing Scala apps (esp. with Scala/Android). I've been developing a pet project some time ago, it uses proguard and the config is embedded in the Build.scala there, you can have a look at: https://github.com/ktoso/kanbanery-tv/blob/master/project/Build.scala

Other than that you'll want to read up about the latest version of: https://github.com/jberkel/android-plugin (or join the mailing lists mentioned there where all the scala+android people hang out.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top