Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why aren't the Android SDK Jars in any Maven Repository?

Is there any reason that the Android toolchain and development jars aren't in the Maven CEntral repository? Is it really just that no one has done it? or are there some licensing issues? I mean it's all open source right? (except for the Google APIs).

I'm tempted to put it up myself in a non central repo, but I just want to be sure that someone else hasn't done it yet and that I won't be corresponding or playing telephone tag with any lawyers as a result.

like image 939
shemnon Avatar asked Mar 09 '11 22:03

shemnon


People also ask

Where are jars from maven?

Maven's local repository is a directory on the local machine that stores all the project artifacts. When we execute a Maven build, Maven automatically downloads all the dependency jars into the local repository. Usually, this directory is named . m2.

What is jar maven repository?

What is a Maven Repository? In Maven terminology, a repository is a directory where all the project jars, library jar, plugins or any other project specific artifacts are stored and can be used by Maven easily.

Can we add external jar in Maven project?

Approach 2: Include jar as part of the maven project. In this approach you need to first create a folder in your maven project & add your external jar file. Once the jar file is added, include the jar file in your pom using following notation.


2 Answers

Google blocked it. From this link:

The Android artifacts have been built and published to the Maven repository through the efforts of the Android for Maven project. Google prevented the official Android jars from being uploaded to Maven, so the, third party, Android for Maven project was started to provide an API compatible Android artifact that could be uploaded to the Maven repository. There are now artifacts for each major Android version available in the Maven repository. These are not functional, however, and only provide stubbed implementations of the API. All methods in all classes throw a runtime exception. Because an Android app runs on a device, it will never use these libraries for execution, but the API compatibility allows an app to be compiled as if it were the real library.

like image 126
thomaux Avatar answered Sep 25 '22 13:09

thomaux


Google now has an official maven repository announced at Google IO 2017.

buildscript {     repositories {         maven {           // Google Maven Repository           url 'https://maven.google.com'         }     }     ... } 

What's New in Android Support Library (Google I/O '17)
https://youtu.be/V6-roIeNUY0?t=3m34s

What's New in Android Development Tools (Google I/O '17)
https://youtu.be/Hx_rwS1NTiI?t=20m05s

Google's Maven repository
https://developer.android.com/studio/build/dependencies.html#google-maven

Migrate to the New Plugin
https://developer.android.com/studio/preview/features/new-android-plugin-migration.html

like image 31
Ryan R Avatar answered Sep 22 '22 13:09

Ryan R