提交 31e8e319 编写于 作者: S Sam

Merge pull request #445 from TWiStErRob/fixes

Update versions and Warning Cleanup
......@@ -66,16 +66,16 @@ def getAndroidJar() {
exclude '**/BuildConfig.java'
exclude '**/R.java'
}
} as Javadoc
def cleanJavadocTask = task("clean${variantName.capitalize()}Javadoc", type: Delete) {
delete javadocTask.destinationDir
}
} as Task
clean.dependsOn(cleanJavadocTask)
def javadocJarTask = task("${variantName}JavadocJar", type: Jar) {
from javadocTask.destinationDir
}
} as Task
javadocJarTask.dependsOn(javadocTask)
}
......@@ -91,7 +91,7 @@ jar {
}
getAllInternalProjects().each { project ->
jar.dependsOn(project.build)
jar.dependsOn(project.tasks.build)
}
artifacts {
......
......@@ -19,13 +19,14 @@ SUPPORT_V7_VERSION=19.1.0
# TODO: Upgrade to latest version of Volley when we compile with Java 7.
VOLLEY_VERSION=1.0.8
OK_HTTP_VERSION=2.2.0
ANDROID_GRADLE_VERSION=1.0.0
ANDROID_GRADLE_VERSION=1.2.2
ROBOLECTRIC_GRADLE_VERSION=0.14.0
ROBOLECTRIC_GRADLE_VERSION=1.0.1
COVERALLS_GRADLE_VERSION=2.0.1
JUNIT_VERSION=4.11
MOCKITO_VERSION=1.9.5
JUNIT_VERSION=4.12
MOCKITO_VERSION=1.10.19
ROBOLECTRIC_VERSION=2.4
# TODO: increase this to 2.0.+ when we compile with Java 7.
MOCKWEBSERVER_VERSION=1.6.0
TRUTH_VERSION=0.24
......
#Sat Dec 20 22:55:19 PST 2014
#Thu Apr 30 12:21:55 CEST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-all.zip
evaluationDependsOnChildren()
import com.android.build.gradle.api.BaseVariant
subprojects {
android.libraryVariants.all { variant ->
android.libraryVariants.all { BaseVariant variant ->
def jarTask = project.tasks.create(name: "jar${variant.name.capitalize()}", type: Jar) {
from variant.javaCompile.destinationDir
exclude "**/R.class"
......
......@@ -12,14 +12,14 @@ dependencies {
android {
compileSdkVersion COMPILE_SDK_VERSION as int
buildToolsVersion BUILD_TOOLS_VERSION
buildToolsVersion BUILD_TOOLS_VERSION as String
defaultConfig {
minSdkVersion MIN_SDK_VERSION as int
targetSdkVersion TARGET_SDK_VERSION as int
versionCode = VERSION_CODE
versionName = VERSION_NAME
versionCode VERSION_CODE as int
versionName VERSION_NAME as String
}
}
......
apply plugin: 'com.android.library'
apply plugin: 'robolectric'
apply plugin: 'org.robolectric'
repositories {
mavenCentral()
......@@ -14,20 +14,19 @@ dependencies {
androidTestCompile "junit:junit:${JUNIT_VERSION}"
androidTestCompile "org.mockito:mockito-all:${MOCKITO_VERSION}"
androidTestCompile "org.robolectric:robolectric:${ROBOLECTRIC_VERSION}"
// TODO: increase this to 2.0.+ when we compile against Java 7.
androidTestCompile "com.squareup.okhttp:mockwebserver:${MOCKWEBSERVER_VERSION}"
}
android {
compileSdkVersion COMPILE_SDK_VERSION as int
buildToolsVersion BUILD_TOOLS_VERSION
buildToolsVersion BUILD_TOOLS_VERSION as String
defaultConfig {
minSdkVersion MIN_SDK_VERSION as int
targetSdkVersion TARGET_SDK_VERSION as int
versionCode = VERSION_CODE
versionName = VERSION_NAME
versionCode VERSION_CODE as int
versionName VERSION_NAME as String
}
}
......
apply plugin: 'com.android.library'
apply plugin: 'robolectric'
apply plugin: 'org.robolectric'
apply plugin: 'maven'
apply plugin: 'findbugs'
apply plugin: 'pmd'
......@@ -35,14 +35,14 @@ dependencies {
android {
compileSdkVersion COMPILE_SDK_VERSION as int
buildToolsVersion BUILD_TOOLS_VERSION
buildToolsVersion BUILD_TOOLS_VERSION as String
defaultConfig {
minSdkVersion MIN_SDK_VERSION as int
targetSdkVersion TARGET_SDK_VERSION as int
versionCode = VERSION_CODE as int
versionName = VERSION_NAME
versionCode VERSION_CODE as int
versionName VERSION_NAME as String
}
buildTypes {
......@@ -72,11 +72,7 @@ afterEvaluate {
}
}
findbugsTestDebug {
enabled = false
}
check.dependsOn('findbugs')
tasks.check.dependsOn(tasks.findbugs)
task pmd(type: Pmd) {
......@@ -95,11 +91,7 @@ afterEvaluate {
}
}
pmdTestDebug {
enabled = false
}
check.dependsOn('pmd')
tasks.check.dependsOn(tasks.pmd)
task jacocoTestReport(type:JacocoReport, dependsOn: testDebug) {
def coverageSourceDirs = ['src/main/java']
......
......@@ -151,7 +151,7 @@ public class LruBitmapPool implements BitmapPool {
@Override
public void clearMemory() {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "clearMemory");
}
trimToSize(0);
......@@ -160,7 +160,7 @@ public class LruBitmapPool implements BitmapPool {
@SuppressLint("InlinedApi")
@Override
public void trimMemory(int level) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "trimMemory, level=" + level);
}
if (level >= android.content.ComponentCallbacks2.TRIM_MEMORY_MODERATE) {
......
......@@ -31,6 +31,7 @@ public final class BitmapPreFiller {
this.defaultFormat = defaultFormat;
}
@SuppressWarnings("deprecation")
public void preFill(PreFillType.Builder... bitmapAttributeBuilders) {
if (current != null) {
current.cancel();
......
......@@ -188,6 +188,7 @@ public abstract class Downsampler implements BitmapDecoder<InputStream> {
if (degreesToRotate == 90 || degreesToRotate == 270) {
// If we're rotating the image +-90 degrees, we need to downsample accordingly so the image width is
// decreased to near our target's height and the image height is decreased to near our target width.
//noinspection SuspiciousNameCombination
exactSampleSize = getSampleSize(inHeight, inWidth, targetWidth, targetHeight);
} else {
exactSampleSize = getSampleSize(inWidth, inHeight, targetWidth, targetHeight);
......@@ -247,6 +248,7 @@ public abstract class Downsampler implements BitmapDecoder<InputStream> {
return false;
}
@SuppressWarnings("deprecation")
private static Bitmap.Config getConfig(InputStream is, DecodeFormat format) {
// Changing configs can cause skewing on 4.1, see issue #128.
if (format == DecodeFormat.ALWAYS_ARGB_8888 || format == DecodeFormat.PREFER_ARGB_8888
......
......@@ -9,7 +9,7 @@ dependencies {
android {
compileSdkVersion COMPILE_SDK_VERSION as int
buildToolsVersion BUILD_TOOLS_VERSION
buildToolsVersion BUILD_TOOLS_VERSION as String
defaultConfig {
applicationId 'com.bumptech.glide.samples.flickr'
......
......@@ -7,7 +7,7 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:label="@string/app_name"
android:icon="@drawable/ic_launcher"
android:icon="@android:drawable/sym_def_app_icon"
android:allowBackup="false"
android:theme="@style/Theme.AppCompat">
......
......@@ -14,6 +14,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:cursorVisible="true"
android:textSize="16sp"
......
......@@ -2,4 +2,6 @@
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fullscreen_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:contentDescription="@string/fullscreen_description"
/>
......@@ -8,4 +8,5 @@
<string name="medium">Medium</string>
<string name="list">List</string>
<string name="image_description">An image from the list of results for a search query</string>
<string name="fullscreen_description">Full screen view of an image</string>
</resources>
......@@ -2,12 +2,12 @@ apply plugin: 'com.android.application'
dependencies {
compile project(':library')
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.google.code.gson:gson:2.3'
}
android {
compileSdkVersion COMPILE_SDK_VERSION as int
buildToolsVersion BUILD_TOOLS_VERSION
buildToolsVersion BUILD_TOOLS_VERSION as String
defaultConfig {
applicationId 'com.bumptech.glide.samples.giphy'
......
......@@ -5,7 +5,7 @@
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:icon="@android:drawable/sym_def_app_icon"
android:largeHeap="true"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
......
......@@ -3,4 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fullscreen_gif"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent"
android:contentDescription="@string/fullscreen_description"
/>
......@@ -3,4 +3,5 @@
<string name="app_name">GiphySample</string>
<string name="image_description">An image from the list of results for a search query</string>
<string name="giphy_logo_description">An animated version of the Giphy company logo</string>
<string name="fullscreen_description">Full screen view of an image</string>
</resources>
......@@ -6,7 +6,7 @@ repositories {
android {
compileSdkVersion COMPILE_SDK_VERSION as int
buildToolsVersion BUILD_TOOLS_VERSION
buildToolsVersion BUILD_TOOLS_VERSION as String
defaultConfig {
applicationId 'com.bumptech.svgsample.app'
......
......@@ -6,7 +6,7 @@
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:icon="@android:drawable/sym_def_app_icon"
android:label="@string/app_name">
<activity
android:name=".MainActivity"
......
......@@ -2,7 +2,7 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<bitmap
android:src="@drawable/ic_launcher"
android:src="@android:drawable/sym_def_app_icon"
android:gravity="center" />
</item>
<item android:top="20dp" android:bottom="20dp" android:drawable="@drawable/dot_dot_dot" />
......
......@@ -65,10 +65,10 @@ afterEvaluate { project ->
}
pom.project {
name POM_NAME
packaging POM_PACKAGING
description POM_DESCRIPTION
url POM_URL
name = POM_NAME
packaging = POM_PACKAGING
description = POM_DESCRIPTION
url = POM_URL
scm {
url POM_SCM_URL
......@@ -78,22 +78,22 @@ afterEvaluate { project ->
licenses {
license {
name "Simplified BSD License"
url "http://www.opensource.org/licenses/bsd-license"
name = "Simplified BSD License"
url = "http://www.opensource.org/licenses/bsd-license"
distribution = "repo"
}
license {
name "The Apache Software License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
name = "The Apache Software License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution = "repo"
}
}
developers {
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
email POM_DEVELOPER_EMAIL
id = POM_DEVELOPER_ID
name = POM_DEVELOPER_NAME
email = POM_DEVELOPER_EMAIL
}
}
}
......
apply plugin: 'com.android.library'
apply plugin: 'robolectric'
apply plugin: 'org.robolectric'
dependencies {
androidTestCompile project(':testutil')
......@@ -12,7 +12,7 @@ dependencies {
android {
compileSdkVersion COMPILE_SDK_VERSION as int
buildToolsVersion BUILD_TOOLS_VERSION
buildToolsVersion BUILD_TOOLS_VERSION as String
defaultConfig {
minSdkVersion MIN_SDK_VERSION as int
......
......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
android {
compileSdkVersion COMPILE_SDK_VERSION as int
buildToolsVersion BUILD_TOOLS_VERSION
buildToolsVersion BUILD_TOOLS_VERSION as String
defaultConfig {
minSdkVersion MIN_SDK_VERSION as int
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册