diff options
author | Xavier Ducrohet <xav@google.com> | 2014-02-20 18:24:36 -0800 |
---|---|---|
committer | Xavier Ducrohet <xav@google.com> | 2014-02-20 18:24:36 -0800 |
commit | 88fe4f70e3d5375fb257ded3ad640667c1af673b (patch) | |
tree | 101e15643b6d5a8ccbb039d755bb3111f445ec6c /eclipse | |
parent | 05ba8b400c5e147d15b571b83f59690f4a4fc506 (diff) | |
download | sdk-88fe4f70e3d5375fb257ded3ad640667c1af673b.zip sdk-88fe4f70e3d5375fb257ded3ad640667c1af673b.tar.gz sdk-88fe4f70e3d5375fb257ded3ad640667c1af673b.tar.bz2 |
Fix support for rsSupportMode in Eclipse.
Change-Id: I1908912102ca597fbe2bfa34b343e30f8c7a19d2
Diffstat (limited to 'eclipse')
3 files changed, 15 insertions, 1 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/BaseBuilder.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/BaseBuilder.java index 9882a0c..1625914 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/BaseBuilder.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/BaseBuilder.java @@ -35,6 +35,7 @@ import com.android.io.IAbstractFile; import com.android.io.StreamException; import com.android.sdklib.BuildToolInfo; import com.android.sdklib.IAndroidTarget; +import com.android.sdklib.repository.FullRevision; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFile; 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 2554c79..8a3d203 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 @@ -28,6 +28,7 @@ import com.android.ide.eclipse.adt.internal.build.Messages; import com.android.ide.eclipse.adt.internal.build.RenderScriptLauncher; import com.android.ide.eclipse.adt.internal.build.RsSourceChangeHandler; import com.android.ide.eclipse.adt.internal.build.SourceProcessor; +import com.android.ide.eclipse.adt.internal.build.builders.BaseBuilder.AbortBuildException; import com.android.ide.eclipse.adt.internal.lint.EclipseLintClient; import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs; import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs.BuildVerbosity; @@ -57,6 +58,7 @@ import com.android.sdklib.internal.build.SymbolLoader; import com.android.sdklib.internal.build.SymbolWriter; import com.android.sdklib.internal.project.ProjectProperties; import com.android.sdklib.io.FileOp; +import com.android.sdklib.repository.FullRevision; import com.android.utils.ILogger; import com.android.utils.Pair; import com.android.xml.AndroidManifest; @@ -431,6 +433,17 @@ public class PreCompilerBuilder extends BaseBuilder { return result; } + if (projectState.getRenderScriptSupportMode()) { + FullRevision minBuildToolsRev = new FullRevision(19,0,3); + if (mBuildToolInfo.getRevision().compareTo(minBuildToolsRev) == -1) { + String msg = "RenderScript support mode requires Build-Tools 19.0.3 or later."; + AdtPlugin.printErrorToConsole(project, msg); + markProject(AdtConstants.MARKER_ADT, msg, IMarker.SEVERITY_ERROR); + + return result; + } + } + // get the manifest file IFile manifestFile = ProjectHelper.getManifest(project); diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/LibraryClasspathContainerInitializer.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/LibraryClasspathContainerInitializer.java index 1e0ada0..914e1de 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/LibraryClasspathContainerInitializer.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/LibraryClasspathContainerInitializer.java @@ -338,7 +338,7 @@ public class LibraryClasspathContainerInitializer extends BaseClasspathContainer return null; } BuildToolInfo buildToolInfo = state.getBuildToolInfo(); - if (buildToolInfo == null) { + if (buildToolInfo != null) { buildToolInfo = Sdk.getCurrent().getLatestBuildTool(); if (buildToolInfo == null) { |