-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.sbt
98 lines (75 loc) · 2.94 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
lazy val keepshare = project.in(file(".")).settings(androidBuild)
val supportSdkVersion = "23.4.0"
val conversionsVersion = "23.2.0"
val gmsVersion = "8.3.0"
name := "keepshare"
ndkAbiFilter :=
"armeabi-v7a" ::
"x86" ::
Nil
versionName := {
import com.typesafe.sbt.SbtGit.GitKeys.gitReader
gitReader.value.withGit(_.describedVersion)
}
versionCode := {
val cmd = "git" :: "rev-list" :: "--count" :: "HEAD" :: Nil
Option(cmd !!) map (_.trim.toInt)
}
android.dsl.javacFlags(Compile)("-target", "1.7", "-source", "1.7")
scalacOptions in Compile += "-feature"
scalaVersion := "2.11.8"
debugIncludesTests := false
libraryDependencies ++= Seq(
"ch.acra" % "acra" % "4.9.0",
"io.card" % "android-sdk" % "5.3.0",
"com.hanhuy.android" %% "iota-pure" % "0.1",
"com.hanhuy.android" %% "iota" % "1.0.4",
"com.hanhuy.android" %% "scala-conversions" % conversionsVersion,
"com.hanhuy.android" %% "scala-conversions-design" % conversionsVersion,
"com.hanhuy.android" %% "scala-common" % "1.3",
"com.hanhuy.keepassj" % "keepassj" % "2.34.3" exclude("xpp3", "xpp3"),
"com.android.support" % "recyclerview-v7" % supportSdkVersion,
"com.android.support" % "design" % supportSdkVersion,
"com.android.support" % "appcompat-v7" % supportSdkVersion,
"com.google.android.gms" % "play-services-drive" % gmsVersion,
"com.google.android.gms" % "play-services-vision" % gmsVersion
)
proguardOptions ++=
"-keepclassmembers class scala.runtime.RichInt { ** until(); }" ::
"-dontwarn android.app.Notification" ::
"-dontwarn iota.Internal210**" ::
"-dontwarn javax.naming.**" ::
"-dontwarn com.google.common.**" ::
"-dontwarn sun.misc.Unsafe" ::
Nil
proguardOptions ++= IO.readLines(baseDirectory.value / "proguard-cardio.cfg")
proguardCache ++= "com.google.common" :: "org.bouncycastle" :: Nil
shrinkResources := true
proguardOptions += "-keep class scala.runtime.BoxesRunTime { *; }"
android.dsl.flavor("lite")(
name := "keepshare-lite",
applicationId := "com.hanhuy.android.keepshare.lite"
)
android.dsl.buildType("test")(
name := "keepshare-test",
extraResDirectories += baseDirectory.value / "src" / "androidTest" / "res",
debugIncludesTests := true,
applicationId := "com.hanhuy.android.keepshare.test",
mergeManifests := false,
proguardOptions ++= "-dontwarn **" ::
"-keep class android.support.test.** { *; }" ::
"-keepclasseswithmembers class * { @org.junit.Test <methods>; }" ::
"-keepclassmembers class scala.reflect.ScalaSignature { java.lang.String bytes(); }" ::
Nil,
instrumentTestRunner :=
"android.support.test.runner.AndroidJUnitRunner",
proguardCache += "android.support",
libraryDependencies ++=
"com.android.support.test" % "runner" % "0.3" ::
"com.android.support.test.espresso" % "espresso-core" % "2.2" ::
Nil
)
android.dsl.buildType("protify")(protifySettings:_*)
run <<= run in Android
android.dsl.apkExclude("LICENSE.txt")
android.Plugin.withVariant(keepshare, Some("protify"), None)