Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

useProguard = false in version 0.60 and sbt 0.11 ? #65

Closed
weiju opened this issue Oct 10, 2011 · 6 comments
Closed

useProguard = false in version 0.60 and sbt 0.11 ? #65

weiju opened this issue Oct 10, 2011 · 6 comments

Comments

@weiju
Copy link

weiju commented Oct 10, 2011

Hi,
I was wondering how one would go about to set useProguard to false in V 0.60 and sbt 0.11 ? I noticed the default is true in AndroidBase, but my attempts to override it were all unsuccessful (other than setting the value directly and repackaging the plugin).

Thanks

@jberkel
Copy link
Owner

jberkel commented Oct 10, 2011

it needs to be scoped:

useProguard in Android := false

@jberkel jberkel closed this as completed Oct 10, 2011
@weiju
Copy link
Author

weiju commented Oct 10, 2011

Hi,

thanks for your reply. I actually tried that, with the setup below, based on a giter8-generated project. However this has no effect, the Proguard phase is executed (while I would have expected "Skipping Proguard").
In addition I also tried

val main = Project("MyProject", file("."), settings = General.fullAndroidSettings) settings(/* including settings with useProguard here */)

which did not have an effect either.

Best,

Wei-ju
===== SBT full configuration build.scala ====
import sbt._

import Keys._
import AndroidKeys._

object General {
val settings = Defaults.defaultSettings ++ Seq (
name := "MyProject",
version := "0.1",
scalaVersion := "2.9.1",
platformName in Android := "android-10",
useProguard in Android := true
)

lazy val fullAndroidSettings =
General.settings ++
AndroidProject.androidSettings ++
TypedResources.settings ++
AndroidMarketPublish.settings ++ Seq (
keyalias in Android := "change-me",
libraryDependencies += "org.scalatest" %% "scalatest" % "1.6.1" % "test"
)
}

object AndroidBuild extends Build {

lazy val main = Project (
"MyProject",
file("."),
settings = General.fullAndroidSettings
)

lazy val tests = Project (
"tests",
file("tests"),
settings = General.settings ++ AndroidTest.androidSettings
) dependsOn main
}

@jberkel
Copy link
Owner

jberkel commented Oct 11, 2011

it's probably an ordering issue. try setting useProguard after you add AndroidProject.androidSettings.

@weiju
Copy link
Author

weiju commented Oct 11, 2011

Setting it like below still invokes Proguard...

...
lazy val fullAndroidSettings =
General.settings ++
AndroidProject.androidSettings ++
TypedResources.settings ++
AndroidMarketPublish.settings ++ Seq (
keyalias in Android := "change-me",
libraryDependencies += "org.scalatest" %% "scalatest" % "1.6.1" % "test"
) ++ Seq(
useProguard in Android := true
)
....

@jberkel
Copy link
Owner

jberkel commented Oct 11, 2011

shouldn't it be

useProguard in Android := false

?

@weiju
Copy link
Author

weiju commented Oct 11, 2011

'tschuldigung, mein Fehler..

you are right, it works.

Thanks a lot !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants