• Stars
    star
    110
  • Rank 310,049 (Top 7 %)
  • Language
    JavaScript
  • Created about 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Cordova/Phonegap plugin to migrate any code which references the legacy Android Support Library to the new AndroidX mappings in a Cordova Android platform project.

cordova-plugin-androidx-adapter

If your Cordova project contains plugins/libraries which reference both the Android Support Library and AndroidX, your Android build will fail because the two cannot live side-by-side in an Android build.

This plugin provides a shim to migrate references to the legacy Android Support Library to the new AndroidX mappings in a Cordova Android platform project.

This enables a Cordova project for which AndroidX has been enabled (e.g. using cordova-plugin-androidx) to successfully build even if it contains plugins which reference the legacy Support Library.

The plugin uses a hook script to replace any legacy Support Library references:

  • Gradle artifacts in app/build.gradle and project.properties with new artifact mappings
  • Class/package names in AndroidManifest.xml or the Java source code (of Cordova plugins) with new class mappings.

donate

I dedicate a considerable amount of my free time to developing and maintaining this Cordova plugin, along with my other Open Source software. To help ensure this plugin is kept updated, new features are added and bugfixes are implemented quickly, please donate a couple of dollars (or a little more if you can stretch) as this will help me to afford to dedicate time to its maintenance. Please consider donating if you're using this plugin in an app that makes you money, if you're being paid to make the app, if you're asking for new features or priority bug fixes.

Requirements

This plugin requires a minimum of cordova@8 and cordova-android@8.

Installation

$ cordova plugin add cordova-plugin-androidx-adapter

IMPORTANT: This plugin relies on a Cordova hook script so will not work in Cloud Build environments such as Phonegap Build which do not support Cordova hook scripts.

WARNING: Do not install this plugin in a Cordova project in which AndroidX has not already been enabled or the build will fail.

Usage

Once the plugin is installed it will run on each after_prepare hook in the Cordova build lifecycle, scanning and migrating any references to legacy Support Library entries in the build.gradle or Java source code.

Note: this plugin operates only during the build process and contains no code which is bundled with or executed inside of the resulting Android app produced by the Cordova build process.

Enabling AndroidX

If AndroidX is not already enabled in your Cordova project you can persistently enable it in your Cordova Android platform project by installing my cordova-plugin-androidx plugin.

License

The MIT License

Copyright (c) 2019 Dave Alden / Working Edge Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

phonegap-launch-navigator

Phonegap/Cordova plugin which launches native route navigation apps for Android, iOS and Windows
Objective-C
368
star
2

cordova-custom-config

Cordova/Phonegap plugin to update platform configuration files based on preferences and config-file data defined in config.xml
JavaScript
317
star
3

cordova-android-support-gradle-release

Cordova/Phonegap plugin to align various versions of the Android Support libraries specified by other plugins to a specific version
JavaScript
230
star
4

cordova-check-plugins

A CLI tool to check for / manage plugin updates in Cordova/Phonegap projects.
JavaScript
216
star
5

react-native-launch-navigator

A React Native module for launching today's most popular navigation/ride apps to navigate to a destination.
Java
120
star
6

cordova-android-play-services-gradle-release

Cordova/Phonegap plugin for Android to align versions of the Play Services library components specified by other plugins to a specific version.
JavaScript
110
star
7

cordova-plugin-request-location-accuracy

Cordova/Phonegap plugin for Android and iOS to request enabling/changing of Location Services by triggering a native dialog
Java
95
star
8

cordova-launch-review

Cordova/Phonegap plugin for iOS and Android to assist in leaving user reviews/ratings in the App Stores
Objective-C
70
star
9

cordova-sqlite-porter

Cordova/Phonegap plugin to import/export a SQLite database using either SQL or JSON.
JavaScript
66
star
10

cordova-plugin-androidx

Cordova/Phonegap plugin to enable AndroidX
JavaScript
43
star
11

cordova-plugin-firebasex-test

A Cordova app project to test cordova-plugin-firebasex
JavaScript
34
star
12

phonegap-launch-navigator-example

Example project illustrating how to use the Cordova Launch Navigator plugin for Android/iOS/Windows
JavaScript
31
star
13

cordova-android-firebase-gradle-release

Cordova/Phonegap plugin for Android to align versions of the Firebase library components specified by other plugins to a specific version.
JavaScript
28
star
14

phonegap-istablet

Cordova/Phonegap plugin to determine if current device is a tablet
Objective-C
27
star
15

cordova-custom-config-example

An example Cordova/Phonegap project that demonstrates use of the cordova-custom-config plugin
JavaScript
24
star
16

cordova-plugin-crosswalk-data-migration

Cordova/Phonegap plugin for Android to preserve persistent webview data after removing Crosswalk from your app.
Java
23
star
17

cordova-plugin-inappbrowser-popup-bridge

A fork of cordova-plugin-inappbrowser which adds Braintree's PopupBridge functionality to support PayPal payments
Objective-C
22
star
18

cordova-diagnostic-plugin-example

Demonstrates use of Diagnostic plugin
JavaScript
19
star
19

cordova-plugin-inappbrowser-wkwebview

[DEPRECATED] A fork of cordova-plugin-inappbrowser which is powered by WKWebView
Objective-C
15
star
20

cordova-plugin-hello-kotlin

A simple example of a Cordova plugin that uses Kotlin on Android
JavaScript
13
star
21

cordova-plugin-request-location-accuracy-example

An example app that demonstrates use of cordova-plugin-request-location-accuracy
JavaScript
10
star
22

cordova-plugin-inappbrowser-test

JavaScript
7
star
23

cordova-plugin-firebasex-ionic3-test

CSS
6
star
24

cordova-plugin-hello-c-test

Test project for cordova-plugin-hello-c
JavaScript
5
star
25

cordova-plugin-inappbrowser-popup-bridge-test

Demonstrates usage of Braintree's PopupBridge via the Cordova InappBrowser to add support for emulated popups for PayPal payments
JavaScript
5
star
26

cordova-launch-review-example

Example project illustrating how to use the cordova-launch-review Cordova/Phonegap plugin for Android/iOS
HTML
4
star
27

cordova-sqlite-porter-example-native-plugin

JavaScript
3
star
28

cordova-plugin-config-command

Cordova/Phonegap plugin to run CLI commands defined in config.xml
JavaScript
3
star
29

cordova-sqlite-porter-example

JavaScript
2
star
30

stereoscopic-slideshow

Example slideshow to render stereoscopic side-by-side images in 3D using a VR headset
JavaScript
2
star
31

cordova-diagnostic-plugin-ionic-example

Demonstrates use of Diagnostic plugin with Ionic framework
TypeScript
2
star
32

cordova-plugin-cloud-settings-test

An example project that illustrates usage of the cordova-plugin-cloud-settings plugin.
JavaScript
1
star
33

cordova-plugin-inappbrowser-wkwebview-test

Test app project for cordova-plugin-inappbrowser-wkwebview
HTML
1
star