Provided scope dependencies are not dexed, so that is unrelated.

You can try disabling incremental dex by setting:

dexInputs in Android := (false, (dexInputs in Android).value._2)




On Thu, Apr 2, 2015 at 1:47 AM Graham Pople <grahampo...@gmail.com> wrote:

> Hey,
>
> I've added 3 Jar dependencies to my simple test android-sdk-plugin
> project, and now my package times have gone up to 15 seconds for a simple
> one-line Scala code change.  It's not the end of the world but rapidly gets
> frustrating, I'm used to Java's near-instant compilations.  The android:dex
> step is the culprit.  I have a few questions:
>
> 1.  dex has got much slower since adding the 3 Jar dependencies, but I
> only need these for compilation, not runtime (I'm importing some model
> classes that I want to use on Android, server and web via Scala-JS, so they
> have some annotations that are important to server-side but irrelevant to
> the Android client).  Can I tell dex to ignore them?  I tried % "provided"
> on the dependencies, but no result.  I think this works in the other
> android sbt plugin going from
> http://fxthomas.github.io/android-plugin/tutorial/02-configuring-the-build.html
> .
>
> 2.  Weirdly, after a clean, android:package takes just 8 seconds versus
> the 15 s for a code change.  The difference seems to be dex running in
> non-incremental mode after a clean, and incremental after a change.  Oddly,
> the incremental dex is much slower.  So a) any ideas why that is, and b)
> can I force dex to be non-incremental.
>
> 3.  Finally, any other tips for getting the dex stage faster?
>
> If it helps, the last output after android:dex ends:
>
> [debug] available versions: List(1.3.18, 1.3.17, 1.3.16, 1.3.15, 1.3.14)
> [debug] current version: 1.3.18
> [debug] latest version: 1.3.18
> [info] Generating dex, incremental=true, multiDex=false
> [debug] Dex inputs:
> List(C:\dev\all2\travelpouch-android-sbt-clean\target\android-bin\retrolambda-processed.jar)
> [success] Total time: 14 s, completed Apr 2, 2015 3:41:13 PM
>
> And my sbt is:
>
> name := "test"
>
> version := "1.0"
>
> scalaVersion := "2.11.6"
>
> // Just use annotations from these
> proguardOptions in Android ++= Seq("-dontwarn javax.persistence.**")
> proguardOptions in Android ++= Seq("-dontwarn org.jboss.logging.**")
> proguardOptions in Android ++= Seq("-dontwarn org.hibernate.validator.**")
> proguardOptions in Android ++= Seq("-dontwarn com.fasterxml.jackson.**")
> proguardOptions in Android ++= Seq("-dontnote com.fasterxml.jackson.**")
>
> libraryDependencies ++= Seq(
>   "javax.persistence" % "persistence-api" % "1.0.2"  % "provided",
>   "com.fasterxml.jackson.core" % "jackson-databind" % "2.5.1" % "provided",
>   "org.hibernate" % "hibernate-validator" % "5.1.3.Final" % "provided"
> )
>
>  --
> You received this message because you are subscribed to the Google Groups
> "scala-on-android" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to scala-on-android+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"scala-on-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to scala-on-android+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to