Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ boolean applies() {

private static class GradleAndroidManifestFinderStrategy extends AndroidManifestFinderStrategy {

static final Pattern GRADLE_GEN_FOLDER = Pattern.compile("^(.*?)build[\\\\/]generated[\\\\/]source[\\\\/]apt(.*)$");
static final Pattern GRADLE_GEN_FOLDER = Pattern.compile("^(.*?)build[\\\\/]generated[\\\\/]source[\\\\/]k?apt(.*)$");

GradleAndroidManifestFinderStrategy(String sourceFolder) {
super("Gradle", GRADLE_GEN_FOLDER, sourceFolder);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* Copyright (C) 2010-2016 eBusiness Information, Excilys Group
* Copyright (C) 2016-2017 the AndroidAnnotations project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
Expand Down Expand Up @@ -33,6 +34,7 @@
public class AndroidManifestFinderTest {

private static final String GRADLE_GEN_FOLDER = "build/generated/source/apt/debug";
private static final String GRADLE_KOTLIN_GEN_FOLDER = "build/generated/source/kapt/debug";

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

Expand All @@ -57,6 +59,10 @@ public static Iterable<Object[]> createTestData() {
Object[] gradleManifestFoundInBundles = { GRADLE_GEN_FOLDER, "build/intermediates/bundles/debug", true };
Object[] gradleManifestFoundInManifestsAapt = { GRADLE_GEN_FOLDER, "build/intermediates/manifests/aapt/debug", true };

Object[] gradleKotlinManifestFoundInManifests = { GRADLE_KOTLIN_GEN_FOLDER, "build/intermediates/manifests/full/debug", true };
Object[] gradleKotlinManifestFoundInBundles = { GRADLE_KOTLIN_GEN_FOLDER, "build/intermediates/bundles/debug", true };
Object[] gradleKotlinManifestFoundInManifestsAapt = { GRADLE_KOTLIN_GEN_FOLDER, "build/intermediates/manifests/aapt/debug", true };

Object[] mavenManifestFoundInTarget = { MAVEN_GEN_FOLDER, "target", true };
Object[] mavenManifestFoundInSrc = { MAVEN_GEN_FOLDER, "src/main", true };
Object[] mavenManifestFoundInRoot = { MAVEN_GEN_FOLDER, "", true };
Expand All @@ -65,15 +71,19 @@ public static Iterable<Object[]> createTestData() {

Object[] gradleManifestNotFound = { GRADLE_GEN_FOLDER, "", false };

Object[] gradleKotlinManifestNotFound = { GRADLE_KOTLIN_GEN_FOLDER, "", false };

Object[] mavenManifestNotFound = { MAVEN_GEN_FOLDER, "something", false };

Object[] eclipseManifestNotFound = { ECLIPSE_GEN_FOLDER, "something", false };

Object[] noGeneratedFolderFound = { "", "", false };

return Arrays.asList(gradleManifestFoundInManifests, gradleManifestFoundInBundles, gradleManifestFoundInManifestsAapt,
gradleKotlinManifestFoundInManifests, gradleKotlinManifestFoundInBundles, gradleKotlinManifestFoundInManifestsAapt,
mavenManifestFoundInTarget, mavenManifestFoundInSrc, mavenManifestFoundInRoot, eclipseManifestFound,
gradleManifestNotFound, mavenManifestNotFound, eclipseManifestNotFound, noGeneratedFolderFound);
gradleManifestNotFound, gradleKotlinManifestNotFound, mavenManifestNotFound, eclipseManifestNotFound,
noGeneratedFolderFound);
}

@Test
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.