Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Commit c5d338f

Browse files
committed
The manifest file processor option now points to the file, not to the directory of the manifest file. #360
1 parent f44f2fb commit c5d338f

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎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)