Home | History | Annotate | only in /prebuilts/tools/common/m2
Up to higher level directory
NameDateSize
Android.mk24-Aug-2016798
readme.txt24-Aug-20161.6K
repository/24-Aug-2016

readme.txt

      1 repository/ is a maven repository with libraries used to perform
      2 certain tasks without accessing an external repository. e.g:
      3  - Compile tools/base, tools/swt and tools/buildSrc using Gradle
      4  - Convert artifacts from a maven repository to a p2 repository
      5    using the p2-maven plugin
      6 
      7 Certain dependencies are using only during the build process,
      8 but others are runtime dependencies that get shipped with the 
      9 SDK Tools. Such runtime dependencies must include a NOTICE file
     10 next to the artifact or the build will fail.
     11 
     12 There are a few different ways to add artifacts to these repositories:
     13 
     14 1. Add a dependency to an existing project in tools/base, say ddmlib,
     15    and then run the cloneArtifacts task from the tools folder. 
     16 
     17 2. Invoke the maven-install-plugin from the command line. For example,
     18    the following command was used to install the protobuf jar into
     19    the repository:
     20     $ mvn org.apache.maven.plugins:maven-install-plugin:2.5.1:install-file \
     21         -Dfile=$OUT/host-libprotobuf-java-2.3.0-lite.jar \
     22         -DgroupId=com.android.tools.external \
     23         -DartifactId=libprotobuf-java-lite \
     24         -Dversion=2.3.0 \
     25         -Dpackaging=jar \
     26         -DgeneratePom=true \
     27         -DlocalRepositoryPath=repo \
     28         -DcreateChecksum=true
     29 
     30 3. Adding all the dependencies for a maven plugin can be accomplished
     31    as follows:
     32      - Create a maven settings.xml file with a pointer to an empty
     33        folder as the localRepository.
     34      - Run the maven task using that settings.xml
     35      - When the task runs, all the necessary artifacts will be downloaded
     36        into that local repository.
     37      - Copy over the contents of that repository into this folder.
     38