Most of our configuration happens in "afterEvaluate" as well, so your logic
changes the DSL object after we are done reading it. I don't know of any
way to "prepend" an action to afterEvaluate, so I can think of two
solutions:
1. Apply ci.gradle before applying the android plugin. This way your
afterEvaluate action will be queued first.
2. Simpler: remove the "afterEvalute" part from ci.gradle and put "apply
from: 'ci.gradle'" after your android block in build.gradle.
HTH,
Michal
On Friday, October 9, 2015 at 12:07:59 PM UTC+1, Csaba Kozák wrote:
>
> I want to override the Android versionCode property from an applied
> script file (as to keep the app script clean). This is what i am doing
> currently (i omitted anything unrelated):
>
> *build.gradle:*
>
> apply from: 'ci.gradle'
>
> android {
> defaultConfig {
> versionCode 1
> }}
>
> *ci.gradle:*
>
> project.afterEvaluate {
> project.android.defaultConfig.versionCode = 3434}
>
> But i still end up with versionCode being 1... What i am doing wrong?
>
--
You received this message because you are subscribed to the Google Groups
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.