27 октября 2013

ViewPagerIndicator AAR packaged

Many people, developing applications for Android, use ViewPagerIndicator library. It's nice and open-sourced (you can clone or fork sources at GitHub). But after Google introduced Gradle build system in Android Studio, that can resolve dependencies through maven central repository we all very lack of AAR packaged version of that library - it's published in maven central, but in other pakaging (jar, apklib, etc.), that can not be properly used by gradle. However, author of ViewPagerIndicator, Jake Wharton doesn't hurry to publish aar packaging. So I have built and published ViewPagerIndicator AAR package for public use.

To add dependency to ViewPagerIndicator AAR:
repositories {
    maven { url "http://dl.bintray.com/populov/maven" }
    mavenCentral()
}
  • Use in your dependencies as usual:
dependencies {
    compile 'com.viewpagerindicator:library:2.4.1@aar'
}

Why priorior to mavenCentral?

Otherwise gradle will look first in mavenCentral, find viewpagerindicator artifact with the same version, but won't find aar package and will report an error, without looking for same artifact with another packaging in other repositories.

Read at Haunted Soft

1 комментарий:

Maxim Belskiy комментирует...

Спасибо, помогло!