diff options
12 files changed, 27 insertions, 668 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ContextPullParser.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ContextPullParser.java index c77c853..f304065 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ContextPullParser.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ContextPullParser.java @@ -34,7 +34,7 @@ import static com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutMet import com.android.SdkConstants; import com.android.ide.common.rendering.api.ILayoutPullParser; import com.android.ide.common.rendering.api.IProjectCallback; -import com.android.ide.common.resources.ValueResourceParser; +import com.android.ide.common.res2.ValueXmlHelper; import com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutMetadata; import com.google.common.collect.Maps; @@ -159,7 +159,7 @@ public class ContextPullParser extends KXmlParser implements ILayoutPullParser { } // Handle unicode escapes etc - value = ValueResourceParser.unescapeResourceString(value, false, false); + value = ValueXmlHelper.unescapeResourceString(value, false, false); return value; } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/UiElementPullParser.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/UiElementPullParser.java index e8e0d79..8581568 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/UiElementPullParser.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/UiElementPullParser.java @@ -36,7 +36,7 @@ import static com.android.SdkConstants.VIEW_INCLUDE; import com.android.ide.common.rendering.api.ILayoutPullParser; import com.android.ide.common.rendering.api.ViewInfo; -import com.android.ide.common.resources.ValueResourceParser; +import com.android.ide.common.res2.ValueXmlHelper; import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.LayoutDescriptors; import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor; import com.android.ide.eclipse.adt.internal.editors.layout.gle2.FragmentMenu; @@ -399,7 +399,7 @@ public class UiElementPullParser extends BasePullParser { } // Handle unicode escapes etc - value = ValueResourceParser.unescapeResourceString(value, false, false); + value = ValueXmlHelper.unescapeResourceString(value, false, false); return value; } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/ManifestInfo.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/ManifestInfo.java index 55cad2b..e43b04c 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/ManifestInfo.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/ManifestInfo.java @@ -225,9 +225,9 @@ public class ManifestInfo { String theme = activity.getAttributeNS(NS_RESOURCES, ATTRIBUTE_THEME); if (theme != null && theme.length() > 0) { String name = activity.getAttributeNS(NS_RESOURCES, ATTRIBUTE_NAME); - if (name.startsWith(".") //$NON-NLS-1$ - && mPackage != null && mPackage.length() > 0) { - name = mPackage + name; + int index = name.indexOf('.'); + if (index <= 0 && mPackage != null && !mPackage.isEmpty()) { + name = mPackage + (index == -1 ? "." : "") + name; } mActivityThemes.put(name, theme); } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactorings/extractstring/ExtractStringRefactoring.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactorings/extractstring/ExtractStringRefactoring.java index 7d0f926..db0b096 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactorings/extractstring/ExtractStringRefactoring.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactorings/extractstring/ExtractStringRefactoring.java @@ -20,7 +20,7 @@ import static com.android.SdkConstants.QUOT_ENTITY; import static com.android.SdkConstants.STRING_PREFIX; import com.android.SdkConstants; -import com.android.ide.common.resources.ValueResourceParser; +import com.android.ide.common.res2.ValueXmlHelper; import com.android.ide.common.xml.ManifestData; import com.android.ide.eclipse.adt.AdtConstants; import com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor; @@ -1217,7 +1217,7 @@ public class ExtractStringRefactoring extends Refactoring { IStructuredModel smodel = null; // Single and double quotes must be escaped in the <string>value</string> declaration - tokenString = ValueResourceParser.escapeResourceString(tokenString); + tokenString = ValueXmlHelper.escapeResourceString(tokenString); try { IStructuredDocument sdoc = null; diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/resources/manager/ProjectResources.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/resources/manager/ProjectResources.java index 68c2257..7c3fd4c 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/resources/manager/ProjectResources.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/resources/manager/ProjectResources.java @@ -65,7 +65,7 @@ public class ProjectResources extends ResourceRepository { private Map<IntArrayWrapper, String> mStyleableValueToNameMap; private final DynamicIdMap mDynamicIdMap = new DynamicIdMap(DYNAMIC_ID_SEED_START); - + private final IntArrayWrapper mWrapper = new IntArrayWrapper(null); private final IProject mProject; public static ProjectResources create(IProject project) { diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/Sdk.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/Sdk.java index 74f08c2..ad2648f 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/Sdk.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/Sdk.java @@ -384,7 +384,7 @@ public final class Sdk { @Nullable public BuildToolInfo getLatestBuildTool() { - return mManager.getLatestBuildTool(false /*isPreview*/); + return mManager.getLatestBuildTool(); } /** diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewProjectCreator.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewProjectCreator.java index eea9d36..8c8fa29 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewProjectCreator.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewProjectCreator.java @@ -18,12 +18,13 @@ package com.android.ide.eclipse.adt.internal.wizards.newproject; import static com.android.SdkConstants.FN_PROJECT_PROPERTIES; import static com.android.sdklib.internal.project.ProjectProperties.PROPERTY_LIBRARY; + import static org.eclipse.core.resources.IResource.DEPTH_ZERO; import com.android.SdkConstants; import com.android.annotations.NonNull; import com.android.annotations.Nullable; -import com.android.ide.common.resources.ValueResourceParser; +import com.android.ide.common.res2.ValueXmlHelper; import com.android.ide.common.xml.ManifestData; import com.android.ide.common.xml.XmlFormatStyle; import com.android.ide.eclipse.adt.AdtConstants; @@ -1058,7 +1059,7 @@ public class NewProjectCreator { String value = strings.get(key); // Escape values if necessary - value = ValueResourceParser.escapeResourceString(value); + value = ValueXmlHelper.escapeResourceString(value); // place them in the template String stringDef = stringTemplate.replace(PARAM_STRING_NAME, key); diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newxmlfile/AddTranslationDialog.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newxmlfile/AddTranslationDialog.java index ce7e936..0be37cf 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newxmlfile/AddTranslationDialog.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newxmlfile/AddTranslationDialog.java @@ -20,6 +20,7 @@ import static com.android.SdkConstants.FD_RES_VALUES; import static com.android.SdkConstants.RES_QUALIFIER_SEP; import com.android.ide.common.rendering.api.ResourceValue; +import com.android.ide.common.res2.ValueXmlHelper; import com.android.ide.common.resources.ResourceItem; import com.android.ide.common.resources.configuration.FolderConfiguration; import com.android.ide.eclipse.adt.AdtPlugin; @@ -384,7 +385,7 @@ public class AddTranslationDialog extends Dialog implements ControlListener, Sel sb.append(" <string name=\""); //$NON-NLS-1$ sb.append(key); sb.append("\">"); //$NON-NLS-1$ - sb.append(value); + sb.append(ValueXmlHelper.escapeResourceString(value)); sb.append("</string>\n"); //$NON-NLS-1$ } sb.append("\n</resources>"); //$NON-NLS-1$ diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlStringMethod.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlStringMethod.java index ffcfa3e..2255653 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlStringMethod.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlStringMethod.java @@ -15,7 +15,7 @@ */ package com.android.ide.eclipse.adt.internal.wizards.templates; -import com.android.ide.common.resources.ValueResourceParser; +import com.android.ide.common.res2.ValueXmlHelper; import freemarker.template.SimpleScalar; import freemarker.template.TemplateMethodModel; @@ -38,6 +38,6 @@ public class FmEscapeXmlStringMethod implements TemplateMethodModel { throw new TemplateModelException("Wrong arguments"); } String string = args.get(0).toString(); - return new SimpleScalar(ValueResourceParser.escapeResourceString(string)); + return new SimpleScalar(ValueXmlHelper.escapeResourceString(string)); } }
\ No newline at end of file diff --git a/eclipse/plugins/com.android.ide.eclipse.base/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.base/META-INF/MANIFEST.MF index 4d42a1a..fc7fd5c 100644 --- a/eclipse/plugins/com.android.ide.eclipse.base/META-INF/MANIFEST.MF +++ b/eclipse/plugins/com.android.ide.eclipse.base/META-INF/MANIFEST.MF @@ -28,9 +28,12 @@ Export-Package: com.android, com.android.annotations, com.android.annotations.concurrency, com.android.dvlib, + com.android.ide.common.internal, + com.android.ide.common.packaging, com.android.ide.common.rendering, com.android.ide.common.rendering.api, com.android.ide.common.rendering.legacy, + com.android.ide.common.res2, com.android.ide.common.resources, com.android.ide.common.resources.configuration, com.android.ide.common.sdk, diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/manifest/ManifestInfoTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/manifest/ManifestInfoTest.java index f4b8cee..e9010c4 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/manifest/ManifestInfoTest.java +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/manifest/ManifestInfoTest.java @@ -22,6 +22,7 @@ import static com.android.resources.ScreenSize.XLARGE; import com.android.ide.eclipse.adt.internal.editors.layout.refactoring.AdtProjectTest; import com.android.ide.eclipse.adt.internal.resources.ResourceHelper; import com.android.sdklib.AndroidVersion; +import com.android.sdklib.BuildToolInfo; import com.android.sdklib.IAndroidTarget; import com.android.sdklib.ISystemImage; @@ -403,5 +404,10 @@ public class ManifestInfoTest extends AdtProjectTest { public List<String> getBootClasspath() { return new ArrayList<String>(); } + + @Override + public BuildToolInfo getBuildToolInfo() { + return null; + } } } diff --git a/sdkmanager/libs/sdklib/src/com/android/sdklib/repository/sdk-repository-8.xsd b/sdkmanager/libs/sdklib/src/com/android/sdklib/repository/sdk-repository-8.xsd deleted file mode 100755 index ade39d6..0000000 --- a/sdkmanager/libs/sdklib/src/com/android/sdklib/repository/sdk-repository-8.xsd +++ /dev/null @@ -1,652 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<xsd:schema - targetNamespace="http://schemas.android.com/sdk/android/repository/8" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:sdk="http://schemas.android.com/sdk/android/repository/8" - elementFormDefault="qualified" - attributeFormDefault="unqualified" - version="1"> - - <!-- The repository contains a collection of downloadable items known as - "packages". Each package has a type and various attributes and contains - a list of file "archives" that can be downloaded for specific OSes. - - An Android SDK repository is a web site that contains a "repository.xml" - file that conforms to this XML Schema. - - History: - - v1 is used by the SDK Updater in Tools r3 and r4. - - - v2 is used by the SDK Updater in Tools r5: - - It introduces a new <sample> repository type. Previously samples - were included in the <platform> packages. Instead this package is used - and and the samples are installed in $SDK/samples. - - All repository types have a new <obsolete> node. It works as a marker - to indicate the package is obsolete and should not be selected by default. - The UI also hides these out by default. - - - v3 is used by the SDK Updater in Tools r8: - - It introduces a new <platform-tool> repository type. Previously platform-specific - tools were included in the <platform> packages. Instead this package is used - and platform-specific tools are installed in $SDK/platform-tools - - There's a new element <min-platform-tools-rev> in <tool>. The tool package now - requires that at least some minimal version of <platform-tool> be installed. - - It removes the <addon> repository type, which is now in its own XML Schema. - - - v4 is used by the SDK Updater in Tools r12: - - <extra> element now has a <project-files> element that contains 1 or - or more <path>, each indicating the relative path of a file that this package - can contribute to installed projects. - - <platform> element now has a mandatory <layoutlib> that indicates the API - and revision of that layout library for this particular platform. - - - v5 is used by the SDK Manager in Tools r14: - - <extra> now has an <old-paths> element, a ;-separated list of old paths that - should be detected and migrated to the new <path> for that package. - - <platform> has a new optional <abi-included> that describes the ABI of the - system image included in the platform, if any. - - New <system-image> package type, to store system images outside of <platform>s. - - New <source> package type. - - - v6 is used by the SDK Manager in Tools r18: - - <extra> packages are removed. They are served only by the addon XML. - - <platform>, <system-image>, <source>, <tool>, <platform-tool>, <doc> - and <sample> get a new optional field <beta-rc> which can be used to indicate - the package is a Beta Release Candidate and not a final release. - - - v7 is used by the SDK Manager in Tools r20: - - For <tool> and <platform-tool> packages, the <revision> element becomes a - a "full revision" element with <major>, <minor>, <micro> and <preview> sub-elements. - - The <beta-rc> element is no longer supported, it is replaced by - <revision> -> <preview> and is only for <tool> and <platform-tool> packages. - - <min-tools-rev> and <min-platform-tools-rev> also become a full revision element. - - - v8 is used by the SDK Manager in Tools r22: - - It introduces the new <build-tool> repository type, which contains build-specific - tools that were before placed in either <tool> or <platform-tool> (e.g. ant, - aapt, aidl, etc.) - - <tool> has a new "min-build-tool" attribute. - --> - - <xsd:element name="sdk-repository" type="sdk:repositoryType" /> - - <xsd:complexType name="repositoryType"> - <xsd:annotation> - <xsd:documentation> - The repository contains a collection of downloadable packages. - </xsd:documentation> - </xsd:annotation> - <xsd:choice minOccurs="0" maxOccurs="unbounded"> - <xsd:element name="platform" type="sdk:platformType" /> - <xsd:element name="system-image" type="sdk:systemImageType" /> - <xsd:element name="source" type="sdk:sourceType" /> - <xsd:element name="tool" type="sdk:toolType" /> - <xsd:element name="platform-tool" type="sdk:platformToolType" /> - <xsd:element name="build-tool" type="sdk:buildToolType" /> - <xsd:element name="doc" type="sdk:docType" /> - <xsd:element name="sample" type="sdk:sampleType" /> - <xsd:element name="license" type="sdk:licenseType" /> - </xsd:choice> - </xsd:complexType> - - <!-- The definition of an SDK platform package. --> - - <xsd:complexType name="platformType"> - <xsd:annotation> - <xsd:documentation>An SDK platform package.</xsd:documentation> - </xsd:annotation> - <xsd:all> - <!-- The Android platform version. It is string such as "1.0". --> - <xsd:element name="version" type="xsd:normalizedString" /> - <!-- The Android API Level for the platform. An int > 0. --> - <xsd:element name="api-level" type="xsd:positiveInteger" /> - <!-- The optional codename for this platform, if it's a preview. --> - <xsd:element name="codename" type="xsd:string" minOccurs="0" /> - <!-- The revision, an int > 0, incremented each time a new - package is generated. --> - <xsd:element name="revision" type="xsd:positiveInteger" /> - - <!-- Information on the layoutlib packaged in this platform. --> - <xsd:element name="layoutlib" type="sdk:layoutlibType" /> - - <!-- optional elements --> - - <!-- The optional license of this package. If present, users will have - to agree to it before downloading. --> - <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> - <!-- The optional description of this package. --> - <xsd:element name="description" type="xsd:string" minOccurs="0" /> - <!-- The optional description URL of this package --> - <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> - <!-- The optional release note for this package. --> - <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> - <!-- The optional release note URL of this package --> - <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> - <!-- A list of file archives for this package. --> - <xsd:element name="archives" type="sdk:archivesType" /> - <!-- The minimal revision of tools required by this package. - Optional. If present, must be a revision element. --> - <xsd:element name="min-tools-rev" type="sdk:revisionType" minOccurs="0" /> - - <!-- The ABI of the system image *included* in this platform, if any. - When the field is present, it means the platform already embeds one - system image. A platform can also have any number of external - <system-image> associated with it. --> - <xsd:element name="included-abi" type="sdk:abiType" minOccurs="0" /> - - <!-- An optional element indicating the package is obsolete. - The string content is however currently not defined and ignored. --> - <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> - </xsd:all> - </xsd:complexType> - - - <!-- The definition of a layout library used by a platform. --> - - <xsd:complexType name="layoutlibType" > - <xsd:annotation> - <xsd:documentation> - Version information for a layoutlib included in a platform. - </xsd:documentation> - </xsd:annotation> - <xsd:all> - <!-- The layoutlib API level, an int > 0, - incremented with each new incompatible lib. --> - <xsd:element name="api" type="xsd:positiveInteger" /> - <!-- The incremental minor revision for that API, e.g. in case of bug fixes. - Optional. An int >= 0, assumed to be 0 if the element is missing. --> - <xsd:element name="revision" type="xsd:nonNegativeInteger" minOccurs="0" /> - </xsd:all> - </xsd:complexType> - - - <!-- The definition of a system image used by a platform. --> - - <xsd:complexType name="systemImageType" > - <xsd:annotation> - <xsd:documentation> - System Image for a platform. - </xsd:documentation> - </xsd:annotation> - <xsd:all> - <!-- api-level + codename identifies the platform to which this system image belongs. --> - - <!-- The Android API Level for the platform. An int > 0. --> - <xsd:element name="api-level" type="xsd:positiveInteger" /> - <!-- The optional codename for this platform, if it's a preview. --> - <xsd:element name="codename" type="xsd:string" minOccurs="0" /> - - <!-- The revision, an int > 0, incremented each time a new - package is generated. --> - <xsd:element name="revision" type="xsd:positiveInteger" /> - - <!-- The ABI of the system emulated by this image. --> - <xsd:element name="abi" type="sdk:abiType" /> - - <!-- The optional license of this package. If present, users will have - to agree to it before downloading. --> - <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> - <!-- The optional description of this package. --> - <xsd:element name="description" type="xsd:string" minOccurs="0" /> - <!-- The optional description URL of this package --> - <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> - <!-- The optional release note for this package. --> - <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> - <!-- The optional release note URL of this package --> - <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> - - <!-- A list of file archives for this package. --> - <xsd:element name="archives" type="sdk:archivesType" /> - - <!-- An optional element indicating the package is obsolete. - The string content is however currently not defined and ignored. --> - <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> - </xsd:all> - </xsd:complexType> - - - <!-- The definition of the ABI supported by a platform's system image. --> - - <xsd:simpleType name="abiType"> - <xsd:annotation> - <xsd:documentation>The ABI of a platform's system image.</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:token"> - <xsd:enumeration value="armeabi" /> - <xsd:enumeration value="armeabi-v7a" /> - <xsd:enumeration value="x86" /> - <xsd:enumeration value="mips" /> - </xsd:restriction> - </xsd:simpleType> - - - <!-- The definition of a source package. --> - - <xsd:complexType name="sourceType" > - <xsd:annotation> - <xsd:documentation> - Sources for a platform. - </xsd:documentation> - </xsd:annotation> - <xsd:all> - <!-- api-level + codename identifies the platform to which this source belongs. --> - - <!-- The Android API Level for the platform. An int > 0. --> - <xsd:element name="api-level" type="xsd:positiveInteger" /> - <!-- The optional codename for this platform, if it's a preview. --> - <xsd:element name="codename" type="xsd:string" minOccurs="0" /> - - <!-- The revision, an int > 0, incremented each time a new - package is generated. --> - <xsd:element name="revision" type="xsd:positiveInteger" /> - - <!-- The optional license of this package. If present, users will have - to agree to it before downloading. --> - <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> - <!-- The optional description of this package. --> - <xsd:element name="description" type="xsd:string" minOccurs="0" /> - <!-- The optional description URL of this package --> - <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> - <!-- The optional release note for this package. --> - <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> - <!-- The optional release note URL of this package --> - <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> - - <!-- A list of file archives for this package. --> - <xsd:element name="archives" type="sdk:archivesType" /> - - <!-- An optional element indicating the package is obsolete. - The string content is however currently not defined and ignored. --> - <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> - </xsd:all> - </xsd:complexType> - - - <!-- The definition of an SDK tool package. --> - - <xsd:complexType name="toolType" > - <xsd:annotation> - <xsd:documentation>An SDK tool package.</xsd:documentation> - </xsd:annotation> - <xsd:all> - <!-- The full revision (major.minor.micro.preview), incremented each - time a new package is generated. --> - <xsd:element name="revision" type="sdk:revisionType" /> - - <!-- The optional license of this package. If present, users will have - to agree to it before downloading. --> - <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> - <!-- The optional description of this package. --> - <xsd:element name="description" type="xsd:string" minOccurs="0" /> - <!-- The optional description URL of this package --> - <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> - <!-- The optional release note for this package. --> - <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> - <!-- The optional release note URL of this package --> - <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> - <!-- A list of file archives for this package. --> - <xsd:element name="archives" type="sdk:archivesType" /> - - <!-- The minimal revision of platform-tools required by this package. - Mandatory. Must be a revision element. --> - <xsd:element name="min-platform-tools-rev" type="sdk:revisionType" /> - - <!-- An optional element indicating the package is obsolete. - The string content is however currently not defined and ignored. --> - <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> - </xsd:all> - </xsd:complexType> - - - <!-- The definition of an SDK platform-tool package. --> - - <xsd:complexType name="platformToolType" > - <xsd:annotation> - <xsd:documentation>An SDK platform-tool package.</xsd:documentation> - </xsd:annotation> - <xsd:all> - <!-- The full revision (major.minor.micro.preview), incremented each - time a new package is generated. --> - <xsd:element name="revision" type="sdk:revisionType" /> - - <!-- The optional license of this package. If present, users will have - to agree to it before downloading. --> - <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> - <!-- The optional description of this package. --> - <xsd:element name="description" type="xsd:string" minOccurs="0" /> - <!-- The optional description URL of this package --> - <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> - <!-- The optional release note for this package. --> - <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> - <!-- The optional release note URL of this package --> - <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> - <!-- A list of file archives for this package. --> - <xsd:element name="archives" type="sdk:archivesType" /> - - <!-- An optional element indicating the package is obsolete. - The string content is however currently not defined and ignored. --> - <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> - </xsd:all> - </xsd:complexType> - - <!-- The definition of an SDK build-tool package. --> - - <xsd:complexType name="buildToolType"> - <xsd:annotation> - <xsd:documentation>An SDK build-tool package.</xsd:documentation> - </xsd:annotation> - <xsd:all> - <!-- The full revision (major.minor.micro.preview), incremented each - time a new package is generated. --> - <xsd:element name="revision" type="sdk:revisionType" /> - - <!-- optional elements --> - - <!-- The optional license of this package. If present, users will have - to agree to it before downloading. --> - <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> - <!-- The optional description of this package. --> - <xsd:element name="description" type="xsd:string" minOccurs="0" /> - <!-- The optional description URL of this package --> - <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> - <!-- The optional release note for this package. --> - <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> - <!-- The optional release note URL of this package --> - <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> - <!-- A list of file archives for this package. --> - <xsd:element name="archives" type="sdk:archivesType" /> - - <!-- An optional element indicating the package is obsolete. - The string content is however currently not defined and ignored. --> - <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> - </xsd:all> - </xsd:complexType> - - - <!-- The definition of an SDK doc package. --> - - <xsd:complexType name="docType" > - <xsd:annotation> - <xsd:documentation>An SDK doc package.</xsd:documentation> - </xsd:annotation> - <xsd:all> - <!-- The Android API Level for the documentation. An int > 0. --> - <xsd:element name="api-level" type="xsd:positiveInteger" /> - <!-- The optional codename for this doc, if it's a preview. --> - <xsd:element name="codename" type="xsd:string" minOccurs="0" /> - - <!-- The revision, an int > 0, incremented each time a new - package is generated. --> - <xsd:element name="revision" type="xsd:positiveInteger" /> - <!-- The optional license of this package. If present, users will have - to agree to it before downloading. --> - <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> - <!-- The optional description of this package. --> - <xsd:element name="description" type="xsd:string" minOccurs="0" /> - <!-- The optional description URL of this package --> - <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> - <!-- The optional release note for this package. --> - <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> - <!-- The optional release note URL of this package --> - <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> - <!-- A list of file archives for this package. --> - <xsd:element name="archives" type="sdk:archivesType" /> - - - <!-- An optional element indicating the package is obsolete. - The string content is however currently not defined and ignored. --> - <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> - </xsd:all> - </xsd:complexType> - - - <!-- The definition of an SDK sample package. --> - - <xsd:complexType name="sampleType" > - <xsd:annotation> - <xsd:documentation>An SDK sample package.</xsd:documentation> - </xsd:annotation> - <xsd:all> - <!-- The Android API Level for the documentation. An int > 0. --> - <xsd:element name="api-level" type="xsd:positiveInteger" /> - <!-- The optional codename for this doc, if it's a preview. --> - <xsd:element name="codename" type="xsd:string" minOccurs="0" /> - - <!-- The revision, an int > 0, incremented each time a new - package is generated. --> - <xsd:element name="revision" type="xsd:positiveInteger" /> - <!-- The optional license of this package. If present, users will have - to agree to it before downloading. --> - <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> - <!-- The optional description of this package. --> - <xsd:element name="description" type="xsd:string" minOccurs="0" /> - <!-- The optional description URL of this package --> - <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> - <!-- The optional release note for this package. --> - <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> - <!-- The optional release note URL of this package --> - <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> - <!-- A list of file archives for this package. --> - <xsd:element name="archives" type="sdk:archivesType" /> - <!-- The minimal revision of tools required by this package. - Optional. If present, must be a revision element. --> - <xsd:element name="min-tools-rev" type="sdk:revisionType" minOccurs="0" /> - - - <!-- An optional element indicating the package is obsolete. - The string content is however currently not defined and ignored. --> - <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> - </xsd:all> - </xsd:complexType> - - - <!-- The definition of a path segment used by the extra element. --> - - <xsd:simpleType name="segmentType"> - <xsd:annotation> - <xsd:documentation> - One path segment for the install path of an extra element. - It must be a single-segment path. - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:token"> - <xsd:pattern value="[a-zA-Z0-9_]+"/> - </xsd:restriction> - </xsd:simpleType> - - <xsd:simpleType name="segmentListType"> - <xsd:annotation> - <xsd:documentation> - A semi-colon separated list of a segmentTypes. - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:token"> - <xsd:pattern value="[a-zA-Z0-9_;]+"/> - </xsd:restriction> - </xsd:simpleType> - - - <!-- The definition of a license to be referenced by the uses-license element. --> - - <xsd:complexType name="licenseType"> - <xsd:annotation> - <xsd:documentation> - A license definition. Such a license must be used later as a reference - using a uses-license element in one of the package elements. - </xsd:documentation> - </xsd:annotation> - <xsd:simpleContent> - <xsd:extension base="xsd:string"> - <xsd:attribute name="id" type="xsd:ID" /> - <xsd:attribute name="type" type="xsd:token" fixed="text" /> - </xsd:extension> - </xsd:simpleContent> - </xsd:complexType> - - - <!-- Type describing the license used by a package. - The license MUST be defined using a license node and referenced - using the ref attribute of the license element inside a package. - --> - - <xsd:complexType name="usesLicenseType"> - <xsd:annotation> - <xsd:documentation> - Describes the license used by a package. The license MUST be defined - using a license node and referenced using the ref attribute of the - license element inside a package. - </xsd:documentation> - </xsd:annotation> - <xsd:attribute name="ref" type="xsd:IDREF" /> - </xsd:complexType> - - - <!-- A collection of files that can be downloaded for a given architecture. - The <archives> node is mandatory in the repository elements and the - collection must have at least one <archive> declared. - Each archive is a zip file that will be unzipped in a location that depends - on its package type. - --> - - <xsd:complexType name="archivesType"> - <xsd:annotation> - <xsd:documentation> - A collection of files that can be downloaded for a given architecture. - The <archives> node is mandatory in the repository packages and the - collection must have at least one <archive> declared. - Each archive is a zip file that will be unzipped in a location that depends - on its package type. - </xsd:documentation> - </xsd:annotation> - <xsd:sequence minOccurs="1" maxOccurs="unbounded"> - <!-- One archive file --> - <xsd:element name="archive"> - <xsd:complexType> - <!-- Properties of the archive file --> - <xsd:all> - <!-- The size in bytes of the archive to download. --> - <xsd:element name="size" type="xsd:positiveInteger" /> - <!-- The checksum of the archive file. --> - <xsd:element name="checksum" type="sdk:checksumType" /> - <!-- The URL is an absolute URL if it starts with http://, https:// - or ftp://. Otherwise it is relative to the parent directory that - contains this repository.xml --> - <xsd:element name="url" type="xsd:token" /> - </xsd:all> - - <!-- Attributes that identify the OS and architecture --> - <xsd:attribute name="os" use="required"> - <xsd:simpleType> - <xsd:restriction base="xsd:token"> - <xsd:enumeration value="any" /> - <xsd:enumeration value="linux" /> - <xsd:enumeration value="macosx" /> - <xsd:enumeration value="windows" /> - </xsd:restriction> - </xsd:simpleType> - </xsd:attribute> - <xsd:attribute name="arch" use="optional"> - <xsd:simpleType> - <xsd:restriction base="xsd:token"> - <xsd:enumeration value="any" /> - <xsd:enumeration value="ppc" /> - <xsd:enumeration value="x86" /> - <xsd:enumeration value="x86_64" /> - </xsd:restriction> - </xsd:simpleType> - </xsd:attribute> - </xsd:complexType> - </xsd:element> - </xsd:sequence> - </xsd:complexType> - - - <!-- A full revision, with a major.minor.micro and an optional preview number. - The major number is mandatory, the other elements are optional. - --> - - <xsd:complexType name="revisionType"> - <xsd:annotation> - <xsd:documentation> - A full revision, with a major.minor.micro and an - optional preview number. The major number is mandatory. - </xsd:documentation> - </xsd:annotation> - <xsd:all> - <!-- The major revision, an int > 0, incremented each time a new - package is generated. --> - <xsd:element name="major" type="xsd:positiveInteger" /> - <!-- The minor revision, an int >= 0, incremented each time a new - minor package is generated. Assumed to be 0 if missing. --> - <xsd:element name="minor" type="xsd:nonNegativeInteger" minOccurs="0" /> - <!-- The micro revision, an int >= 0, incremented each time a new - buf fix is generated. Assumed to be 0 if missing. --> - <xsd:element name="micro" type="xsd:nonNegativeInteger" minOccurs="0" /> - <!-- The preview/release candidate revision, an int > 0, - incremented each time a new preview is generated. - Not present for final releases. --> - <xsd:element name="preview" type="xsd:positiveInteger" minOccurs="0" /> - </xsd:all> - </xsd:complexType> - - - <!-- A collection of file paths available in an <extra> package - that can be installed in an Android project. - If present, the <project-files> collection must contain at least one path. - Each path is relative to the root directory of the package. - --> - - <xsd:complexType name="projectFilesType"> - <xsd:annotation> - <xsd:documentation> - A collection of file paths available in an <extra> package - that can be installed in an Android project. - If present, the <project-files> collection must contain at least one path. - Each path is relative to the root directory of the package. - </xsd:documentation> - </xsd:annotation> - <xsd:sequence minOccurs="1" maxOccurs="unbounded"> - <!-- One JAR Path, relative to the root folder of the package. --> - <xsd:element name="path" type="xsd:string" /> - </xsd:sequence> - </xsd:complexType> - - - <!-- The definition of a file checksum --> - - <xsd:simpleType name="sha1Number"> - <xsd:annotation> - <xsd:documentation>A SHA1 checksum.</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:string"> - <xsd:pattern value="([0-9a-fA-F]){40}"/> - </xsd:restriction> - </xsd:simpleType> - - <xsd:complexType name="checksumType"> - <xsd:annotation> - <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation> - </xsd:annotation> - <xsd:simpleContent> - <xsd:extension base="sdk:sha1Number"> - <xsd:attribute name="type" type="xsd:token" fixed="sha1" /> - </xsd:extension> - </xsd:simpleContent> - </xsd:complexType> - -</xsd:schema> |