Skip to content

Commit

Permalink
Move MockGlideExecutor into public 'mocks' package
Browse files Browse the repository at this point in the history
Also eliminates one of the duplicate copies of the class.

PiperOrigin-RevId: 267016311
  • Loading branch information
sjudd authored and glide-copybara-robot committed Sep 3, 2019
1 parent 9fb1036 commit e021f6b
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 110 deletions.
1 change: 1 addition & 0 deletions glide/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ static def getAndroidPathsForJavadoc() {
':integration:okhttp3',
':integration:recyclerview',
':integration:volley',
':mocks',
]
}

Expand Down
1 change: 1 addition & 0 deletions instrumentation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies {
implementation project(":library")

androidTestImplementation project(':library')
androidTestImplementation project(':mocks')
androidTestImplementation "org.mockito:mockito-android:${MOCKITO_ANDROID_VERSION}"
androidTestImplementation "androidx.test.ext:junit:${ANDROIDX_TEST_VERSION}"
androidTestImplementation "androidx.test:rules:${ANDROIDX_TEST_VERSION}"
Expand Down
1 change: 1 addition & 0 deletions library/test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apply plugin: 'com.android.library'
dependencies {
testImplementation "androidx.appcompat:appcompat:${ANDROID_X_VERSION}"
testImplementation project(':library')
testImplementation project(':mocks')
testImplementation project(':testutil')
testImplementation 'com.google.guava:guava-testlib:18.0'
testImplementation "com.google.truth:truth:${TRUTH_VERSION}"
Expand Down

This file was deleted.

25 changes: 25 additions & 0 deletions mocks/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apply plugin: 'com.android.library'

dependencies {
implementation project(':library')
implementation "androidx.annotation:annotation:${ANDROID_X_VERSION}"
implementation "com.google.guava:guava:${GUAVA_VERSION}"
}

android {
compileSdkVersion COMPILE_SDK_VERSION as int

defaultConfig {
minSdkVersion MIN_SDK_VERSION as int
targetSdkVersion TARGET_SDK_VERSION as int

versionName = VERSION_NAME as String
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}

apply from: "${rootProject.projectDir}/scripts/upload.gradle"
7 changes: 7 additions & 0 deletions mocks/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
POM_NAME=Glide mocks
POM_ARTIFACT_ID=mocks
POM_PACKAGING=aar
POM_DESCRIPTION=A set of mocks to ease testing with Glide

JAR_PREFIX=glide-
JAR_POSTFIX=
4 changes: 4 additions & 0 deletions mocks/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bumptech.glide.mocks">
<application />
</manifest>
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ include ':integration:okhttp3'
include ':integration:recyclerview'
include ':integration:volley'
include ':testutil'
include ':mocks'

rootProject.name = 'glide-parent'

0 comments on commit e021f6b

Please sign in to comment.