--
You received this message because you are subscribed to the Google Groups "Maven Android Developers" group.
To post to this group, send email to maven-androi...@googlegroups.com.
To unsubscribe from this group, send email to maven-android-deve...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/maven-android-developers?hl=en.
> I have mine setup to do a android:deploy on mvn install... So I create my project using the archetype, do an initial mvn install, then open the project in IntelliJ. That ensures that the 'R' stuff is detected and setup properly. If I open it before the initial install it sometimes makes me set it up manually. When I open the project, it tries to autodetect the android facet, and I ignore that. If I let it see the android facet, it assumes eclipse-style android paths. At that point, the mvn plugin seems to work just fine (I can right-click on "install" for example).
Well, how do you access LogCat, the remote debugger, resource code completion, the deployment selector, etc? It seems you are only using IntelliJ as a Maven goal-starter if you do not configure an Android facet. Does anyone use an IntelliJ Android project module with the Maven plugin?
--
> Resource code completion works.
I've tried your archetype and I can see how it configures the paths. However, without an IntelliJ Android facet, I do not get code completion in the resource XML files. The schema http://schemas.android.com/apk/res/android is only available when I have an Android facet.
--
> If you create layouts, strings, etc and compile it does autocomplete from within Java.
I don't even get that working without an Android facet.
> To autocomplete from within the XML, we'd need to actually have the schema. Anyone know where the XSD actually is?
There is an org.jetbrains.android/android.xsd in the IntelliJ plugin library but its contents are "<x xmlns="http://schemas.android.com/apk/res/android"/>" which looks like a stub. So I'm assuming the actual validation/completion done by the Android IntelliJ plugin is all internal within code.
I think this is not the right way to go, we should look into making the Android facet compatible with a Maven lifecycle/build and find out what needs to be done there. Then probably open bug reports with Jetbrains to get it fixed.
http://youtrack.jetbrains.net/issue/IDEA-56050
> I think this is not the right way to go, we should look into making the Android facet compatible with a Maven lifecycle/build and find out what needs to be done there. Then probably open bug reports with Jetbrains to get it fixed.
Coming back to this, it really seems to be the blocking issue. (Manfred just posted about it as well, the current solution is to delete the directories or paths in the module settings after every Maven project import/run so the Android facet can continue doing its own thing.)
Looking at _why_ the combined-resources directory in the /target/generated-sources/ is populated, I don't fully understand that. I think we have to show why this is necessary so the Jetbrains guys can adapt their plugin accordingly.
Can anyone explain the purpose and procedure in GenerateSourcesMojo.java#extractSourceDependencies() please? I will then summarize it and suggest solutions on the IntelliJ issue report.
P.S. Yes, I'm new to Android development ;)
--
You received this message because you are subscribed to the Google Groups "Maven Android Developers" group.
To post to this group, send email to maven-androi...@googlegroups.com.
To unsubscribe from this group, send email to maven-android-deve...@googlegroups.com.
Not sure where it is but at least I cant find it in the android jar at
first glance..
> Android facet compatible with a Maven lifecycle/build and find out what
> needs to be done there. Then probably open bug reports with Jetbrains to
> get it fixed.
Well.. the plugin is defining its own lifecycle, which it has to do
because of how android builds work. If the android facet can understand
the custom lifecycle it should be able to understand the rest.
I think if Jetbrains looks at this and reads some of the config in the pom
for use with the facet it should work fine..
manfred
Anyway.. the issue just got assigned to a developer!
manfred
> I'm not sure I completely understand. I never have to delete anything.
>
> Actually, I just opened my project (again, remember I am not using the
> facet) and I do get completion in both java and xml (tested both
> AndroidManifest.xml and main.xml). The only thing I am really lacking
> IMHO
> is the debugger.
>
>
> Malachi de �lfweald
>> maven-android-deve...@googlegroups.com<maven-android-developers%2Bunsu...@googlegroups.com>
I missed http://code.google.com/p/maven-android-plugin/wiki/ApkSourcesDependency before so now I understand why the /combined-resources/ directory exists. I've added a comment to the Jetbrains ticket, please correct me if I'm wrong about this.
Unfortunately, the only short-term solution I see is:
- The maven-android-plugin should not use the target/../combined-resources/ directory at all for a single-module Maven project (no dependency of type "apksources" exists).
- Such a project will work with the current IntelliJ Android facet.
- Multi-module projects and "apksources" dependencies, where a target/.../combined-resources/ directory and the inheritance/copying procedure is necessary, will just not work with the Android facet.
I suggest we wait and see what the Jetbrains guys think about this and if they want to add the "apksources" procedure to the facet. If they don't, the maven-android-plugin should be changed accordingly so we get at least single-module non-apksources integration.
> target/../combined-resources/?
>
> mine is under target/generated-sources/combined-resources
>
> nothing should be getting dropped into target/..
Sorry, make that ... three dots. I was getting tired of repeating the whole path :)
--
Great explanation and suggestions for improvement. I am fine with your
suggestions. Going forward I would also like to see more optional smarts
being built into the plugin.
E.g. version, package and name in android manifest from pom
and especially in terms of modules it would be great if e.g. strings.xml
and all other resource files from multiple projects could be merged
smartly. That might be a bigger undertaking though...
manfred
The problem with using resource filtering is that ADT wont have a clue
then. If we leave it intact and just use e.g. the plugin code base or a
groovy script to keep the files in sync it might cause less integration
issues..
>> and especially in terms of modules it would be great if e.g. strings.xml
>> and all other resource files from multiple projects could be merged
>> smartly. That might be a bigger undertaking though...
>
>
> This will actually be a bonus feature with the new library function as
> I described above. If you pass each resource folder to aapt
> individually (instead of combining all the files in one folder, like
> today) aapt will merge the resources, not the files. Each string in
> strings.xml is a resource of its own. Thus, all strings from all
> strings.xml will be included. If the same string is defined in several
> strings.xml the main project will take precedence.
That sounds awesome. i take it you are working on it ;-)