https://github.com/iandarwin/mvn-archetype-android
Maven Archetype for Maven-Eclipse-Gradle-Studio-buildable Android
https://github.com/iandarwin/mvn-archetype-android
android android-development maven-archetype
Last synced: about 2 months ago
JSON representation
Maven Archetype for Maven-Eclipse-Gradle-Studio-buildable Android
- Host: GitHub
- URL: https://github.com/iandarwin/mvn-archetype-android
- Owner: IanDarwin
- License: bsd-2-clause
- Created: 2017-03-26T20:56:32.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-27T16:53:08.000Z (about 8 years ago)
- Last Synced: 2025-01-15T14:41:24.849Z (3 months ago)
- Topics: android, android-development, maven-archetype
- Language: Shell
- Size: 67.4 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= mvn-archetype-android
This Archetype creates an Android project that can be built with Maven, Eclipse, Gradle, or Android Studio.
== Why?
Why *another* Maven Android archetype? There may be better ones out there... I just wanted one I could keep up-to-date _and_ that I could tailor to make projects that work on all of Eclipse, Maven, Gradle and Android Studio.
== Usage
First, until I get this onto Maven Central, just grab the source project and do `mvn install`.
Just run `mvn archetype:generate` as usual. Here's an example.
----
mvn archetype:generate \
-DarchetypeGroupId=com.darwinsys \
-DarchetypeArtifactId=mvn-archetype-android \
-DarchetypeVersion=1.0.0-SNAPSHOT \
-DgroupId=com.example123 \
-DartifactId=android123 \
-Dversion=1.0.0-SNAPSHOT \
-DinteractiveMode=false
----This can be run using `scripts/basic.sh` under *Nix, but you'll want to change the groupId and artifactId
before running.The file `scripts/androidproject` uses the shell builtin getopts to parse arguments
and can be run as follows:----
scripts/androidproject [-g groupId][-p packageName][-d parentDirectory] artfactName
----e.g.,
----
scripts/androidproject -d /tmp -g com.example demoproject54
----== PreReqs for Generated Project
For Maven or Eclipse, you must have extracted the Android SDK into Maven format using the
maven-android-installer.For Eclipse, as above, plus, you must have AndMore and M2E in your install (get it from Help->Eclipse Market Client).
For Gradle or Android Studio, it may "just work", though it will demand to upgrade the project if you've
been using your Studio installation for more than 2.5 hours.== Arguments
When running `mvn archetype:generate` you can optionally change the package name with e.g., `-Dpackage=com.example`.
The default package name is derived from the `groupId` parameter.