exports.go 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright (C) 2019 The Android Open Source Project
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package sdk
  15. import "android/soong/android"
  16. func init() {
  17. registerModuleExportsBuildComponents(android.InitRegistrationContext)
  18. }
  19. func registerModuleExportsBuildComponents(ctx android.RegistrationContext) {
  20. ctx.RegisterModuleType("module_exports", ModuleExportsFactory)
  21. ctx.RegisterModuleType("module_exports_snapshot", ModuleExportsSnapshotsFactory)
  22. }
  23. // module_exports defines the exports of a mainline module. The exports are Soong modules
  24. // which are required by Soong modules that are not part of the mainline module.
  25. func ModuleExportsFactory() android.Module {
  26. return newSdkModule(true)
  27. }
  28. // module_exports_snapshot is a snapshot of prebuilt versions of all the exports
  29. // of a mainline module.
  30. func ModuleExportsSnapshotsFactory() android.Module {
  31. s := newSdkModule(true)
  32. s.properties.Snapshot = true
  33. return s
  34. }