Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Generated source location #9

Closed
jacobtabak opened this issue Sep 16, 2014 · 6 comments
Closed

Generated source location #9

jacobtabak opened this issue Sep 16, 2014 · 6 comments

Comments

@jacobtabak
Copy link

Making a separate issue from this because it shouldn't be in the documentation issue...

Right now the generated source is in demo/igmodel/gen-src/main/java/com/instagram..., it should probably go in demo/build/generated/source/ig-gson/[variant]/com/instagram...

The current generated source is not flagged by the IDE as generated, so you can edit it and obviously it will be overwritten on next build. If you place the code in build/generated, you get a nice warning like this:

warning

@ttung
Copy link
Contributor

ttung commented Sep 16, 2014

When I put the generated sources in demo/igmodel/build/... Android Studio doesn't see it.

@jacobtabak
Copy link
Author

/build should be a sibling of /demo, not a child... here's an example of generated code from another annotation processor... (AndroidAnnotations)

example

@ttung
Copy link
Contributor

ttung commented Sep 16, 2014

No that's incorrect. The subproject's build directory should be inside the subproject's directory.

On Sep 16, 2014, at 12:11 PM, "Jacob Tabak" <notifications@github.commailto:notifications@github.com> wrote:

/build should be a sibling of /demo, not a child... here's an example of generated code from another annotation processor... (AndroidAnnotations)

[example]https://camo.githubusercontent.com/bf0592f141297ece0a452b8de64d221d13d38d8f/687474703a2f2f692e696d6775722e636f6d2f6d45596648344a2e706e67


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-55797332.

@jacobtabak
Copy link
Author

Ah yes you're right. And yes, the /build directory under igmodel seems to be invisible to Android Studio. Is that where you had the generated sources before?

@ttung
Copy link
Contributor

ttung commented Sep 16, 2014

Yup

On Sep 16, 2014, at 12:24 PM, "Jacob Tabak" <notifications@github.commailto:notifications@github.com> wrote:

Ah yes you're right. And yes, the /build directory under igmodel seems to be invisible to Android Studio. Is that where you had the generated sources before?


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-55799210.

@jacobtabak
Copy link
Author

I have never seen modules containing submodules in AS... maybe that is the
issue

On Tue, Sep 16, 2014 at 2:34 PM, ttung notifications@github.com wrote:

Yup

On Sep 16, 2014, at 12:24 PM, "Jacob Tabak" <notifications@github.com
mailto:notifications@github.com> wrote:

Ah yes you're right. And yes, the /build directory under igmodel seems to
be invisible to Android Studio. Is that where you had the generated sources
before?


Reply to this email directly or view it on GitHub<
https://github.com/Instagram/ig-json-parser/issues/9#issuecomment-55799210>.


Reply to this email directly or view it on GitHub
#9 (comment)
.

@ttung ttung closed this as completed Sep 16, 2014
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