cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-11244) Update Android Project Structure to be more compatible with Android Studio
Date Fri, 23 Jun 2017 20:24:01 GMT


ASF GitHub Bot commented on CB-11244:

Github user filmaj commented on a diff in the pull request:
    --- Diff: bin/templates/cordova/Api.js ---
    @@ -81,10 +83,13 @@ function Api(platform, platformRootDir, events) {
         // XXX Override some locations for Android Studio projects
         if(AndroidStudio.isAndroidStudioProject(self.root) === true) {
           selfEvents.emit('log', 'Android Studio project detected');
    +      this.builder='studio';
           this.android_studio = true;
           this.locations.configXml = path.join(self.root, 'app/src/main/res/xml/config.xml');
    -      this.locations.strings = path.join(self.root, 'app/src/main/res/xml/strings.xml');
    +      this.locations.strings = path.join(self.root, 'app/src/main/res/values/strings.xml');
           this.locations.manifest = path.join(self.root, 'app/src/main/AndroidManifest.xml');
    +      //We could have Java Source, we could have other languages
    +      this.locations.javaSrc = path.join(self.root, 'app/src/main/java/');
    --- End diff --
    Same sort of deal, we could push the responsibility for figuring out the locations to
the builders, rather than have the Api function worry about each possible implementation of
a project structure.

> Update Android Project Structure to be more compatible with Android Studio
> --------------------------------------------------------------------------
>                 Key: CB-11244
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: cordova-android
>            Reporter: Joe Bowser
>            Assignee: Joe Bowser
>              Labels: CordovaAndroidSix
> Currently our existing Android projects have the old Android Project structure created
by default, even for new projects, which makes no sense since we no longer support Eclipse
as the default project editor and have moved to Android Studio for Android development.
> The main reason for doing this is to clean up dependencies and to allow for projects
and dependencies to work more like how modern Android projects work and to remove as much
custom Gradle code as possible.  This would also allow us in the future to move towards having
Android Plugin code work as Android Libraries with Resources instead of just copying things
across, which gives us the ability to add JUnit tests and bundled resources.  This would dramatically
increase the quality of plugins such as InAppBrowser, and third party plugins such as the
Barcode Scanner.
> This would have to be done on the next major version, and the upgrade would be tricky
to do.  However, the benefits at this point would greatly outweigh the costs of maintaining
the old project structure.  The old cordova-common code in Cordova-Android 5.0.x would allow
for plugins in the short term to work with both projects until we get the new project structure

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message