Git Product home page Git Product logo

Comments (7)

jberkel avatar jberkel commented on July 21, 2024

interesting. with the current master you can do:

override def skipProguard = true

to skip the proguard step.

from android-plugin.

appamatto avatar appamatto commented on July 21, 2024

I've noticed proguard still getting executed with this override. I'm quite baffled--looking at the code this should never happen, unless I'm misunderstanding the semantics of "lazy".

from android-plugin.

jberkel avatar jberkel commented on July 21, 2024

you actually need to put the override into both projects (main + test):

 trait Defaults extends BaseAndroidProject {
    def androidPlatformName = "android-7"
    override def skipProguard = true
 }

class MainProject(info: ProjectInfo) extends AndroidProject(info) with Defaults { ... }
class TestProject(info: ProjectInfo) extends AndroidTestProject(info) with Defaults

from android-plugin.

jberkel avatar jberkel commented on July 21, 2024

just tried it with a patched emulator image as described above - it works fine, and speeds up the development process considerably. i've mirrored the svn repo with the scripts to generate the patched emulator images: https://github.com/jberkel/android-sdk-scala

here's what i did:

$ git clone git://github.com/jberkel/android-sdk-scala.git && cd android-sdk-scala
$ bin/createdexlibs  # predex scala lib
$ bin/createramdisks # patch imgs to include scala in BOOTCLASSPATH
$ emulator -avd ... -ramdisk /path/to/custom.img
$ adb shell mkdir -p /data/framework
$ for i in configs/framework/*.jar; do adb push $i /data/framework/$(basename $i); done
$ adb shell echo '$BOOTCLASSPATH'
/system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/data/framework/scala-library.jar:/data/framework/scala-collection.jar:/data/framework/scala-immutable.jar:/data/framework/scala-mutable.jar:/data/framework/scala-actors.jar  

then after rebooting the emulator you can install scala apks on the emulator.

i'd like to make the steps needed to get the emulator to accept scala apks simpler - maybe we could add an sbt task for it ?

quick benchmark (hello world project generated by g8, main apk + tests)
with proguard:

$ time sbt clean package-debug
real    0m40.514s
user    0m50.632s
sys 0m2.345s

without proguard:

$ time sbt clean package-debug
real    0m16.507s
user    0m22.199s
sys 0m1.873s

woot!

from android-plugin.

jrudolph avatar jrudolph commented on July 21, 2024

I pre-packaged the Scala libs for Android so that, after installing, you can reference them in your AndroidManifest.xml with tags for developing purposes. You can find it at jrudolph/scala-android-libs .

from android-plugin.

charroch avatar charroch commented on July 21, 2024

nice one jrudolph

from android-plugin.

Macarse avatar Macarse commented on July 21, 2024

I got here after asking this question: http://stackoverflow.com/questions/7941178/long-build-times-with-sbt-android-plugin

I will use scala in my application for a small part. I was thinking of trying to package that code in some kind of library to avoid the compile time.

Anyone tried something like that?

from android-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.