This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| inline fun <reified T : Key> Glide.registerMockStreamModelLoader() = registerMockStreamModelLoader(T::class.java) | |
| fun <T : Key> Glide.registerMockStreamModelLoader(modelClass: Class<T>) { | |
| val modelLoaderFactory: ModelLoaderFactory<T, InputStream> = mock() | |
| val modelLoader = mockStreamModelLoader(modelClass) | |
| whenever(modelLoaderFactory.build(any())).thenReturn(modelLoader) | |
| this.registry.append(modelClass, InputStream::class.java, modelLoaderFactory) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| inline fun completable( | |
| crossinline action: () -> Unit, | |
| crossinline finally: () -> Unit | |
| ): Completable { | |
| return Completable.create { emitter -> | |
| try { | |
| action() | |
| emitter.onComplete() | |
| } catch (t: Throwable) { | |
| // Attempts to emit the specified {@code Throwable} error if the downstream |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| afterEvaluate { | |
| def sdkPath = prepareAndroidHome() | |
| } | |
| private String prepareAndroidHome() | |
| { | |
| def localProperties = new File( project.rootDir, 'local.properties' ) | |
| def properties = new Properties() | |
| if ( localProperties.exists() ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dependencies { | |
| compile files('libs/support-annotations-25.0.0.jar') | |
| } | |
| //And in app build.gradle | |
| compile( supportAppCompat ) { | |
| exclude group: 'com.android.support', module: 'support-annotations' | |
| } | |
| compile( supportDesign ) { | |
| exclude group: 'com.android.support', module: 'support-annotations' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jdk: oraclejdk8 | |
| before_script: | |
| - export ANDROID_HOME=$HOME/.android | |
| - chmod +x gradlew |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jdk: oraclejdk8 | |
| before_script: | |
| - chmod +x gradlew |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| buildscript { | |
| repositories { | |
| jcenter() | |
| } | |
| dependencies { | |
| classpath 'com.android.tools.build:gradle:2.2.2' | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| language: android | |
| jdk: oraclejdk8 | |
| android: | |
| components: | |
| - tools | |
| - platform-tools | |
| - tools | |
| - build-tools-25.0.0 | |
| - android-25 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gradle allDependencies | grep support-annotations -c | |
| 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| afterEvaluate { | |
| def sdkPath = prepareAndroidHome() | |
| copyLicenseFiles( sdkPath ) | |
| } | |
| private void copyLicenseFiles( String sdkPath ) | |
| { | |
| def destinationDir = new File( sdkPath ) | |
| if ( !destinationDir.exists() ) |
NewerOlder