import android.Keys._

android.Plugin.androidBuild

platformTarget in Android := "android-17"

apkbuildExcludes in Android ++= Seq(
  "META-INF/notice.txt",
  "META-INF/license.txt",
  "META-INF/LICENSE",
  "META-INF/jersey-module-version",
  "META-INF/LICENSE.txt",
  "META-INF/NOTICE.txt",
  "META-INF/NOTICE",
  "META-INF/ASL2.0",
  "META-INF/*",
  "META-INF/",
  "META-INF/services/javax.ws.rs.ext.MessageBodyReader",
  "META-INF/services/javax.ws.rs.ext.MessageBodyWriter"
)

libraryDependencies ++= Seq(
  "it.newvision.nv4me.notificationcenter" % "4me-nc-model_2.10.0" % "1.3.0" 
excludeAll(ExclusionRule(organization = "org.codehaus.jackson"), 
ExclusionRule(organization = "org.slf4j")),
  "it.newvision.nvp" % "xcontents-core-model_2.10.0" % "4.2.0" 
excludeAll(ExclusionRule(organization = "org.codehaus.jackson"), 
ExclusionRule(organization = "org.slf4j")),
  "it.newvision.nvp" % "nvp-sso-core-model_2.10.0" % "4.2.0" 
excludeAll(ExclusionRule(organization = "org.codehaus.jackson"), 
ExclusionRule(organization = "org.slf4j")),
  "it.newvision.nvp" % "xadmin-core-model_2.10.0" % "4.2.0" 
excludeAll(ExclusionRule(organization = "org.codehaus.jackson"), 
ExclusionRule(organization = "org.slf4j")),
  "it.newvision.nvp" % "xpackager-core-model_2.10.0" % "4.2.0" 
excludeAll(ExclusionRule(organization = "org.codehaus.jackson"), 
ExclusionRule(organization = "org.slf4j")),
  "it.newvision.4me.ue" % "4me-ue-model_2.10.0" % "1.3" 
excludeAll(ExclusionRule(organization = "org.codehaus.jackson"), 
ExclusionRule(organization = "org.slf4j")),
  "com.typesafe.akka" % "akka-actor_2.10" % "2.1.4",
  "com.google.android" % "support-v4" % "13" ,
  "org.codehaus.jackson" % "jackson-mapper-asl" % "1.9.12",
  "com.koushikdutta.android-async" % "androidasync" % "1.1",
  "com.nostra13.universalimageloader" % "universal-image-loader" % "1.9.0",
  "com.squareup.picasso" % "picasso" % "2.3.4"
)


libraryDependencies <<= libraryDependencies (_ map { d => d 
excludeAll(ExclusionRule(organization = "org.apache")) })

libraryDependencies <<= libraryDependencies (_ map { d => d 
excludeAll(ExclusionRule(name = "commons-logging")) })

proguardCache in Android += ProguardCache("scala") % "org.scala-lang"

resolvers ++= Seq(
  "maven-repo" at "file://\\\\pz-ci\\ci_repository\\maven_repository",
  "maven-repo-local-additions" at 
"file://\\\\pz-ci\\ci_repository\\maven-repo-local-additions"
)

useProguard in Android := true

proguardOptions in Android ++=  Seq(
  "-dontwarn org.apache.httpcomponents.**",
  "-dontwarn org.apache.http.**",
  "-ignorewarnings",
  "-dontoptimize",
  "-dontpreverify",
  "-dontobfuscate",   // shrinking only
  "-dontskipnonpubliclibraryclassmembers",          // keep Jackson's 
internal classes
  "-dontskipnonpubliclibraryclasses",               // keep Jackson's 
internal classes
  "-keepattributes *Annotation*.",                  // keep Jackson Json 
Annotations.
  "-keepclassmembers enum * { public static **[] values(); public static ** 
valueOf(java.lang.String); }",
  "-keep public class it.newvision.nvp.*.services.model.**",
  "-keep public class it.newvision.nvp.*.model.**",
  "-keep interface android.support.v4.app.** { *; }",
  "-keep class scala.collection.SeqLike { public protected *; }",
  "-keep public class com.sun.jersey.core.util.MultivaluedMapImpl",
  "-keep public class com.sun.jersey.api.client.config.ClientConfig",
  "-keep public class com.sun.jersey.api.client.config.DefaultClientConfig",
  "-keep public class org.codehaus.jackson.map.JsonSerializer",
  "-keep public class org.codehaus.jackson.map.JsonDeserializer",
  "-keep public class akka.actor.**  { public protected *; }",
  "-keep public class akka.event.**  { public protected *; }",
  "-dontnote **")


name := "FourMeAndroid"



and build.scala:

import android.Keys._
import sbt.Keys._
import sbt._


object Generals {
  val settings = seq (
    useProguard in Android := true
  )
}



object AndroidBuild extends Build {

  useProguard in Android := true

  lazy val androidScala = Project(
    "FourMeAndroid",
    file("."),
    settings = fullAndroidSettings
  )

  lazy val fullAndroidSettings =
    Generals.settings ++
    Defaults.defaultSettings ++
    android.Plugin.androidBuild ++
    Seq(
      platformTarget in Android := "android-17",
      versionCode := Option(28),
      version := "4.2.100",
      dexMaxHeap in Android := "2048m",
      dexCoreLibrary in Android := false,
      useProguard in Android := true,
      transitiveAndroidLibs in Android := false,
      scalaVersion := Version.scala,
      scalacOptions ++= Seq(
        "-unchecked",
        "-deprecation",
        "-Xlint",
        "-language:_",
        "-encoding",
        "UTF-8"
      ),
      resolvers ++= Seq(
        "maven-repo" at "file://\\\\pz-ci\\ci_repository\\maven_repository",
        "maven-repo-local-additions" at 
"file://\\\\pz-ci\\ci_repository\\maven-repo-local-additions"
      )
    )




  unmanagedBase <<= baseDirectory { base => base / "lib"}

   object Version {
    val scala = "2.10.2"
  }

}







Il giorno mercoledì 3 dicembre 2014 15:46:35 UTC+1, Daniel Skinner ha 
scritto:
>
> I'm not the one having problems, you might be better helped by posting 
> yours.
>
> On Wed, Dec 3, 2014 at 7:53 AM, alessio crestani <crestani...@gmail.com 
> <javascript:>> wrote:
>
>> Can you post a build.sbt from your project to see the settings, please?
>>
>> Il giorno mercoledì 3 dicembre 2014 14:50:52 UTC+1, Daniel Skinner ha 
>> scritto:
>>>
>>> I generally wait 10-15 seconds to deploy on a device after changes and I 
>>> didn't do anything special to make that happen. This experience is across a 
>>> range of projects.
>>> On Dec 3, 2014 5:38 AM, "alessio crestani" <crestani...@gmail.com> 
>>> wrote:
>>>
>>>> Yeah but, it's not a pain for you to wait like 2 minutes for every 
>>>> single change on your app? 
>>>> In iOS compile time to emulator is 5 seconds. 
>>>> If i'm implementing some new stuff i'm waiting 2 minutes every single 
>>>> line change, it's Boring.
>>>> Il 02/dic/2014 17:48 "Perry Nguyen" <pfng...@gmail.com> ha scritto:
>>>>
>>>>> proguard cache
>>>>>
>>>>> On Tue Dec 02 2014 at 8:28:20 AM Konrad Malawski <
>>>>> konrad....@project13.pl> wrote:
>>>>>
>>>>>> On the sbt side of things you can speed up compilation by using 
>>>>>> name-hashing ( https://groups.google.com/
>>>>>> forum/#!topic/play-framework/S_-wYW5Tcvw )
>>>>>> a relatively new feature.
>>>>>>
>>>>>> When it comes to proguard - it's always a pain... try having less 
>>>>>> dependencies, and / or simpler rules.
>>>>>>
>>>>>> -- 
>>>>>> Konrad 'ktoso’ Malawski
>>>>>> hAkker @ typesafe
>>>>>> akka.io / java.pl / geecon.org / krakowscala.pl / gdgkrakow.pl
>>>>>>
>>>>>> 2014-12-02 17:21 GMT+01:00 alessio crestani <crestani...@gmail.com>:
>>>>>>
>>>>>>> Hi. I'm developing a complex Android app and with scala+sbt+proguard 
>>>>>>> I'm taking aproximately 200 seconds to compile and install on emulator.
>>>>>>>
>>>>>>> What can I do to get a faster compile? especially for the proguard's 
>>>>>>> part.
>>>>>>>
>>>>>>> -- 
>>>>>>> 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-andro...@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-andro...@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-andro...@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-andro...@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-andro...@googlegroups.com <javascript:>.
>> 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