aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2012-02-16 17:08:13 -0800
committerXavier Ducrohet <xav@android.com>2012-02-16 17:08:13 -0800
commit8688abd925ddd7288f9e9075f065ecd12a81ae05 (patch)
tree0a0c2127b0589202aaf419a19743e49fafd933af
parent7c65c6065057425170d5c37ecfc2f7f288889a64 (diff)
downloadsdk-8688abd925ddd7288f9e9075f065ecd12a81ae05.zip
sdk-8688abd925ddd7288f9e9075f065ecd12a81ae05.tar.gz
sdk-8688abd925ddd7288f9e9075f065ecd12a81ae05.tar.bz2
Remove warning that minsdkVersion is lower than the compile target.
This is not needed anymore now that Lint can check if this is actually a problem or not. Change-Id: I9f43f46033e07c44b78728e8582364b355ff1ccf
-rw-r--r--anttasks/src/com/android/ant/NewSetupTask.java7
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/PostCompilerBuilder.java6
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/PreCompilerBuilder.java22
3 files changed, 14 insertions, 21 deletions
diff --git a/anttasks/src/com/android/ant/NewSetupTask.java b/anttasks/src/com/android/ant/NewSetupTask.java
index f3fd9aa..1f29d17 100644
--- a/anttasks/src/com/android/ant/NewSetupTask.java
+++ b/anttasks/src/com/android/ant/NewSetupTask.java
@@ -412,12 +412,7 @@ public class NewSetupTask extends Task {
antProject.setProperty(mTargetApiOut, value);
int projectApiLevel = androidVersion.getApiLevel();
- if (minSdkValue < projectApiLevel) {
- System.out.println(String.format(
- "WARNING: Attribute %1$s in AndroidManifest.xml (%2$d) is lower than the project target API level (%3$d)",
- AndroidManifest.ATTRIBUTE_MIN_SDK_VERSION,
- minSdkValue, projectApiLevel));
- } else if (minSdkValue > androidVersion.getApiLevel()) {
+ if (minSdkValue > androidVersion.getApiLevel()) {
System.out.println(String.format(
"WARNING: Attribute %1$s in AndroidManifest.xml (%2$d) is higher than the project target API level (%3$d)",
AndroidManifest.ATTRIBUTE_MIN_SDK_VERSION,
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/PostCompilerBuilder.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/PostCompilerBuilder.java
index 5f39c99..e963af8 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/PostCompilerBuilder.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/PostCompilerBuilder.java
@@ -237,9 +237,11 @@ public class PostCompilerBuilder extends BaseBuilder {
}
// build() returns a list of project from which this project depends for future compilation.
- @SuppressWarnings({"unchecked"})
@Override
- protected IProject[] build(int kind, Map args, IProgressMonitor monitor)
+ protected IProject[] build(
+ int kind,
+ @SuppressWarnings("rawtypes") Map args,
+ IProgressMonitor monitor)
throws CoreException {
// get a project object
IProject project = getProject();
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/PreCompilerBuilder.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/PreCompilerBuilder.java
index ce37d61..7713f47 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/PreCompilerBuilder.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/PreCompilerBuilder.java
@@ -205,9 +205,11 @@ public class PreCompilerBuilder extends BaseBuilder {
}
// build() returns a list of project from which this project depends for future compilation.
- @SuppressWarnings("unchecked")
@Override
- protected IProject[] build(int kind, Map args, IProgressMonitor monitor)
+ protected IProject[] build(
+ int kind,
+ @SuppressWarnings("rawtypes") Map args,
+ IProgressMonitor monitor)
throws CoreException {
// get a project object
IProject project = getProject();
@@ -411,15 +413,6 @@ public class PreCompilerBuilder extends BaseBuilder {
BaseProjectHelper.markResource(manifestFile, AdtConstants.MARKER_ADT,
msg, IMarker.SEVERITY_ERROR);
return result;
- } else if (minSdkValue < targetVersion.getApiLevel()) {
- // integer minSdk is not high enough for the target => warning
- String msg = String.format(
- "Attribute %1$s (%2$d) is lower than the project target API level (%3$d)",
- AndroidManifest.ATTRIBUTE_MIN_SDK_VERSION,
- minSdkValue, targetVersion.getApiLevel());
- AdtPlugin.printBuildToConsole(BuildVerbosity.VERBOSE, project, msg);
- BaseProjectHelper.markResource(manifestFile, AdtConstants.MARKER_ADT,
- msg, IMarker.SEVERITY_WARNING);
} else if (minSdkValue > targetVersion.getApiLevel()) {
// integer minSdk is too high for the target => warning
String msg = String.format(
@@ -650,8 +643,8 @@ public class PreCompilerBuilder extends BaseBuilder {
}
}
- @SuppressWarnings("unchecked")
- private void handleBuildConfig(Map args) throws IOException, CoreException {
+ private void handleBuildConfig(@SuppressWarnings("rawtypes") Map args)
+ throws IOException, CoreException {
boolean debugMode = !args.containsKey(RELEASE_REQUESTED);
BuildConfigGenerator generator = new BuildConfigGenerator(
@@ -793,7 +786,10 @@ public class PreCompilerBuilder extends BaseBuilder {
// launch aapt: create the command line
ArrayList<String> array = new ArrayList<String>();
+
+ @SuppressWarnings("deprecation")
String aaptPath = projectTarget.getPath(IAndroidTarget.AAPT);
+
array.add(aaptPath);
array.add("package"); //$NON-NLS-1$
array.add("-m"); //$NON-NLS-1$