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

refactor!: remove most platform binaries #1100

Merged
merged 14 commits into from
Jul 6, 2021
Merged
16 changes: 1 addition & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,7 @@ Cordova Android is an Android application library that allows for Cordova-based

## Cordova Android Developer Tools

We recommend using the [Cordova command-line tool](https://www.npmjs.com/package/cordova) to create projects and be able to easily install plugins.

However, the following scripts can be used instead:

./bin/create [path package activity] ... creates the ./example app or a cordova android project
./bin/check_reqs ....................... checks that your environment is set up for cordova-android development
./bin/update [path] .................... updates an existing cordova-android project to the version of the framework

These commands live in a generated Cordova Android project. Any interactions with the emulator require you to have an AVD defined.

./cordova/clean ........................ cleans the project
./cordova/build ........................ calls `clean` then compiles the project
./cordova/log ........................ streams device or emulator logs to STDOUT
./cordova/run ........................ calls `build` then deploys to a connected Android device. If no Android device is detected, will launch an emulator and deploy to it.
./cordova/version ...................... returns the cordova-android version of the current project
Use the [Cordova command-line tool](https://www.npmjs.com/package/cordova) to create projects and install plugins.

## Using Android Studio

Expand Down
26 changes: 0 additions & 26 deletions bin/android_sdk_version.bat

This file was deleted.

32 changes: 0 additions & 32 deletions bin/check_reqs

This file was deleted.

26 changes: 0 additions & 26 deletions bin/check_reqs.bat

This file was deleted.

61 changes: 0 additions & 61 deletions bin/create

This file was deleted.

26 changes: 0 additions & 26 deletions bin/create.bat

This file was deleted.

17 changes: 0 additions & 17 deletions bin/lib/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,23 +144,6 @@ function copyScripts (projectPath) {

const nodeModulesDir = path.join(ROOT, 'node_modules');
if (fs.existsSync(nodeModulesDir)) fs.copySync(nodeModulesDir, path.join(destScriptsDir, 'node_modules'));

fs.copySync(path.join(bin, 'check_reqs'), path.join(destScriptsDir, 'check_reqs'));
fs.copySync(path.join(bin, 'check_reqs.bat'), path.join(destScriptsDir, 'check_reqs.bat'));
fs.copySync(path.join(bin, 'android_sdk_version'), path.join(destScriptsDir, 'android_sdk_version'));
fs.copySync(path.join(bin, 'android_sdk_version.bat'), path.join(destScriptsDir, 'android_sdk_version.bat'));

var check_reqs = path.join(destScriptsDir, 'check_reqs');
var android_sdk_version = path.join(destScriptsDir, 'android_sdk_version');

// TODO: the two files being edited on-the-fly here are shared between
// platform and project-level commands. the below is updating the
// `require` path for the two libraries. if there's a better way to share
// modules across both the repo and generated projects, we should make sure
// to remove/update this.
const templatesCordovaRegex = /templates\/cordova\//;
utils.replaceFileContents(android_sdk_version, templatesCordovaRegex, '');
utils.replaceFileContents(check_reqs, templatesCordovaRegex, '');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
under the License.
*/

var android_sdk = require('./templates/cordova/lib/android_sdk');
var android_sdk = require('./lib/android_sdk');

android_sdk.print_newest_available_sdk_target().catch(err => {
console.error(err);
Expand Down
51 changes: 0 additions & 51 deletions bin/templates/cordova/build

This file was deleted.

26 changes: 0 additions & 26 deletions bin/templates/cordova/build.bat

This file was deleted.

51 changes: 0 additions & 51 deletions bin/templates/cordova/clean

This file was deleted.

26 changes: 0 additions & 26 deletions bin/templates/cordova/clean.bat

This file was deleted.