-
-
Notifications
You must be signed in to change notification settings - Fork 421
Android: move AndroidBuildConfig to AndroidModule #6145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android: move AndroidBuildConfig to AndroidModule #6145
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this get marked as deprecated instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was experimental, so we can avoid duplications. But remember to update the examples
| def androidBuildConfigMembers: T[Seq[String]] = Task { | ||
| val buildType = if (androidIsDebug()) "debug" else "release" | ||
| Seq( | ||
| s"boolean DEBUG = ${androidIsDebug()}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would having a Map[String,Any] and then parse it, be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's ok for now, but ; are missing from what I see
|
Some thoughts Like in the case of I don't know if having a task like override def generatedSources: T[Seq[PathRef]] = Task{
super.generatedSources() ++
Task.traverse(Seq(
(androidGeneratedBuildConfigSources, enableBuildConfig),
// More (task, boolean) tuples
)) {
case (task, enabled) =>
if (enabled) task else Task.Anon(Seq.empty)
}().flatten
}(or something easier 😅) would be something that made sense. |
|
lgtm |
vaslabs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waiting for some build config fixes
|
BuildConfigs for normal (non-app) modules have different fields. (e.g. |

Resolves #6141
Motivation
packagefield in the generated configChanges
enableBuildConfigflag, which defaults to true (like gradle's).androidNamespaceapplicationID