satayev | 95e9c5b | 2021-04-29 11:50:26 +0100 | [diff] [blame^] | 1 | // Copyright 2021 Google Inc. All rights reserved. |
| 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 | |
| 15 | package java |
| 16 | |
| 17 | import ( |
| 18 | "android/soong/android" |
| 19 | ) |
| 20 | |
| 21 | func init() { |
| 22 | registerSystemserverClasspathBuildComponents(android.InitRegistrationContext) |
| 23 | } |
| 24 | |
| 25 | func registerSystemserverClasspathBuildComponents(ctx android.RegistrationContext) { |
| 26 | // TODO(satayev): add systemserver_classpath_fragment module |
| 27 | ctx.RegisterModuleType("platform_systemserverclasspath", platformSystemServerClasspathFactory) |
| 28 | } |
| 29 | |
| 30 | type platformSystemServerClasspathModule struct { |
| 31 | android.ModuleBase |
| 32 | |
| 33 | ClasspathFragmentBase |
| 34 | } |
| 35 | |
| 36 | func platformSystemServerClasspathFactory() android.Module { |
| 37 | m := &platformSystemServerClasspathModule{} |
| 38 | initClasspathFragment(m, SYSTEMSERVERCLASSPATH) |
| 39 | android.InitAndroidArchModule(m, android.DeviceSupported, android.MultilibCommon) |
| 40 | return m |
| 41 | } |
| 42 | |
| 43 | func (b *platformSystemServerClasspathModule) AndroidMkEntries() (entries []android.AndroidMkEntries) { |
| 44 | return b.classpathFragmentBase().androidMkEntries() |
| 45 | } |
| 46 | |
| 47 | func (b *platformSystemServerClasspathModule) GenerateAndroidBuildActions(ctx android.ModuleContext) { |
| 48 | // TODO(satayev): split apex jars into separate configs. |
| 49 | b.classpathFragmentBase().generateClasspathProtoBuildActions(ctx) |
| 50 | } |