am 60a735fd: Merge change 9352 into donut

Merge commit '60a735fda1f9d7c24c577853304d486b0109632f'

* commit '60a735fda1f9d7c24c577853304d486b0109632f':
  ADT: fix PreCompilerBuilder to use minSdkVersion as a string, not an int.
This commit is contained in:
Android (Google) Code Review
2009-07-31 11:05:43 -07:00
committed by Android Git Automerger

View File

@@ -291,6 +291,9 @@ public class PreCompilerBuilder extends BaseBuilder {
// This interrupts the build. The next builders will not run. // This interrupts the build. The next builders will not run.
stopBuild(msg); stopBuild(msg);
// TODO: document whether code below that uses manifest (which is now guaranteed
// to be null) will actually be executed or not.
} }
// lets check the XML of the manifest first, if that hasn't been done by the // lets check the XML of the manifest first, if that hasn't been done by the
@@ -342,7 +345,7 @@ public class PreCompilerBuilder extends BaseBuilder {
} else if (minSdkValue < projectVersion.getApiLevel()) { } else if (minSdkValue < projectVersion.getApiLevel()) {
// integer minSdk is not high enough for the target => warning // integer minSdk is not high enough for the target => warning
String msg = String.format( String msg = String.format(
"Manifest min SDK version (%1$d) is lower than project target API level (%2$d)", "Manifest min SDK version (%1$s) is lower than project target API level (%2$d)",
minSdkVersion, projectVersion.getApiLevel()); minSdkVersion, projectVersion.getApiLevel());
AdtPlugin.printBuildToConsole(AdtConstants.BUILD_VERBOSE, project, msg); AdtPlugin.printBuildToConsole(AdtConstants.BUILD_VERBOSE, project, msg);
BaseProjectHelper.addMarker(manifest, AdtConstants.MARKER_ADT, msg, BaseProjectHelper.addMarker(manifest, AdtConstants.MARKER_ADT, msg,
@@ -383,11 +386,14 @@ public class PreCompilerBuilder extends BaseBuilder {
// This interrupts the build. The next builders will not run. // This interrupts the build. The next builders will not run.
stopBuild(msg); stopBuild(msg);
// TODO: document whether code below that uses javaPackage (which is now guaranteed
// to be null) will actually be executed or not.
} }
// at this point we have the java package. We need to make sure it's not a different // at this point we have the java package. We need to make sure it's not a different
// package than the previous one that were built. // package than the previous one that were built.
if (javaPackage.equals(mManifestPackage) == false) { if (javaPackage != null && javaPackage.equals(mManifestPackage) == false) {
// The manifest package has changed, the user may want to update // The manifest package has changed, the user may want to update
// the launch configuration // the launch configuration
if (mManifestPackage != null) { if (mManifestPackage != null) {
@@ -421,7 +427,7 @@ public class PreCompilerBuilder extends BaseBuilder {
// get the file system path // get the file system path
IPath outputLocation = mGenFolder.getLocation(); IPath outputLocation = mGenFolder.getLocation();
IPath resLocation = resFolder.getLocation(); IPath resLocation = resFolder.getLocation();
IPath manifestLocation = manifest.getLocation(); IPath manifestLocation = manifest == null ? null : manifest.getLocation();
// those locations have to exist for us to do something! // those locations have to exist for us to do something!
if (outputLocation != null && resLocation != null if (outputLocation != null && resLocation != null