-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Some advancements towards AGP 3.0.0 * Expanded Unit Test suite to run tests for 2.x & 3.x variants of the AGP * Mark test source folders as such in IDEA * Use default JUnit Platform version * Performed some sweeping inside the plugin’s compile & runtime dependencies, and tasks * JUnit 4 is included by default, which allows AS builds w/o “class not found” * Deprecated junitVintage() dependency handler & issue a warning * Both TestEngines are included on the runtime classpath by default * Disable the default unit test task if JUnit 5 is used * Some clean-up * Moved around unit test cases for 2.x & 3.x * Bump to 1.0.0-M4-rev1
- Loading branch information
Showing
14 changed files
with
365 additions
and
155 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
22 changes: 22 additions & 0 deletions
22
android-junit5/src/main/groovy/de/mannodermaus/gradle/anj5/AndroidJUnit5Compat.groovy
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package de.mannodermaus.gradle.anj5 | ||
|
||
class AndroidJUnit5Compat { | ||
|
||
/** | ||
* Fetches the Java output directories for the given Variant scopes | ||
* across different versions of the Android Gradle plugin. | ||
* @param variantScope VariantScope to look up the Java outputs from | ||
* @return An Iterable container depicting the output directories | ||
*/ | ||
static Iterable<File> getJavaOutputDirs(variantScope) { | ||
if (variantScope.hasProperty("javaOutputs")) { | ||
return variantScope.javaOutputs | ||
|
||
} else if (variantScope.hasProperty("javaOuptuts")) { | ||
return variantScope.javaOuptuts | ||
|
||
} else { | ||
return Collections.singletonList(variantScope.javaOutputDir) | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.