Skip to content

Commit

Permalink
Update Android Gradle plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjudd committed Sep 11, 2016
1 parent 6e52b7b commit b54084a
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 29 deletions.
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ android:
components:
- tools
- platform-tools
- build-tools-22.0.1
- android-22
- build-tools-24.0.2
- android-24
- extra-android-m2repository
- extra-android-support

licenses:
- 'android-sdk-license.*'

jdk:
- openjdk7
- oraclejdk7
- oraclejdk8

sudo: false

Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ buildscript {
dependencies {
classpath "com.android.tools.build:gradle:${ANDROID_GRADLE_VERSION}"
classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:${COVERALLS_GRADLE_VERSION}"
classpath "org.robolectric:robolectric-gradle-plugin:${ROBOLECTRIC_GRADLE_VERSION}"
}
}

Expand Down
18 changes: 9 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,26 @@ POM_SCM_DEV_CONNECTION=scm:[email protected]:bumptech/glide.git
POM_DEVELOPER_ID=sjudd
POM_DEVELOPER_NAME=Sam Judd
POM_DEVELOPER_EMAIL=[email protected]

SUPPORT_V4_VERSION=22.2.0
SUPPORT_V7_VERSION=22.2.0
SUPPORT_V4_VERSION=24.2.0
SUPPORT_V7_VERSION=24.2.0
VOLLEY_VERSION=1.0.0
OK_HTTP_VERSION=3.0.1
# TODO: use this in library/build.gradle.
ANDROID_GRADLE_VERSION=1.2.3
ANDROID_GRADLE_VERSION=2.1.3

ROBOLECTRIC_GRADLE_VERSION=1.1.0
COVERALLS_GRADLE_VERSION=2.4.0
JUNIT_VERSION=4.12
MOCKITO_VERSION=1.10.19
ROBOLECTRIC_VERSION=3.1
ROBOLECTRIC_VERSION=3.1.2
MOCKWEBSERVER_VERSION=3.0.0-RC1
TRUTH_VERSION=0.26

FINDBUGS_VERSION=3.0.0
JACOCO_VERSION=0.7.1.201405082137

COMPILE_SDK_VERSION=22
BUILD_TOOLS_VERSION=22.0.1
TARGET_SDK_VERSION=22
COMPILE_SDK_VERSION=24
BUILD_TOOLS_VERSION=24.0.2
TARGET_SDK_VERSION=24
MIN_SDK_VERSION=10

org.gradle.jvmargs=-Xmx2048M
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
1 change: 0 additions & 1 deletion integration/gifencoder/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apply plugin: 'com.android.library'
apply plugin: 'org.robolectric'

dependencies {
compile project(':library')
Expand Down
1 change: 0 additions & 1 deletion integration/volley/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apply plugin: 'com.android.library'
apply plugin: 'org.robolectric'

dependencies {
compile project(':library')
Expand Down
7 changes: 3 additions & 4 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apply plugin: 'com.android.library'
apply plugin: 'org.robolectric'
apply plugin: 'maven'
apply plugin: 'findbugs'
apply plugin: 'pmd'
Expand Down Expand Up @@ -111,9 +110,9 @@ afterEvaluate {

check.dependsOn('pmd')

task jacocoTestReport(type: JacocoReport, dependsOn: testDebug) {
def coverageSourceDirs = ['src/main/java']
group = "Reporting"
task jacocoTestReport(type: JacocoReport, dependsOn: testDebugUnitTest) {
def coverageSourceDirs = ['src/main/java']
group = "Reporting"
description = "Generate Jacoco coverage reports"

classDirectories = fileTree(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ public void onDestroy() {

@Override
public void onTrimMemory(int level) {
super.onTrimMemory(level);
// If an activity is re-created, onTrimMemory may be called before a manager is ever put.
// See #329.
if (requestManager != null) {
Expand All @@ -207,6 +208,7 @@ public void onTrimMemory(int level) {

@Override
public void onLowMemory() {
super.onLowMemory();
// If an activity is re-created, onLowMemory may be called before a manager is ever put.
// See #329.
if (requestManager != null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.bumptech.glide.manager;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
Expand Down Expand Up @@ -148,8 +148,8 @@ private void unregisterFragmentWithRoot() {
}

@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
public void onAttach(Context context) {
super.onAttach(context);
try {
registerFragmentWithRoot(getActivity());
} catch (IllegalStateException e) {
Expand Down
6 changes: 3 additions & 3 deletions scripts/upload.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ afterEvaluate { project ->
it.buildType.name.equalsIgnoreCase('release')
}

task androidJavadocs(type: Javadoc, dependsOn: compileReleaseJava) {
task androidJavadocs(type: Javadoc, dependsOn: compileReleaseJavaWithJavac) {
source = releaseVariants.collect { it.javaCompile.source }
classpath = files(releaseVariants.collect { files(it.javaCompile.classpath.files,
project.android.bootClasspath) })
Expand All @@ -148,8 +148,8 @@ afterEvaluate { project ->
baseName "${JAR_PREFIX}${project.name}${JAR_POSTFIX}"
}

task androidLibraryJar(type: Jar, dependsOn: compileReleaseJava /* == variant.javaCompile */) {
from compileReleaseJava.destinationDir
task androidLibraryJar(type: Jar, dependsOn: compileReleaseJavaWithJavac /* == variant.javaCompile */) {
from compileReleaseJavaWithJavac.destinationDir
exclude '**/R.class'
exclude '**/BuildConfig.class'
baseName "${JAR_PREFIX}${project.name}${JAR_POSTFIX}"
Expand Down
3 changes: 1 addition & 2 deletions third_party/gif_decoder/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apply plugin: 'com.android.library'
apply plugin: 'org.robolectric'

dependencies {
compile "com.android.support:support-annotations:${SUPPORT_V4_VERSION}"
Expand All @@ -22,4 +21,4 @@ android {
}
}

apply from: "${rootProject.projectDir}/scripts/upload.gradle"
//apply from: "${rootProject.projectDir}/scripts/upload.gradle"

0 comments on commit b54084a

Please sign in to comment.