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

Resolve issue with plugin target-dir="app*" subdirs #572

Merged
merged 3 commits into from
Nov 22, 2018

Conversation

brodycj
Copy link
Contributor

@brodycj brodycj commented Nov 22, 2018

(subdirectories) such as "appco", with unit tests to verify correct operation

Needed for @katzer plugins that use de/appplant subdirectory, for example:

Also needed for cordova-plugin-inappbrowser

Resolves #571

such as "appco", with unit tests to verify

Needed for @katzer plugins that use de/appplant subdirectory,
for example:
* cordova-plugin-local-notifications
* cordova-plugin-badge
* cordova-plugin-background-mode

Co-authored-by: Christopher J. Brody <[email protected]>
Co-authored-by: Julio César <[email protected]>
@kamilbrk
Copy link

FYI the inappbrowser plugin is affected, does not load at all on 7.1.3

@codecov-io
Copy link

Codecov Report

Merging #572 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #572   +/-   ##
=======================================
  Coverage   62.11%   62.11%           
=======================================
  Files          17       17           
  Lines        1985     1985           
  Branches      371      371           
=======================================
  Hits         1233     1233           
  Misses        752      752
Impacted Files Coverage Δ
bin/templates/cordova/lib/pluginHandlers.js 87.13% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a014228...688bf03. Read the comment docs.

@janpio janpio changed the title Resolve issue with plugin target-dir "app*" subdirectories such as "appco" Fix issue with plugin target-dir "app*" subdirectories such as "appco" Nov 22, 2018
@brodycj
Copy link
Contributor Author

brodycj commented Nov 22, 2018

Thanks @janpio for the review. I got a call in 5 minutes, will test with more plugins and merge afterwards.

@brodycj
Copy link
Contributor Author

brodycj commented Nov 22, 2018

And thanks to @kamilbrk for pointing out the issue with cordova-plugin-inappbrowser.

@brodycj
Copy link
Contributor Author

brodycj commented Nov 22, 2018

Tested in a new Cordova project

reproduced using cordova-android@latest (7.1.3)

  • cordova platform add android@latest
  • cordova plugin add cordova-plugin-inappbrowser

then the plugin Java files were incorrectly installed in the following relative directory path: platforms/android/src/org/apache/cordova/inappbrowser

Verified on proposed bug fix

  • cordova platform add https://github.com/brodybits/cordova-android#app-subdir-bugfix (based on the master branch, which includes bleeding-edge updates for Cordova 9)
  • cordova plugin add cordova-plugin-inappbrowser

then the plugin Java files are correctly installed in the following relative directory path: platforms/android/app/src/main/java/org/apache/cordova/inappbrowser

I also tested that cordova-plugin-inappbrowser Java files install correctly on [email protected].

Merging now.

P.S. Some additional testing done after merge:

Tried cordova-plugin-badge with 7.1.3, https://github.com/apache/cordova-android#master, and 7.1.2

Reproduced issue on 7.1.3, resolved on https://github.com/apache/cordova-android#master, no issue observed on 7.1.2.

@brodycj brodycj changed the title Fix issue with plugin target-dir "app*" subdirectories such as "appco" Resolve issue with plugin target-dir "app*" subdirectories such as "appco" Nov 22, 2018
@brodycj brodycj changed the title Resolve issue with plugin target-dir "app*" subdirectories such as "appco" Resolve issue with plugin target-dir "app*" subdirs Nov 22, 2018
@brodycj brodycj changed the title Resolve issue with plugin target-dir "app*" subdirs Resolve issue with plugin target-dir="app*" subdirs Nov 22, 2018
@brodycj brodycj merged commit ef24341 into apache:master Nov 22, 2018
@brodycj brodycj deleted the app-subdir-bugfix branch November 22, 2018 13:59
brodycj pushed a commit to brodycj/cordova-android that referenced this pull request Nov 22, 2018
(subdirectories) such as "appco", with unit tests to verify

Needed for @katzer plugins that use de/appplant subdirectory,
for example:
* cordova-plugin-local-notifications
* cordova-plugin-badge
* cordova-plugin-background-mode

Also needed for cordova-plugin-inappbrowser

Co-authored-by: Christopher J. Brody <[email protected]>
Co-authored-by: Julio César <[email protected]>
Co-authored-by: Jan Piotrowski <[email protected]>
@brodycj brodycj mentioned this pull request Nov 22, 2018
brodycj pushed a commit to brodycj/cordova-android that referenced this pull request Nov 23, 2018
Use startsWith instead of `includes` to check for remapping of
`target-dir` that starts with `libs` or `src/main`

(Followup to PR apache#572)
brodycj pushed a commit to brodycj/cordova-android that referenced this pull request Nov 23, 2018
Use `startsWith` instead of `includes` to check for remapping of
`target-dir` that starts with `libs` or `src/main`

(Followup to PR apache#572)
@brodycj
Copy link
Contributor Author

brodycj commented Nov 23, 2018

7.1.4 patch release is now published to resolve the issue.

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

Successfully merging this pull request may close these issues.

4 participants