Permalink
Browse files

Update compile target, build tools and support to 24.x and clean up

Summary:
After this change, the Fresco library builds with the newest SDK target and uses the latest support libraries. I've taken the opportunity to remove unneeded references to the support library.

As the support library got split up in 24.2.0 (see https://developer.android.com/topic/libraries/support-library/revisions.html#24-2-0-v4-refactor), I've used the smaller targets where appropriate. I did not update references in tests.

Tested that everything builds:

```
./gradlew clean build test
```

Verified sample apps run correctly:
 - animations
 - scrollperf
 - uriapp

Reviewed By: massimocarli

Differential Revision: D3892811

fbshipit-source-id: 78ee9b9a870d32eec65b3e366fdc0a758048cbad
  • Loading branch information...
1 parent f09bd27 commit 05fae0837124b45983a9bc205509a5284c607b94 @lambdapioneer lambdapioneer committed with Facebook Github Bot 1 Sep 20, 2016
@@ -9,7 +9,6 @@ dependencies {
provided "javax.annotation:javax.annotation-api:${ANNOTATION_API_VERSION}"
provided "com.google.code.findbugs:jsr305:${JSR_305_VERSION}"
compile "com.parse.bolts:bolts-tasks:${BOLTS_ANDROID_VERSION}"
- compile "com.android.support:support-v4:${SUPPORT_LIB_VERSION}"
compile "com.nineoldandroids:library:${NINEOLDANDROID_VERSION}"
compile project(':fbcore')
compile project(':animated-base')
@@ -9,7 +9,6 @@ dependencies {
provided "javax.annotation:javax.annotation-api:${ANNOTATION_API_VERSION}"
provided "com.google.code.findbugs:jsr305:${JSR_305_VERSION}"
compile "com.parse.bolts:bolts-tasks:${BOLTS_ANDROID_VERSION}"
- compile "com.android.support:support-v4:${SUPPORT_LIB_VERSION}"
compile project(':fbcore')
compile "junit:junit:${JUNIT_VERSION}"
@@ -9,7 +9,6 @@ dependencies {
provided "javax.annotation:javax.annotation-api:${ANNOTATION_API_VERSION}"
provided "com.google.code.findbugs:jsr305:${JSR_305_VERSION}"
compile "com.parse.bolts:bolts-tasks:${BOLTS_ANDROID_VERSION}"
- compile "com.android.support:support-v4:${SUPPORT_LIB_VERSION}"
compile project(':fbcore')
compile project(':imagepipeline-base')
compile project(':imagepipeline')
@@ -12,7 +12,6 @@ import org.apache.tools.ant.taskdefs.condition.Os
dependencies {
provided "com.google.code.findbugs:jsr305:${JSR_305_VERSION}"
compile "com.parse.bolts:bolts-tasks:${BOLTS_ANDROID_VERSION}"
- compile "com.android.support:support-v4:${SUPPORT_LIB_VERSION}"
provided "javax.annotation:javax.annotation-api:${ANNOTATION_API_VERSION}"
compile project(':fbcore')
compile project(':animated-base')
@@ -7,7 +7,6 @@ version = VERSION_NAME
dependencies {
provided "com.google.code.findbugs:jsr305:${JSR_305_VERSION}"
compile "com.parse.bolts:bolts-tasks:${BOLTS_ANDROID_VERSION}"
- compile "com.android.support:support-v4:${SUPPORT_LIB_VERSION}"
provided "javax.annotation:javax.annotation-api:${ANNOTATION_API_VERSION}"
compile project(':static-webp')
compile project(':animated-base')
View
@@ -5,7 +5,7 @@ project.group = GROUP
version = VERSION_NAME
dependencies {
- compile "com.android.support:support-v4:${SUPPORT_LIB_VERSION}"
+ provided "com.android.support:support-annotations:${SUPPORT_LIB_VERSION}"
provided "com.google.code.findbugs:jsr305:${JSR_305_VERSION}"
provided "javax.annotation:javax.annotation-api:${ANNOTATION_API_VERSION}"
View
@@ -8,7 +8,6 @@ dependencies {
provided "com.google.code.findbugs:jsr305:${JSR_305_VERSION}"
provided "javax.annotation:javax.annotation-api:${ANNOTATION_API_VERSION}"
- testCompile "com.android.support:support-v4:${SUPPORT_LIB_VERSION}"
testCompile "junit:junit:${JUNIT_VERSION}"
testCompile "org.easytesting:fest-assert-core:${FEST_ASSERT_CORE_VERSION}"
testCompile "org.mockito:mockito-core:${MOCKITO_CORE_VERSION}"
View
@@ -22,8 +22,8 @@ VERSION_NAME=0.13.0
GROUP=com.facebook.fresco
# Deps for gradle
-BUILD_TOOLS_VERSION=23.0.2
-COMPILE_SDK_VERSION=23
+BUILD_TOOLS_VERSION=24.0.2
@eldk
eldk Sep 22, 2016 edited Contributor

Hello,

This breaks support for users of last 32 bits Android SDK Platform-tools (23.0.1 - https://code.google.com/p/android/issues/detail?id=196866) as 24.0.2/3 Android SDK Platform-tools is needed when update to 24.0.2 Android SDK Build-Tools.

Setting BUILD_TOOLS_VERSION=23.0.3 (Android SDK Build-Tools 23.0.3 - https://developer.android.com/studio/releases/build-tools.html) solve this (Android Studio 1.5 + last 32 bits Android SDK Platform-tools 23.0.1 + Android SDK Build-Tools 23.0.3 and target = API 24).

Thanks,

Eric

+COMPILE_SDK_VERSION=24
ANDROID_GRADLE_PLUGIN_VERSION=2.1.3
GRADLE_DOWNLOAD_TASK_VERSION=2.1.0
@@ -39,7 +39,7 @@ MOCKITO_CORE_VERSION=1.10.19
NINEOLDANDROID_VERSION=2.4.0
POWERMOCK_VERSION=1.6.4
ROBOLECTRIC_VERSION=3.0
-SUPPORT_LIB_VERSION=23.2.1
+SUPPORT_LIB_VERSION=24.2.1
VOLLEY_VERSION=1.0.0
# SDK versions for the samples
@@ -5,9 +5,9 @@ project.group = GROUP
version = VERSION_NAME
dependencies {
+ compile "com.android.support:support-core-utils:${SUPPORT_LIB_VERSION}"
provided "com.google.code.findbugs:jsr305:${JSR_305_VERSION}"
compile "com.parse.bolts:bolts-tasks:${BOLTS_ANDROID_VERSION}"
- compile "com.android.support:support-v4:${SUPPORT_LIB_VERSION}"
provided "javax.annotation:javax.annotation-api:${ANNOTATION_API_VERSION}"
compile project(':fbcore')
compile project(':imagepipeline-base')
@@ -5,9 +5,10 @@ project.group = GROUP
version = VERSION_NAME
dependencies {
+ provided "com.android.support:support-annotations:${SUPPORT_LIB_VERSION}"
+ compile "com.android.support:support-core-utils:${SUPPORT_LIB_VERSION}"
provided "com.google.code.findbugs:jsr305:${JSR_305_VERSION}"
compile "com.parse.bolts:bolts-tasks:${BOLTS_ANDROID_VERSION}"
- compile "com.android.support:support-v4:${SUPPORT_LIB_VERSION}"
provided "javax.annotation:javax.annotation-api:${ANNOTATION_API_VERSION}"
compile project(':fbcore')
@@ -7,7 +7,6 @@ version = VERSION_NAME
dependencies {
provided "com.google.code.findbugs:jsr305:${JSR_305_VERSION}"
compile "com.parse.bolts:bolts-tasks:${BOLTS_ANDROID_VERSION}"
- compile "com.android.support:support-v4:${SUPPORT_LIB_VERSION}"
provided "javax.annotation:javax.annotation-api:${ANNOTATION_API_VERSION}"
compile project(':fbcore')
compile project(':imagepipeline-base')
@@ -10,9 +10,9 @@ import de.undercouch.gradle.tasks.download.Download
import org.apache.tools.ant.taskdefs.condition.Os
dependencies {
+ provided "com.android.support:support-annotations:${SUPPORT_LIB_VERSION}"
provided "com.google.code.findbugs:jsr305:${JSR_305_VERSION}"
compile "com.parse.bolts:bolts-tasks:${BOLTS_ANDROID_VERSION}"
- compile "com.android.support:support-v4:${SUPPORT_LIB_VERSION}"
provided "javax.annotation:javax.annotation-api:${ANNOTATION_API_VERSION}"
compile project(':fbcore')
compile project(':imagepipeline-base')
@@ -1,7 +1,6 @@
apply plugin: 'com.android.application'
dependencies {
- provided "com.android.support:support-annotations:${SUPPORT_LIB_VERSION}"
compile project(':drawee-backends:drawee-pipeline')
// Include this in order to see static Webp
compile project(':static-webp')
@@ -2,12 +2,12 @@ apply plugin: 'com.android.application'
dependencies {
provided "com.google.code.findbugs:jsr305:${JSR_305_VERSION}"
- compile "com.android.support:appcompat-v7:${SUPPORT_LIB_VERSION}"
compile "com.github.bumptech.glide:glide:${GLIDE_VERSION}"
compile "com.android.volley:volley:${VOLLEY_VERSION}"
compile "com.nostra13.universalimageloader:universal-image-loader:${UIL_VERSION}"
compile "com.squareup.picasso:picasso:${PICASSO_VERSION}"
compile "com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2"
+ compile "com.android.support:appcompat-v7:${SUPPORT_LIB_VERSION}"
compile "com.android.support:recyclerview-v7:${SUPPORT_LIB_VERSION}"
compile "com.googlecode.android-query:android-query:${AQUERY_VERSION}"
compile "com.facebook.stetho:stetho-okhttp3:${STETHO_VERSION}"
@@ -17,6 +17,11 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), '../../proguard-fresco.pro'
}
}
+
+ lintOptions {
+ warning 'InvalidPackage'
+ }
+
sourceSets {
main {
res.srcDirs = ['src/main/res', 'src/androidTest/res']
@@ -30,10 +35,9 @@ android {
dependencies {
compile project(':drawee-backends:drawee-pipeline')
compile fileTree(dir: 'libs', include: ['*.jar'])
- compile 'com.android.support:appcompat-v7:23.2.0'
- compile 'com.android.support:recyclerview-v7:23.2.0'
- compile 'com.android.support:preference-v7:23.2.0'
- testCompile "com.android.support:support-v4:${SUPPORT_LIB_VERSION}"
+ compile "com.android.support:appcompat-v7:${SUPPORT_LIB_VERSION}"
+ compile "com.android.support:recyclerview-v7:${SUPPORT_LIB_VERSION}"
+ compile "com.android.support:preference-v7:${SUPPORT_LIB_VERSION}"
testCompile "junit:junit:${JUNIT_VERSION}"
androidTestCompile "junit:junit:${JUNIT_VERSION}"
androidTestCompile "org.mockito:mockito-core:${MOCKITO_CORE_VERSION}"
@@ -46,7 +46,7 @@ configurations {
dependencies {
provided "com.android.support:support-annotations:${SUPPORT_LIB_VERSION}"
- compile "com.android.support:support-v4:${SUPPORT_LIB_VERSION}"
+ compile "com.android.support:support-core-ui:${SUPPORT_LIB_VERSION}"
internalCompile project(':drawee-backends:drawee-pipeline')
compile project(path: ':samples:zoomable')
@@ -13,7 +13,6 @@ dependencies {
provided "javax.annotation:javax.annotation-api:${ANNOTATION_API_VERSION}"
provided "com.google.code.findbugs:jsr305:${JSR_305_VERSION}"
compile "com.parse.bolts:bolts-tasks:${BOLTS_ANDROID_VERSION}"
- compile "com.android.support:support-v4:${SUPPORT_LIB_VERSION}"
testCompile "junit:junit:${JUNIT_VERSION}"
androidTestCompile "junit:junit:${JUNIT_VERSION}"
androidTestCompile 'com.android.support.test:runner:0.4'

0 comments on commit 05fae08

Please sign in to comment.