doc: update README about development & testing (#1308)

Co-authored-by: エリス <erisu@users.noreply.github.com>
This commit is contained in:
Alexis THOMAS 2021-08-13 04:28:47 +02:00 committed by GitHub
parent 5db850890d
commit b5e79b5a4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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/)