Created
January 19, 2017 19:00
-
-
Save nmdanny/adb3127f3e79cb7caf5fd1ea12b61421 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// /build.sbt | |
lazy val commonSettings = Seq( | |
name := "GeoQuiz", | |
organization := "com.kerbel", | |
version := "0.1.0", | |
versionCode := Some(1), | |
scalaVersion := "2.11.8", | |
libraryDependencies := commonLibs | |
) | |
lazy val core = (project in file("core")).settings(commonSettings: _*) | |
lazy val android = (project in file("android")).aggregate(core) | |
.dependsOn(core) | |
.settings(commonSettings: _*) | |
lazy val commonLibs = | |
"org.scalaz" %% "scalaz-core" % "7.2.8" :: | |
"io.argonaut" %% "argonaut" % "6.1" :: | |
"io.monix" %% "monix" % "2.1.2" :: | |
"io.monix" %% "monix-scalaz-72" % "2.1.2" :: | |
"com.squareup.okhttp3" % "okhttp" % "3.5.0" :: | |
"org.scalatest" %% "scalatest" % "3.0.1" % "test" :: | |
"io.taig" %% "communicator" % "3.0.0" :: | |
Nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// /android/build.sbt | |
name := "GeoQuiz-android" | |
enablePlugins(AndroidApp) | |
enablePlugins(AndroidProtify) | |
allDevices in Android := true | |
fork in Test := true | |
/* disable proguard */ | |
useProguard in Test := false | |
useProguard in Android := false | |
useProguard := false | |
// Enforce Java 7 compilation (in case you have the JDK 8 installed) | |
javacOptions ++= | |
"-source" :: "1.7" :: | |
"-target" :: "1.7" :: | |
Nil | |
proguardVersion := "5.3.2" | |
libraryDependencies ++= | |
aar("com.android.support" % "appcompat-v7" % "25.1.0") :: | |
aar("com.android.support" % "cardview-v7" % "25.1.0") :: | |
aar("com.android.support" % "design" % "25.1.0") :: | |
aar("com.android.support" % "gridlayout-v7" % "25.1.0") :: | |
aar("com.android.support" % "recyclerview-v7" % "25.1.0") :: | |
aar("com.android.support" % "support-v4" % "25.1.0") :: | |
"com.squareup.picasso" % "picasso" % "2.5.2" :: | |
"com.geteit" %% "robotest" % "0.12" % "test" :: | |
Nil | |
// Predefined as IceCreamSandwich (4.0), nothing stops you from going below | |
minSdkVersion := "21" | |
// Prevent common com.android.builder.packaging.DuplicateFileException. | |
// Add further file names if you experience the exception after adding new dependencies | |
packagingOptions := PackagingOptions( | |
excludes = | |
"META-INF/LICENSE" :: | |
"META-INF/LICENSE.txt" :: | |
"META-INF/NOTICE" :: | |
"META-INF/NOTICE.txt" :: | |
Nil | |
) | |
platformTarget := "android-25" | |
targetSdkVersion := "25" | |
proguardCache ++= | |
"android.support" :: | |
Nil | |
proguardOptions ++= | |
"-keepattributes EnclosingMethod,InnerClasses,Signature" :: | |
"-dontwarn org.w3c.dom.bootstrap.DOMImplementationRegistry" :: | |
"-dontwarn javax.xml.bind.DatatypeConverter" :: | |
"-dontnote org.joda.time.DateTimeZone" :: | |
"-dontnote scala.concurrent.stm.impl.STMImpl$" :: | |
"-keep class argonaut.** { *; }" :: | |
"-keep class scalaz.** { *; }" :: | |
// don't warn | |
"-dontwarn okio.**" :: | |
"-dontwarn okhttp3.**" :: | |
"-dontwarn monix.**" :: | |
"-dontwarn org.jctools.**" :: | |
"-dontwarn io.circe.**" :: | |
// dont note | |
"-dontnote okio.**" :: | |
"-dontnote com.squareup.**" :: | |
"-dontnote okhttp3.** " :: | |
"-dontnote monix.**" :: | |
"-dontnote io.circe.**" :: | |
Nil | |
// Shortcut: allows you to execute "sbt run" instead of "sbt android:run" | |
run := (run in Android).evaluated | |
scalacOptions ++= | |
// Print detailed deprecation warnings to the console | |
"-deprecation" :: | |
// Print detailed feature warnings to the console | |
"-feature" :: | |
Nil | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// /core/build.sbt | |
exportJars := true | |
name := "GeoQuiz-core " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment