This script creates a new sample and configures it as a new module in Android Studio. The IntelliJ project creates an .jar
artifact which is used to create new samples.
The script uses the sample Display Map
as a template to create a new sample. Here is the breakdown of the process of the .jar
executable:
- Sets up the path of the repository and the sample names used in the sample's package directory
- Creates the necessary files and folders using the template. Example:
build.gradle
,src/
,libs/
,README.metadata.json
,README.md
andproguard-rules.pro
- Removes unwanted files like
display-map.png
andbuild/
directory - Creates a blank
README.metadata.json
file - Updates the sample content to reflect the name of the sample. Example:
README.md
header, the build.gradle'sapplicationId
, the package name inAndroidManifest.xml
, theapp_name
instrings.xml
, the copyright year inMainActivity.kt
and so on. - Adds the sample module name to
settings.gradle
. The script adds the module name to the end of the gradle file.
Refer to the README.md
at arcgis-runtime-samples-android/tools/