Skip to content
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:set-{debug,release} does not apply to all projects in multiproject builds #220

Open
aafa opened this issue Nov 4, 2015 · 4 comments

Comments

@aafa
Copy link
Contributor

aafa commented Nov 4, 2015

It looks like lib project BuildConfig being updated with incorrect values.

After app/packageRelease I have this files generated

app/target/../
├── core
│   └── R.java
└── app
    ├── BuildConfig.java  (DEBUG = false)
    ├── Manifest.java
    ├── R.java
    └── TR.scala

core/target/../
└── core
    ├── BuildConfig.java  (DEBUG = true)
    ├── Manifest.java
    ├── R.java
    └── TR.scala

So last file have incorrect debug flag and doesnt have variants values.

@pfn
Copy link
Member

pfn commented Nov 4, 2015

Variant info from app does not transfer to core, this is expected behavior and will not change.

Release mode must manually be toggled in core at the moment. core/android:set-release, this can possibly be fixed.

@aafa
Copy link
Contributor Author

aafa commented Nov 4, 2015

this can possibly be fixed

I'd like to work on this if you don't mind.
The problem is I'm not fully understand where should I start. I see this fragment https://github.com/pfn/android-sdk-plugin/blob/2909d55578bdd70d2995f8190fef83ed0b96572e/src/tasks.scala#L92-L103 and it looks like at this moment lib's BuildConfig should be populated with values but it's not happening.

So is this the right starting point?

@aafa
Copy link
Contributor Author

aafa commented Nov 4, 2015

Follow-up question: Is it possible to attach IDEA's debugger to sbt plugin tests (sbt scripted)?

@aafa
Copy link
Contributor Author

aafa commented Nov 5, 2015

As a quick workaround I added this shortcuts to my build.sbt

addCommandAlias("release", ";core/android:set-release;android:packageRelease")
addCommandAlias("d", ";core/android:set-debug;run")

@pfn pfn changed the title BuildConfig.java problems in multiproject android:set-{debug,release} does not apply to all projects in multiproject builds Nov 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants