From b5e79b5a4d8753718e726e0687671c60744ce8f4 Mon Sep 17 00:00:00 2001 From: Alexis THOMAS Date: Fri, 13 Aug 2021 04:28:47 +0200 Subject: [PATCH] doc: update README about development & testing (#1308) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: エリス --- README.md | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 435c01f2..982d72db 100644 --- a/README.md +++ b/README.md @@ -28,22 +28,44 @@ Cordova Android is an Android application library that allows for Cordova-based projects to be built for the Android Platform. Cordova based applications are, at the core, applications written with web technology: HTML, CSS and JavaScript. -[Apache Cordova](https://cordova.apache.org) is a project of The Apache Software Foundation (ASF). +[Apache Cordova](https://cordova.apache.org/) is a project of [The Apache Software Foundation (ASF)](https://apache.org/). ## Requirements -- Java Development Kit (JDK) 11 -- [Android SDK](https://developer.android.com/) +* Java Development Kit (JDK) 11 +* [Android SDK](https://developer.android.com/) +* [Node.js](https://nodejs.org) -## Cordova Android Developer Tools +## Create a Cordova project -Use the [Cordova command-line tool](https://www.npmjs.com/package/cordova) to create projects and install plugins. +Follow the instructions in the [**Create your first Cordova app**](https://cordova.apache.org/docs/en/latest/guide/cli/index.html) section of [Apache Cordova Docs](https://cordova.apache.org/docs/en/latest/) -## Using Android Studio +To use a **shared framework**, for example in development, link the appropriate cordova-android platform folder path: -1. Create a project -2. Import it via "Non-Android Studio Project" +```bash +cordova platform add --link /path/to/cordova-android +``` -## Running the Native Tests +## Updating a Cordova project -The `test/` directory in this project contains an Android test project that can be used to run different kinds of native tests. Check out the [README contained therein](test/README.md) for more details! +When you install a new version of the [`Cordova CLI`](https://www.npmjs.com/package/cordova) that pins a new version of the [`Cordova-Android`](https://www.npmjs.com/package/cordova-android) platform, you can follow these simple upgrade steps within your project: + +```bash +cordova platform rm android +cordova platform add android +``` + +## Debugging in Android Studio + +Import project in Android Studio through _File > Open_ and targeting `/path/to/your-cdv-project/platforms/android/`. + +## How to Test Repo Development + +```bash +npm install +npm test +``` + +## Further reading + +* [Apache Cordova](https://cordova.apache.org/)