简体   繁体   English

Gradle和Android支持库

[英]Gradle and Android support library

In almost every Android app we need a couple of library projects like ABS, HoloEverywhere, etc. Most of these are in Maven Central, which is good. 几乎在每个Android应用程序中,我们都需要一些像ABS,HoloEverywhere等项目库项目。其中大部分都在Maven Central中,这很好。 What is bad is, most of them depend on the support library and naturally point to the outdated (I mean very buggy) version in Maven Central. 不好的是,大多数都依赖于支持库,并自然地指向Maven Central中过时的(我的意思是非常多的)版本。

We are currently maintain our own repositories with custom versions of Android (using the Maven Android SDK deployer) and each library (fetched from git and with adjusted maven dependency). 我们目前使用自定义版本的Android(使用Maven Android SDK部署程序)和每个库(从git获取并具有调整后的maven依赖性)维护我们自己的存储库。 Will there be an easier way of doing this, using the new Gradle based build system (like overwriting dependencies of aar projects)? 使用新的基于Gradle的构建系统(比如覆盖aar项目的依赖性),是否有更简单的方法可以做到这一点?

We will provide artifact versions of the support libraries. 我们将提供支持库的工件版本。 Stay tuned. 敬请关注。

Edit: The artifacts are now available. 编辑:工件现在可用。 You have to download "Android Support Repository" in your SDK. 您必须在SDK中下载“Android支持存储库”。 The gradle build system will automatically use this as a local Maven repository. gradle构建系统将自动将其用作本地Maven存储库。

There are 3 artifacts in it right now: 现在有3个文物:

com.android.support:support-v4:21.0.0
com.android.support:support-v13:21.0.0
com.android.support:gridlayout-v7:21.0.0
com.android.support:appcompat-v7:21.0.0
apply plugin: 'android-library'

dependencies {
    compile 'com.android.support:support-v4:21.0.0'
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM