- add android clean target to android deployment


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8201 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 14 years ago
parent 69fe43f079
commit 4f149cc90b
  1. 4
      sdk/jme3-android/src/com/jme3/gde/android/MobileCompositeProvider.java
  2. 2
      sdk/jme3-android/src/com/jme3/gde/android/mobile-targets.xml
  3. 23
      sdk/jme3-core/src/com/jme3/gde/core/j2seproject/ProjectExtensionManager.java

@ -62,7 +62,7 @@ public class MobileCompositeProvider implements ProjectCustomizer.CompositeCateg
private class SavePropsListener implements ActionListener {
private String extensionName = "mobile";
private String extensionVersion = "v0.9";
private String extensionVersion = "v0.10";
private String[] extensionDependencies = new String[]{"jar", "-mobile-deployment"};
private ProjectExtensionManager manager = new ProjectExtensionManager(extensionName, extensionVersion, extensionDependencies);
private ProjectExtensionProperties properties;
@ -78,7 +78,7 @@ public class MobileCompositeProvider implements ProjectCustomizer.CompositeCateg
if ("true".equals(properties.getProperty("mobile.android.enabled"))) {
manager.loadTargets("nbres:/com/jme3/gde/android/mobile-targets.xml");
manager.checkExtension(project);
manager.addRunConfiguration(project, "run-android", "Android Emulator", "run-android");
manager.addRunConfiguration(project, "run-android", "Android Device", "run-android", "run-android", "clean clean-android");
AndroidSdkTool.checkProject(project,
properties.getProperty("mobile.android.target"),
properties.getProperty("application.title"),

@ -2,7 +2,7 @@
<ant dir="mobile" target="install"/>
</target>
<target name="-clean-android">
<target name="clean-android">
<ant dir="mobile" target="clean"/>
</target>

@ -315,6 +315,29 @@ public class ProjectExtensionManager {
}
}
/**
* Adds a run configuration (works direct, no removing)
* @param project
* @param name File name of the configuration
* @param label Label in the dropdown box
* @param runTarget Target for "run"
* @param debugTarget Target for "debug"
*/
public void addRunConfiguration(Project project, String name, String label, String runTarget, String debugTarget, String cleanTarget) {
try {
EditableProperties properties = new EditableProperties(true);
properties.setProperty("$label", label);
properties.setProperty("$target.run", runTarget);
properties.setProperty("$target.debug", debugTarget);
properties.setProperty("$target.clean", cleanTarget);
J2SEProjectConfigurations.createConfigurationFiles(project, name, properties, null);
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
} catch (IllegalArgumentException ex) {
Exceptions.printStackTrace(ex);
}
}
/**
* Adds a run configuration (works direct, no removing)
* @param project

Loading…
Cancel
Save