[ https://issues.apache.org/jira/browse/CB-13386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16191030#comment-16191030 ]
Jan Piotrowski (Sujan) commented on CB-13386: --------------------------------------------- So I looked at the PR. It is a really great one, but won't help in my case: I didn't clearly articulate one of my requirements above. Sorry. The module code should be _outside_ of the generated Cordova Android project (which is what `project(':module-androidTest').projectDir = new File("../module-tests")` allows in my example above) so it can be versioned together with my `www` folder. Doing it via a plugin would "bake" the test module into the project again. What I am trying to do is basically this: https://android-developers.googleblog.com/2015/07/get-your-hands-on-android-studio-13.html, Scroll to "APK Tests in Modules" > How to add native module to Cordova Android project? > ---------------------------------------------------- > > Key: CB-13386 > URL: https://issues.apache.org/jira/browse/CB-13386 > Project: Apache Cordova > Issue Type: Wish > Components: cordova-android > Reporter: Jan Piotrowski (Sujan) > Assignee: Joe Bowser > Priority: Minor > > I want to add a native (integration test) module to a Cordova Android project > - and have the module code _outside_ of the Cordova Android project. > I got it working manually by adding this to `settings.gradle`: > {quote} > include ':module-androidTest' > project(':module-androidTest').projectDir = new File("../module-tests") > {quote} > For native projects I would now just commit and be done with it. But for > Cordova I of course don't really want to mess with the generated Android > project as some of these changes might be lost on recompile etc - line 1 of > `settings.gradle` even says "// GENERATED FILE - DO NOT EDIT" :( > Is there any other way to add additional modules to a Cordova Android project? > ---- > Can I somehow do this with `build-extras.gradle`? (I don't think so as > settings.gradle is several steps before build-extras and build.gradle, right?) > StackOverflow suggest manually editing a `GradleBuilder.js` file: > https://stackoverflow.com/a/35504783/252627 But of course this would get lost > each time I completely generate a new Cordova project. Not a good idea, > correct? > Can I maybe work around this somehow via a Cordova plugin? I know these can > load frameworks etc - maybe also a module somehow? > Something else? -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org