- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Scala and ProGuard
Sat, 2009-09-19, 04:30
Has anyone had success with ProGuard? I have a small Scala application, and the executable jar is almost 5MB!
Sat, 2009-09-19, 08:07
#2
Re: Scala and ProGuard
If you're into Maven, have a go with http://lafros.com/maven/plugins/proguard
2009/9/19 Mason Green <mason.green@gmail.com>
--
Rob, Lafros.com
2009/9/19 Mason Green <mason.green@gmail.com>
Has anyone had success with ProGuard? I have a small Scala application, and the executable jar is almost 5MB!
--
Rob, Lafros.com
Sat, 2009-09-19, 09:57
#3
Re: Scala and ProGuard
If you look through the archives there is a good thread that discusses
this in relation to building applets with Scala.
Cheers, Tim
On Sat, Sep 19, 2009 at 4:29 AM, Mason Green wrote:
> Has anyone had success with ProGuard? I have a small Scala application, and
> the executable jar is almost 5MB!
>
Sat, 2009-09-19, 15:37
#4
Re: Scala and ProGuard
Hi,
I've tried adding the fix outlined here, although I'm still having issues. Attached are the Scala specific warning messages I get with ProGuard 4.5.1 beta, and Scala 2.7.5 library. I've also attached the error log I get when I run the output jar, after ignoring all warnings, and my Proguard configuration file.
If anyone can spare the time I would definitely appreciate the help. Scala is my favorite language, but efficiently distributing applications without the giant executable jar is a big issue!
I think it would be a big help to the community if someone could create a small tutorial for tips on Scala w/ ProGuard!
Many thanks,
Mason
On Sat, Sep 19, 2009 at 4:45 AM, Tim Perrett <tperrett@googlemail.com> wrote:
I've tried adding the fix outlined here, although I'm still having issues. Attached are the Scala specific warning messages I get with ProGuard 4.5.1 beta, and Scala 2.7.5 library. I've also attached the error log I get when I run the output jar, after ignoring all warnings, and my Proguard configuration file.
If anyone can spare the time I would definitely appreciate the help. Scala is my favorite language, but efficiently distributing applications without the giant executable jar is a big issue!
I think it would be a big help to the community if someone could create a small tutorial for tips on Scala w/ ProGuard!
Many thanks,
Mason
On Sat, Sep 19, 2009 at 4:45 AM, Tim Perrett <tperrett@googlemail.com> wrote:
If you look through the archives there is a good thread that discusses
this in relation to building applets with Scala.
Cheers, Tim
On Sat, Sep 19, 2009 at 4:29 AM, Mason Green <mason.green@gmail.com> wrote:
> Has anyone had success with ProGuard? I have a small Scala application, and
> the executable jar is almost 5MB!
>
Sat, 2009-09-19, 16:07
#5
Re: Scala and ProGuard
Would you be willing to share your ProGuard configuration file, or write a tutorial?
Thanks,
Mason
On Sat, Sep 19, 2009 at 12:47 AM, Michael Galpin <mike.sr@gmail.com> wrote:
Thanks,
Mason
On Sat, Sep 19, 2009 at 12:47 AM, Michael Galpin <mike.sr@gmail.com> wrote:
Yes, it works well with Scala. I have used it for Android applications written in Scala.
-- Michael
On Fri, Sep 18, 2009 at 8:29 PM, Mason Green <mason.green@gmail.com> wrote:
Has anyone had success with ProGuard? I have a small Scala application, and the executable jar is almost 5MB!
Sat, 2009-09-19, 16:17
#6
Re: Scala and ProGuard
I used the patched proguard.jar and this file:
-injars bin:/home/johannes/download/scala-2.7.3.final/lib/scala-library.jar
-outjars out.jar
-libraryjars /home/johannes/download/andriod/android-sdk-linux_x86-1.1_r1/android.jar
-dontobfuscate
-dontoptimize
-keepclasseswithmembers class * extends android.app.Activity
-keepclasseswithmembers class scala.ScalaObject
Perhaps it may help you. It's some time ago, since I used it, so I'm
not sure if it still works...
Johannes
On Sat, Sep 19, 2009 at 4:37 PM, Mason Green wrote:
> Would you be willing to share your ProGuard configuration file, or write a
> tutorial?
>
> Thanks,
> Mason
>
> On Sat, Sep 19, 2009 at 12:47 AM, Michael Galpin wrote:
>>
>> Yes, it works well with Scala. I have used it for Android applications
>> written in Scala.
Sat, 2009-09-19, 16:47
#7
Re: Scala and ProGuard
For Android usage, I used this: http://chneukirchen.org/blog/archive/2009/04/programming-for-android-with-scala.html. The Ant task listed no longer works with the Android 1.5, so I have done this manually instead. Here is another, more recent example that I haven't tried: http://codingnaked.wordpress.com/2009/08/07/setting-up-maven-for-scala-and-proguard/.
-- Michael
On Sat, Sep 19, 2009 at 7:37 AM, Mason Green <mason.green@gmail.com> wrote:
-- Michael
On Sat, Sep 19, 2009 at 7:37 AM, Mason Green <mason.green@gmail.com> wrote:
Would you be willing to share your ProGuard configuration file, or write a tutorial?
Thanks,
Mason
On Sat, Sep 19, 2009 at 12:47 AM, Michael Galpin <mike.sr@gmail.com> wrote:
Yes, it works well with Scala. I have used it for Android applications written in Scala.
-- Michael
On Fri, Sep 18, 2009 at 8:29 PM, Mason Green <mason.green@gmail.com> wrote:
Has anyone had success with ProGuard? I have a small Scala application, and the executable jar is almost 5MB!
Sun, 2009-09-20, 00:37
#8
Re: Scala and ProGuard
I'm including my proguard file I used for my applet. I've stopped using ProGuard and is using Pak200 compression instead which brings the library.jar down to 1.2mb. It is automated with applets so I'm not sure how to use it with ordinary applications. As Johannes Rudolph uses in his proguard file I see you're missing the ScalaObject class in the ProGuard file.
-injars build\lib-prepared\project.jar
-outjars build\lib\project.jar
-injars build\lib-prepared\scala-library.jar
-outjars build\lib\scala-library.jar
-dontobfuscate
-dontoptimize
-dontpreverify
-dontnote
-dontwarn
-ignorewarnings
-keepattributes
-keep class scala.ScalaObject {
public protected *;
}
On Sat, Sep 19, 2009 at 4:35 PM, Mason Green <mason.green@gmail.com> wrote:
-injars build\lib-prepared\project.jar
-outjars build\lib\project.jar
-injars build\lib-prepared\scala-library.jar
-outjars build\lib\scala-library.jar
-dontobfuscate
-dontoptimize
-dontpreverify
-dontnote
-dontwarn
-ignorewarnings
-keepattributes
-keep class scala.ScalaObject {
public protected *;
}
On Sat, Sep 19, 2009 at 4:35 PM, Mason Green <mason.green@gmail.com> wrote:
Hi,
I've tried adding the fix outlined here, although I'm still having issues. Attached are the Scala specific warning messages I get with ProGuard 4.5.1 beta, and Scala 2.7.5 library. I've also attached the error log I get when I run the output jar, after ignoring all warnings, and my Proguard configuration file.
If anyone can spare the time I would definitely appreciate the help. Scala is my favorite language, but efficiently distributing applications without the giant executable jar is a big issue!
I think it would be a big help to the community if someone could create a small tutorial for tips on Scala w/ ProGuard!
Many thanks,
Mason
On Sat, Sep 19, 2009 at 4:45 AM, Tim Perrett <tperrett@googlemail.com> wrote:
If you look through the archives there is a good thread that discusses
this in relation to building applets with Scala.
Cheers, Tim
On Sat, Sep 19, 2009 at 4:29 AM, Mason Green <mason.green@gmail.com> wrote:
> Has anyone had success with ProGuard? I have a small Scala application, and
> the executable jar is almost 5MB!
>
-- Michael
On Fri, Sep 18, 2009 at 8:29 PM, Mason Green <mason.green@gmail.com> wrote: