Giter Site home page Giter Site logo

simplenetworks / cordova-androidx-build Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wf9a5m75/cordova-androidx-build

0.0 1.0 0.0 143 KB

This plugin migrates cordova application code for `AndroidX library`and `Android Support library` automatically

License: Apache License 2.0

JavaScript 100.00%

cordova-androidx-build's Introduction

Cordova AndroidX Build plugin

What is this plugin?

Google introduced AndroidX libraries which replaces old Android support libraries.

Since Cordova will introduce AndroidX from cordova-android@9, however your plugin needs to support both with AndroidX and without AndroidX.

This plugin migrates user's project code to AndroidX automatically when your plugin code is build at the time. If the project does not specify AndroidX, this plugin migrates the user's project code migrates Android Support Library.

How to use this plugin?

Just install this plugin

$ cordova plugin add cordova-androidx-build

Or use this plugin as dependency in your plugin.xml

<?xml version='1.0' encoding='utf-8'?>
<plugin ...>
  <platform name="android">
    ...
    <dependency id="cordova-androidx-build" />  <-- Add this line
  </platform>
</plugin>

How does this plugin work?

The purpose of this plugin is to build your plugin code on any environments. That's why this plugin has two migrates mode:

  • If AndroidX is not available: this plugin changes the project code migrates to support library.

  • If AndroidX is available: this plugin changed the project code migrates to AndroidX.

What's the difference between cordova-plugin-androidx-adapter?

cordova-plugin-androidx-adapter migrates your plugin code to AndroidX. This plugin also migrates your plugin code to AndroidX.

However cordova-plugin-androidx-adapter works on only your PC, because it uses Cordova Hook Script mechanism. Because of this, cordova-plugin-androidx-adapter does NOT work on cloud build services, such as PhoneGap Build.

In order to solve this problem, this plugin is written by Gradle script, which works on your PC or cloud build services.

cordova-plugin-androidx-adapter cordova-androidx-build
support library -> AndroidX
support library <- AndroidX
work on PC
work on cloud services
when execute the process after cordova prepare gradle sync
mechanism cordova hook script gradle

cordova-androidx-build's People

Contributors

marcorosetti avatar wf9a5m75 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.