Created
August 30, 2017 20:15
-
-
Save digitalbuddha/a1c27a33da6dedb287123cffb50fdf6a to your computer and use it in GitHub Desktop.
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
| //MIKE: I am sorry for following code, the reason we need this is that slf4j adds the impl in our compile tasks | |
| //test tasks then add no-op slf4j but the impl one stil gets chosen as it is first on the classpath | |
| def testConfig = false | |
| configurations.all { configInner -> | |
| if (configInner.name.contains("Unit")) | |
| testConfig = true | |
| } | |
| configurations.all { config -> | |
| if (testConfig && (config.name.contains("Unit") || config.name.contains('googleDebugCompile'))) { | |
| resolutionStrategy.eachDependency { DependencyResolveDetails details -> | |
| if (details.requested.name.contains('slf4j')) { | |
| details.useTarget libraries.slf4jNoOp | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment