Hi,

I've configured my project as sbt-multimodule where both are 'Android' 
projects.
There is no detailed documentation about that and I'm having issues like 
this:

*[info] Resolving jline#jline;2.11 ...*
*[info] Done updating.*
*[info] Unpacking aar: macroid_2.11-2.0.0-M3.aar to 
org.macroid-macroid_2.11-2.0.0-M3*
*[info] Unpacking aar: support-v4-21.0.0.aar to 
com.android.support-support-v4-21.0.0*
*[info] Unpacking aar: appcompat-v7-21.0.0.aar to 
com.android.support-appcompat-v7-21.0.0*
*[info] Unpacking aar: cardview-v7-21.0.0.aar to 
com.android.support-cardview-v7-21.0.0*
*[info] Unpacking aar: recyclerview-v7-21.0.0.aar to 
com.android.support-recyclerview-v7-21.0.0*
*[info] Unpacking aar: macroid-akka-fragments_2.11-2.0.0-M3.aar to 
org.macroid-macroid-akka-fragments_2.11-2.0.0-M3*
*[info] Collecting resources*
*...*
*[info] Processing resources*
*[trace] Stack trace suppressed: run last app/android:rGenerator for the 
full output.*
*[error] (app/android:rGenerator) Error: more than one library with package 
name 'android.support.v7.cardview'*
*[error] You can temporarily disable this error with 
android.enforceUniquePackageName=false*
*[error] However, this is temporary and will be enforced in 1.0*

I've tried this:

import sbt._
import sbt.Keys._
import android.Dependencies.LibraryProject
import android.Keys._

object ApplicationBuild extends Build {

  lazy val root = Project(id = "root", base = file(".")).settings(
    android.Plugin.androidCommands :+
        (install <<= (
            install in(app, Android)) map { (_) => ()}): _*
  ).aggregate(app, androidLib)

  lazy val app = Project(id = "app", base = file("modules/app")).
    settings(appSettings: _*).dependsOn(androidLib)

  val androidLib = Project(id = "androidLib",
    base = file("modules/androidLib")).
    settings(androidLibSettings: _*)

  lazy val appSettings = android.Plugin.androidBuild(androidLib) ++
      List(
        scalaVersion := "2.11.1",
        platformTarget in Android := "android-21",
        localProjects in Android += LibraryProject(androidLib.base),
        apkbuildExcludes in Android ++= Seq(
          "META-INF/LICENSE.txt",
          "META-INF/LICENSE",
          "META-INF/NOTICE.txt",
          "META-INF/NOTICE",
          "reference.conf"
        ),
        dependencyClasspath in Compile ~= {
          _ filterNot (_.data.getName startsWith "android-support-v4")
        }
      )

    lazy val androidLibSettings = android.Plugin.androidBuildApklib ++
      List(
        platformTarget in Android := "android-21",
        libraryDependencies ++= Seq(
          scalaVersion := "2.11.1",
          aar("com.android.support" % "appcompat-v7" % "21.0.0"),
          aar("com.android.support" % "recyclerview-v7" % "21.0.0"),
          aar("com.android.support" % "cardview-v7" % "21.0.0"),
          aar("org.macroid" %% "macroid" % "2.0.0-M3"),
          aar("org.macroid" %% "macroid-akka-fragments" % "2.0.0-M3"),
          "com.typesafe.akka" %% "akka-actor" % "2.3.3",
          compilerPlugin("org.brianmckenna" %% "wartremover" % "0.10")
        ),
        proguardScala in Android := true,
        proguardOptions in Android ++= Seq(
          "-ignorewarnings",
          "-keep class scala.Dynamic"
        )
      )
}

Any help please?
Thanks!


-- 
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