I actually have everything in vendor and I'd prefer to keep it there. I'm 
not sure how to include whats in vendor in framework.jar.
This is the structure of the stuff I have in vendor that I would like to 
include.
vendor/xxx/lib -> the prebuilt jars are here
vendor/xxx/src/com/aaa/bbb/ccc => the source files are here

Question: Should I add an Android.bp to vendor/xxx/
It sounds like that should contain the java_import section you already 
mentioned.
How do I include the source files in the new Android.bp?

Question: How do I reference this not module from Android.bk in 
frameworks/base/Android.bp?

Is there any documentation on how to set up Android.bp files. I've been 
looking around and I cant find anything.

I need the extra classes because I'm adding a new system service to the 
build that I'm making.

Thank you again for your help.



On Monday, March 18, 2019 at 2:33:13 PM UTC-7, Colin Cross wrote:
>
> All of that is up to you.  All Android.bp files found in the tree are 
> parsed, so you can create a directory anywhere (maybe under vendor/ so you 
> can minimize changes to AOSP files).  Put the prebuilt jars in that 
> directory too.
>
> static_libs takes a list of module names.  
> android.hardware.radio-V1.0-java is a module created 
> by hardware/interfaces/radio/1.0/Android.bp.  The modules can be defined 
> anywhere in the tree.
>
> Taking a step back, what are you trying to accomplish?  Why do you need 
> extra classes in framework.jar?  Maybe it would be better to keep them 
> outside framework.jar but add them to the default classpath using 
> PRODUCT_BOOT_JARS?  Or ship them as a separate shared library that apps can 
> opt into loading?
>
> On Mon, Mar 18, 2019 at 1:34 PM KarenL <[email protected] <javascript:>> 
> wrote:
>
>> What directory should my prebuilt jars go into? Where are the pother 
>> static_libs, like android.hardware.radio-V1.0-java, picked up from?
>> Where do I add this new Android.bp with the below content?
>>
>> All I want to add to framework.jar are 2 prebuilt jars and 2 source 
>> files. Do I need to create a new folder structure under frameworks/base for 
>> these? If so - what does that structure look like.
>>
>> Thank you for your help.
>>
>>
>>
>> On Monday, March 18, 2019 at 1:06:45 PM UTC-7, Colin Cross wrote:
>>>
>>> You need to use java_import modules to create a module for the jars.  
>>> Something like:
>>>
>>> java_import {
>>>     name: "my_prebuilt_jars",
>>>     jars: [
>>>         "my_prebuilt_jar1.jar",
>>>         "my_prebuilt_jar2.jar",
>>>     ],
>>> }
>>>
>>> Then you can add to static_libs:
>>>         "my_prebuilt_jars"
>>>
>>> On Mon, Mar 18, 2019 at 12:35 PM KarenL <[email protected]> wrote:
>>>
>>>> Hi
>>>>
>>>> I would like to add a couple of prebuilt jars and some source files to 
>>>> the Android 9 aosp image that I"m building.
>>>> With lower versions of Android I've added these easily to 
>>>> frameworks.jar. This was straight forward to do when framework.jar was 
>>>> built using a make file. Its a lot less clear how to do this using 
>>>> blueprint files and soong.
>>>>
>>>> This is what I've tried and its not enough. 
>>>>
>>>> Add a new folder to frameworks/base for my source files:
>>>> frameworks/base/myfolder/java/com/xxx
>>>>
>>>> Edit the Android.bp file in frameworks/base and add source files to the 
>>>> "srcs" list
>>>> "myfolder/java/com/xxx/source1.java"
>>>> "myfolder/java/com/xxx/source2.java"
>>>>
>>>> Edit the "static_libs" list and add my prebuilt jars
>>>> "prebuilt_jar1",
>>>> "prebuilt_jar2",
>>>>
>>>> I'm not sure where to put these prebuilt jars. 
>>>> Do they go somewhere inside myfolder? Where are the other static libs 
>>>> in this list picked up from? 
>>>> Do I need to create .bp files inside myfolder to build this new part?
>>>>
>>>> Do you have any suggestions as to how to add prebuilt jars to Android 9.
>>>>
>>>> Thanks for your help.
>>>> Karen
>>>>
>>>> -- 
>>>> -- 
>>>> You received this message because you are subscribed to the "Android 
>>>> Building" mailing list.
>>>> To post to this group, send email to [email protected]
>>>> To unsubscribe from this group, send email to
>>>> [email protected]
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/android-building?hl=en
>>>>
>>>> --- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Android Building" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> -- 
>> -- 
>> You received this message because you are subscribed to the "Android 
>> Building" mailing list.
>> To post to this group, send email to [email protected] 
>> <javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/android-building?hl=en
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Android Building" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to