OSDN Git Service

Add auto-generated tested.project.dir property
authorPiotr Gurgul <pgurgul@google.com>
Tue, 22 Sep 2009 20:58:28 +0000 (13:58 -0700)
committerPiotr Gurgul <pgurgul@google.com>
Tue, 22 Sep 2009 20:58:28 +0000 (13:58 -0700)
Adds tested.project.dir=".." to ProjectDir/tests/build.properties in order
to indicate automatically that this is a test project and point the
tested project directory.

sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ProjectCreator.java
sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ProjectProperties.java

index 916fa7c..3e15e15 100644 (file)
@@ -203,6 +203,10 @@ public class ProjectCreator {
             ProjectProperties buildProperties = ProjectProperties.create(folderPath,
                     PropertyType.BUILD);
             buildProperties.setProperty(ProjectProperties.PROPERTY_APP_PACKAGE, packageName);
+            if (isTestProject == true) {
+                buildProperties.setProperty(ProjectProperties.PROPERTY_TESTED_PROJECT, "..");
+            }
+
             buildProperties.save();
 
             // create the map for place-holders of values to replace in the templates
index 5b35d50..694e285 100644 (file)
@@ -46,6 +46,8 @@ public final class ProjectProperties {
 
     public final static String PROPERTY_SPLIT_BY_DENSITY = "split.density";
 
+    public final static String PROPERTY_TESTED_PROJECT = "tested.project.dir";
+
     public static enum PropertyType {
         BUILD("build.properties", BUILD_HEADER),
         DEFAULT("default.properties", DEFAULT_HEADER),