Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94b6960b authored by Paul Duffin's avatar Paul Duffin
Browse files

Add preparers for xml

Bug: 181070625
Test: m nothing
Change-Id: I150889a025e1c23eebe1e2764b07fdbd2babef49
parent 45a49718
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ bootstrap_go_package {
        "soong-etc",
    ],
    srcs: [
        "testing.go",
        "xml.go",
    ],
    testSrcs: [

xml/testing.go

0 → 100644
+19 −0
Original line number Diff line number Diff line
// Copyright 2018 Google Inc. All rights reserved.
//
// 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.

package xml

import "android/soong/android"

var PreparerForTestWithXmlBuildComponents = android.FixtureRegisterWithContext(registerXmlBuildComponents)
+5 −1
Original line number Diff line number Diff line
@@ -53,10 +53,14 @@ var (
)

func init() {
	android.RegisterModuleType("prebuilt_etc_xml", PrebuiltEtcXmlFactory)
	registerXmlBuildComponents(android.InitRegistrationContext)
	pctx.HostBinToolVariable("XmlLintCmd", "xmllint")
}

func registerXmlBuildComponents(ctx android.RegistrationContext) {
	ctx.RegisterModuleType("prebuilt_etc_xml", PrebuiltEtcXmlFactory)
}

type prebuiltEtcXmlProperties struct {
	// Optional DTD that will be used to validate the xml file.
	Schema *string `android:"path"`