Comments (7)
interesting. with the current master you can do:
override def skipProguard = true
to skip the proguard step.
from android-plugin.
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.
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.
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.
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.
nice one jrudolph
from android-plugin.
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)
- Scala 2.10.0 sbtPlugin HOT 1
- github integration obsolete
- Consuming android library projects from local file system (rather than maven repository) HOT 1
- Proguard problem scala 2.10 HOT 1
- Working with an android scala project? HOT 3
- Problem hacking on the plugin HOT 6
- Test dependencies aren't included in output apks. HOT 1
- Native Libraries are not included HOT 7
- Running sbt 'gen-idea no-classifiers' produces errors HOT 3
- 0.7 SNAPSHOT, ProGuard: include native method names by default HOT 5
- unresolved dependencies after update to sbt 0.13
- Support for aapt --rename-manifest-package HOT 2
- Compiler warnings in TR.scala HOT 1
- 0.7.1-SNAPSHOT: invalid /system/etc/permissions/scala-library-2.10.1.xml
- aapt not found [cause bad path in plugin] HOT 1
- Excess write HOT 4
- Complicated use of macro packages with android-plugin
- Missing Android SDK should be warning, or checked only when really needed.
- System keyring integration for apk signing HOT 4
- Is this still in use/maintained? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-plugin.