Skip to content

Commit 977abb8

Browse files
committed
Add tests for AndroidManifestFinder simulating the presence of a build flavor
1 parent 649d216 commit 977abb8

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

AndroidAnnotations/androidannotations-core/androidannotations/src/test/java/org/androidannotations/internal/helper/AndroidManifestFinderTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
public class AndroidManifestFinderTest {
3535

3636
private static final String GRADLE_GEN_FOLDER = "build/generated/source/apt/debug";
37+
private static final String GRADLE_FLAVOR_GEN_FOLDER = "build/generated/source/apt/flavor/debug";
3738
private static final String GRADLE_KOTLIN_GEN_FOLDER = "build/generated/source/kapt/debug";
39+
private static final String GRADLE_KOTLIN_FLAVOR_GEN_FOLDER = "build/generated/source/kapt/flavorDebug";
3840

3941
private static final String MAVEN_GEN_FOLDER = "target/generated-sources/annotations";
4042

@@ -58,10 +60,16 @@ public static Iterable<Object[]> createTestData() {
5860
Object[] gradleManifestFoundInManifests = { GRADLE_GEN_FOLDER, "build/intermediates/manifests/full/debug", true };
5961
Object[] gradleManifestFoundInBundles = { GRADLE_GEN_FOLDER, "build/intermediates/bundles/debug", true };
6062
Object[] gradleManifestFoundInManifestsAapt = { GRADLE_GEN_FOLDER, "build/intermediates/manifests/aapt/debug", true };
63+
Object[] gradleManifestFoundInManifestsWithFlavor = { GRADLE_FLAVOR_GEN_FOLDER, "build/intermediates/manifests/full/flavor/debug", true };
64+
Object[] gradleManifestFoundInBundlesWithFlavor = { GRADLE_FLAVOR_GEN_FOLDER, "build/intermediates/bundles/flavor/debug", true };
65+
Object[] gradleManifestFoundInManifestsAaptWithFlavor = { GRADLE_FLAVOR_GEN_FOLDER, "build/intermediates/manifests/aapt/flavor/debug", true };
6166

6267
Object[] gradleKotlinManifestFoundInManifests = { GRADLE_KOTLIN_GEN_FOLDER, "build/intermediates/manifests/full/debug", true };
6368
Object[] gradleKotlinManifestFoundInBundles = { GRADLE_KOTLIN_GEN_FOLDER, "build/intermediates/bundles/debug", true };
6469
Object[] gradleKotlinManifestFoundInManifestsAapt = { GRADLE_KOTLIN_GEN_FOLDER, "build/intermediates/manifests/aapt/debug", true };
70+
Object[] gradleKotlinManifestFoundInManifestsWithFlavor = { GRADLE_KOTLIN_FLAVOR_GEN_FOLDER, "build/intermediates/manifests/full/flavor/debug", true };
71+
Object[] gradleKotlinManifestFoundInBundlesWithFlavor = { GRADLE_KOTLIN_FLAVOR_GEN_FOLDER, "build/intermediates/bundles/flavor/debug", true };
72+
Object[] gradleKotlinManifestFoundInManifestsAaptWithFlavor = { GRADLE_KOTLIN_FLAVOR_GEN_FOLDER, "build/intermediates/manifests/aapt/flavor/debug", true };
6573

6674
Object[] mavenManifestFoundInTarget = { MAVEN_GEN_FOLDER, "target", true };
6775
Object[] mavenManifestFoundInSrc = { MAVEN_GEN_FOLDER, "src/main", true };
@@ -80,7 +88,9 @@ public static Iterable<Object[]> createTestData() {
8088
Object[] noGeneratedFolderFound = { "", "", false };
8189

8290
return Arrays.asList(gradleManifestFoundInManifests, gradleManifestFoundInBundles, gradleManifestFoundInManifestsAapt,
91+
gradleManifestFoundInManifestsWithFlavor, gradleManifestFoundInBundlesWithFlavor, gradleManifestFoundInManifestsAaptWithFlavor,
8392
gradleKotlinManifestFoundInManifests, gradleKotlinManifestFoundInBundles, gradleKotlinManifestFoundInManifestsAapt,
93+
gradleKotlinManifestFoundInManifestsWithFlavor, gradleKotlinManifestFoundInBundlesWithFlavor, gradleKotlinManifestFoundInManifestsAaptWithFlavor,
8494
mavenManifestFoundInTarget, mavenManifestFoundInSrc, mavenManifestFoundInRoot, eclipseManifestFound,
8595
gradleManifestNotFound, gradleKotlinManifestNotFound, mavenManifestNotFound, eclipseManifestNotFound,
8696
noGeneratedFolderFound);

0 commit comments

Comments
 (0)