Skip to content

Commit

Permalink
API 24 (#1423)
Browse files Browse the repository at this point in the history
* Target 24

* Hope and pray for travis

* Add @px annotations to resize

Resolves #903
  • Loading branch information
ZacSweers authored and JakeWharton committed Jun 19, 2016
1 parent 81ead3e commit f6ae754
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -4,9 +4,9 @@ android:
components:
- tools
- platform-tools
- build-tools-23.0.3
- build-tools-24.0.0
- extra-android-m2repository
- android-23
- android-24

jdk:
- oraclejdk8
Expand Down
11 changes: 6 additions & 5 deletions dependencies.gradle
@@ -1,20 +1,21 @@
ext {
compileSdkVersion = 23
buildToolsVersion = '23.0.3'
compileSdkVersion = 24
buildToolsVersion = '24.0.0'
minSdkVersion = 14
targetSdkVersion = 23
targetSdkVersion = 24
sourceCompatibilityVersion = JavaVersion.VERSION_1_7
targetCompatibilityVersion = JavaVersion.VERSION_1_7
okhttp3Version = '3.0.1'
supportLibrariesVersion = '24.0.0'

dep = [
androidPlugin : 'com.android.tools.build:gradle:2.1.2',
okhttp : 'com.squareup.okhttp:okhttp:2.7.1',
okhttp3 : "com.squareup.okhttp3:okhttp:$okhttp3Version",
mockWebServer : "com.squareup.okhttp3:mockwebserver:$okhttp3Version",
pollexor : 'com.squareup:pollexor:2.0.0',
supportV4 : 'com.android.support:support-v4:23.4.0',
supportAnnotations : 'com.android.support:support-annotations:23.4.0',
supportV4 : "com.android.support:support-v4:$supportLibrariesVersion",
supportAnnotations : "com.android.support:support-annotations:$supportLibrariesVersion",
junit : 'junit:junit:4.10',
fest : 'org.easytesting:fest-assert-core:2.0M10',
festAndroid : 'com.squareup:fest-android:1.0.6',
Expand Down
3 changes: 2 additions & 1 deletion picasso/src/main/java/com/squareup/picasso/Request.java
Expand Up @@ -21,6 +21,7 @@
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import android.support.annotation.Px;
import com.squareup.picasso.Picasso.Priority;

import java.util.ArrayList;
Expand Down Expand Up @@ -307,7 +308,7 @@ public Builder stableKey(@Nullable String stableKey) {
* Resize the image to the specified size in pixels.
* Use 0 as desired dimension to resize keeping aspect ratio.
*/
public Builder resize(int targetWidth, int targetHeight) {
public Builder resize(@Px int targetWidth, @Px int targetHeight) {
if (targetWidth < 0) {
throw new IllegalArgumentException("Width must be positive number or 0.");
}
Expand Down

0 comments on commit f6ae754

Please sign in to comment.