Skip to content

Commit c64d8ae

Browse files
committed
Merge pull request androidannotations#367 from excilys/360_manifest_file
androidManifestFile pointing to AndroidManifest.xml. Fixes androidannotations#360
2 parents f44f2fb + c5d338f commit c64d8ae

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

AndroidAnnotations/androidannotations/src/main/java/com/googlecode/androidannotations/helper/AndroidManifestFinder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
public class AndroidManifestFinder {
4242

43-
private static final String ANDROID_MANIFEST_FILE = "androidManifestFile";
43+
private static final String ANDROID_MANIFEST_FILE_OPTION = "androidManifestFile";
4444

4545
private static final int MAX_PARENTS_FROM_SOURCE_FOLDER = 10;
4646

@@ -87,16 +87,16 @@ private AndroidManifest extractAndroidManifestThrowing() throws Exception {
8787
}
8888

8989
private File findManifestFileThrowing() throws Exception {
90-
if (processingEnv.getOptions().containsKey(ANDROID_MANIFEST_FILE)) {
90+
if (processingEnv.getOptions().containsKey(ANDROID_MANIFEST_FILE_OPTION)) {
9191
return findManifestInSpecifiedPath();
9292
} else {
9393
return findManifestInParentsDirectories();
9494
}
9595
}
9696

9797
private File findManifestInSpecifiedPath() {
98-
String path = processingEnv.getOptions().get(ANDROID_MANIFEST_FILE);
99-
File androidManifestFile = new File(path, "AndroidManifest.xml");
98+
String path = processingEnv.getOptions().get(ANDROID_MANIFEST_FILE_OPTION);
99+
File androidManifestFile = new File(path);
100100
Messager messager = processingEnv.getMessager();
101101
if (!androidManifestFile.exists()) {
102102
throw new IllegalStateException("Could not find the AndroidManifest.xml file in specified path : " + path);

AndroidAnnotations/androidannotations/src/test/java/com/googlecode/androidannotations/utils/AAProcessorTestHelper.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ public class AAProcessorTestHelper extends ProcessorTestHelper {
88

99
public void addManifestProcessorParameter(Class<?> classOfPackagingContainingManifest) {
1010
String manifestPath = classOfPackagingContainingManifest.getResource("AndroidManifest.xml").getPath();
11-
String manifestPackagePath = manifestPath.substring(0, manifestPath.lastIndexOf("/"));
12-
addProcessorParameter("androidManifestFile", manifestPackagePath);
11+
addProcessorParameter("androidManifestFile", manifestPath);
1312
}
1413

1514
public File toGeneratedFile(Class<?> compiledClass) {

0 commit comments

Comments
 (0)