replace android-plugin with android-sdk-plugin
This commit is contained in:
@@ -1,7 +1,16 @@
|
||||
import android.Keys._
|
||||
|
||||
import android.Dependencies.{apklib,aar}
|
||||
|
||||
android.Plugin.androidBuild
|
||||
|
||||
platformTarget in Android := "android-16"
|
||||
|
||||
name := "shadowsocks"
|
||||
|
||||
libraryDependencies ++= Seq(
|
||||
"com.google.android" % "support-v4" % "r12",
|
||||
"com.google.android" % "support-v4" % "18.0.0",
|
||||
"com.google.android" % "analytics" % "3.01",
|
||||
"com.google.android" % "admob" % "6.4.1",
|
||||
"dnsjava" % "dnsjava" % "2.1.5",
|
||||
"org.scalaj" %% "scalaj-http" % "0.3.10",
|
||||
"commons-net" % "commons-net" % "3.3",
|
||||
@@ -9,10 +18,11 @@ libraryDependencies ++= Seq(
|
||||
)
|
||||
|
||||
libraryDependencies ++= Seq(
|
||||
"com.actionbarsherlock" % "actionbarsherlock" % "4.4.0" artifacts(Artifact("actionbarsherlock", "apklib", "apklib")),
|
||||
"net.saik0.android.unifiedpreference" % "unifiedpreference" % "0.0.2" artifacts(Artifact("unifiedpreference", "apklib", "apklib")),
|
||||
"org.jraf" % "android-switch-backport" % "1.0" artifacts(Artifact("android-switch-backport", "apklib", "apklib")),
|
||||
"net.simonvt.menudrawer" % "menudrawer" % "3.0.4" artifacts(Artifact("menudrawer", "apklib", "apklib"))
|
||||
apklib("com.actionbarsherlock" % "actionbarsherlock" % "4.4.0"),
|
||||
apklib("net.saik0.android.unifiedpreference" % "unifiedpreference" % "0.0.2"),
|
||||
apklib("org.jraf" % "android-switch-backport" % "1.0"),
|
||||
apklib("net.simonvt.menudrawer" % "menudrawer" % "3.0.4"),
|
||||
"com.google.android.gms" % "play-services" % "4.4.52"
|
||||
)
|
||||
|
||||
libraryDependencies ++= Seq(
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
import sbt._
|
||||
import sbt.Keys._
|
||||
|
||||
import sbtandroid._
|
||||
import sbtandroid.AndroidPlugin._
|
||||
|
||||
object App {
|
||||
val version = "2.1.5"
|
||||
val versionCode = 66
|
||||
}
|
||||
|
||||
object General {
|
||||
|
||||
val settings = Defaults.defaultSettings ++ Seq (
|
||||
name := "shadowsocks",
|
||||
version := App.version,
|
||||
versionCode := App.versionCode,
|
||||
scalaVersion := "2.10.3",
|
||||
compileOrder := CompileOrder.JavaThenScala,
|
||||
platformName := "android-16",
|
||||
resolvers += "madeye-maven" at "http://madeye-maven-repository.googlecode.com/git",
|
||||
resolvers += "central-maven" at "http://repo.maven.apache.org/maven2"
|
||||
)
|
||||
|
||||
val pgOptions = Seq("-keep class android.support.v4.app.** { *; }",
|
||||
"-keep interface android.support.v4.app.** { *; }",
|
||||
"-keep class com.actionbarsherlock.** { *; }",
|
||||
"-keep interface com.actionbarsherlock.** { *; }",
|
||||
"-keep class org.jraf.android.backport.** { *; }",
|
||||
"-keep class com.github.shadowsocks.** { *; }",
|
||||
"-keep class * extends com.j256.ormlite.** { *; }",
|
||||
"-keepattributes *Annotation*")
|
||||
|
||||
val proguardSettings = Seq (
|
||||
useProguard := true,
|
||||
proguardOptions := pgOptions
|
||||
)
|
||||
|
||||
val miscSettings = Seq (
|
||||
cachePasswords := true
|
||||
)
|
||||
|
||||
lazy val fullAndroidSettings =
|
||||
General.settings ++
|
||||
AndroidPlugin.androidDefaults ++
|
||||
proguardSettings ++
|
||||
miscSettings
|
||||
}
|
||||
|
||||
object AndroidBuild extends Build {
|
||||
|
||||
val deploy = TaskKey[Unit]("deploy", "deploy to the build server")
|
||||
|
||||
val deployTask = deploy := {
|
||||
"./deploy target shadowsocks-compile-" + App.version + ".apk" !;
|
||||
println("Deploy successfully")
|
||||
}
|
||||
|
||||
lazy val main = Project (
|
||||
"shadowsocks",
|
||||
file("."),
|
||||
settings = General.fullAndroidSettings ++ Seq(deployTask)
|
||||
)
|
||||
}
|
||||
+1
-1
@@ -4,6 +4,6 @@ resolvers += Resolver.url("scalasbt releases", new URL("http://scalasbt.artifact
|
||||
|
||||
resolvers += Resolver.url("madeye private releases", new URL("http://madeye-maven-repository.googlecode.com/git/ivy"))(Resolver.ivyStylePatterns)
|
||||
|
||||
addSbtPlugin("org.scala-sbt" % "sbt-android" % "0.7.1-SNAPSHOT")
|
||||
addSbtPlugin("com.hanhuy.sbt" % "android-sdk-plugin" % "1.2.16")
|
||||
|
||||
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.1")
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.github.shadowsocks">
|
||||
package="com.github.shadowsocks"
|
||||
android:versionCode="66"
|
||||
android:versionName="2.1.5">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
@@ -23,11 +25,13 @@
|
||||
android:backupAgent=".ShadowsocksBackupAgent"
|
||||
android:label="@string/app_name">
|
||||
|
||||
<meta-data android:name="com.google.android.gms.version"
|
||||
android:value="@integer/google_play_services_version"/>
|
||||
<meta-data android:name="com.google.android.backup.api_key"
|
||||
android:value="AEdPqrEAAAAI_zVxZthz2HDuz9toTvkYvL0L5GA-OjeUIfBeXg"/>
|
||||
|
||||
<activity
|
||||
android:name="com.google.ads.AdActivity"
|
||||
android:name="com.google.android.gms.ads.AdActivity"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
|
||||
|
||||
<activity
|
||||
|
||||
@@ -58,7 +58,7 @@ import android.net.{Uri, VpnService}
|
||||
import android.webkit.{WebViewClient, WebView}
|
||||
import android.app.backup.BackupManager
|
||||
import scala.concurrent.ops._
|
||||
import com.google.ads.{AdRequest, AdSize, AdView}
|
||||
import com.google.android.gms.ads.{AdRequest, AdSize, AdView}
|
||||
import net.simonvt.menudrawer.MenuDrawer
|
||||
|
||||
import com.github.shadowsocks.database._
|
||||
|
||||
Reference in New Issue
Block a user