daimajia / AndroidImageSlider

An amazing and convenient Android image slider.
MIT License
5.62k stars 1.66k forks source link

Updated Picasso v2.71828, removed NineOldAndroids; Gradle v4.1, sdk26, Travis build working! #400

Open simiansim opened 5 years ago

simiansim commented 5 years ago

Work done by hamsoft-uganda - adding guess at travis config to make it build

simiansim commented 5 years ago

Now builds in Travis. Upgrades Picasso: implementation 'com.squareup.picasso:picasso:2.71828' Removed nine old androids. Compile with Sdk 26, Build Tools 26.0.1 Gradle 4.1 Gradle Plugin 3.0.1

simiansim commented 5 years ago

The versions included in this will seem old to developers but are required to have it pass the travis build test configured in this repo. The versions of Android libraries/sdk in travis and the acceptance of the licenses within that environment used when pulling in new ones, are not up to date. This is purely an automated testing concern. I also have a completely current version of this waiting in my develop branch, that will work for folks using a current Android studio.

Working Travis test result can be seen here https://travis-ci.org/daimajia/AndroidImageSlider/builds/463182710

J6ey commented 5 years ago

Is there a way to use this via Gradle dependency? I don't think it will be merged anytime soon.

simiansim commented 5 years ago

You can clone the repo (you can clone from mine if you like) and get your own copy working on the master branch. You can then use the gradle snapshot approach to using your own repo straight from github. Replace the original dependancy with this form:

implementation 'com.github.useyourown:AndroidImageSlider:master-SNAPSHOT'

You can also publish your own replacement to Bintray so that it works via JCenter, to share with others. Create an opensource account with bintray. Bintray syncs with JCenter after you have linked the two, and then and been approved. Using the published lib then, is possible by including jcenter() in your top level gradle build.gradle repositories. I might already be setup in your project.

allprojects { repositories { jcenter() } }

Can't say I have done this myself, I use the snapshot. But learning is awesome. Have fun! https://bintray.com/ https://android.jlelse.eu/publishing-your-android-kotlin-or-java-library-to-jcenter-from-android-studio-1b24977fe450

J6ey commented 5 years ago

Thanks for the reply. Do you know if this works on API 28/ Pie?

simiansim commented 5 years ago

This was an attempt to 1) fix long-standing issues with dependancies like Picasso and NineOldAndroids, 2) get the system to build within travis for testing [as setup by the original maintainer]. For Travis builds specific versions of dependancies were chosen, as newer ones are not available in that system. Version are documented in the thread above. I have not updated my master branch in relation to this pull request aimed at these goals.

What you are now asking about is to get it up to date as well. My "develop" branch contains further small modifications to use Gradle 4.10, the Gradle plugin 3.3.2, build tools 28.0.3 and does run on Android Pie. https://github.com/simiansim/AndroidImageSlider/tree/develop

simiansim commented 5 years ago

After I typed that I noticed Android Studio 3.4 was released 4 days ago. The link above (develop branch) is now working with Android Studio 3.4, Gradle/Wrapper 5.1.1, and Gradle plugin 3.4.0 instead. This obviously requires you to update your Android Studio and related downloads. The previous commit could be used if you aren't ready to do that. I also updated the readme a bit.