Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Importing Maven dependency

Tags:

maven

gradle

I'm trying to include ViewPagerIndicator into my project and I'd rather use the Maven dependency rather than importing the android library project. There's some code posted for maven

<dependency>
  <groupId>com.viewpagerindicator</groupId>
  <artifactId>library</artifactId>
  <version>2.4.1</version>
  <type>apklib</type>
</dependency>

and inside the sample project, that code is in a pom.xml file, but I don't have that file. Can I translate the above code into my build.gradle file? Or can I just create a pom.xml file and put it in my project?

like image 262
TMH Avatar asked Oct 24 '13 10:10

TMH


Video Answer


1 Answers

You should ask the author JakeWharton to make an aar available on Maven Central. (vote here: https://github.com/JakeWharton/Android-ViewPagerIndicator/pull/229). Until then there is a temporary solution to use maven repo from community.

repositories {
    maven {
        url 'https://github.com/Goddchen/mvn-repo/raw/master/'
    }
    mavenCentral()
}

dependencies {
    compile 'com.actionbarsherlock:viewpagerindicator:2.4.1'
}

https://github.com/Goddchen/mvn-repo

like image 138
Sergii Pechenizkyi Avatar answered Oct 16 '22 19:10

Sergii Pechenizkyi