Commit graph

589 commits

Author SHA1 Message Date
Pete Gillin
690dfda955 Turn droiddoc's metalava_merge_annotations_dir into a list.
am: b13a015cee

Change-Id: I5551aeb25ff33719551d04fcd326e0bf47169ad6
2018-07-25 10:08:14 -07:00
Pete Gillin
b13a015cee Turn droiddoc's metalava_merge_annotations_dir into a list.
This change replaces droiddoc's metalava_merge_annotations_dir
parameter (which takes a single value) with
metalava_merge_annotations_dirs (which takes a list). This will makes
it possible to merge libcore annotations in from a separate directory
under ojluni, instead of adding them in a preprocessing step.

It is implemented by passing the --merge-annotations argument to
metalava multiple times, which is already supported by metalava's
command line parsing.

Test: `make metalava-api-stubs-docs` with a local change to add a second directory in //frameworks/base/Android.bp
Bug: 111639530
Change-Id: I53d31f1dd45c13405b4511c2b44cbeb7f0e439d1
2018-07-25 11:37:44 +01:00
Dan Willemsen
b1b05b9978 Mark soong-generated phony rules as PHONY
am: a03c43a4a7

Change-Id: I3dec0c4664a03197572f2845f875cefc63d2f1dc
2018-07-25 00:39:54 -07:00
Dan Willemsen
a03c43a4a7 Mark soong-generated phony rules as PHONY
Test: add --writable=out/ to kati, see fewer warnings with this change
Change-Id: I4beb47f41888e3743b298c90edfeb38fcc0b3d32
2018-07-25 04:27:10 +00:00
Nan Zhang
a9ebb36a15 Merge changes from topic "metalava-sdk-jar"
am: cce87cbaa0

Change-Id: I5edc638cc8c859336c9de5e7e4b8dd9f0ff3004d
2018-07-24 17:06:20 -07:00
Nan Zhang
6c14e73786 Use Metalava based android.jar for SDK
am: 03b733c936

Change-Id: Id20a26219c3549a0de1ec6112e89788e2e6e357d
2018-07-24 17:06:09 -07:00
Nan Zhang
03b733c936 Use Metalava based android.jar for SDK
Define LOCAL_DROIDDOC_ANNOTATIONS_ZIP to export zip file.

Test: m out/target/common/obj/PACKAGING/metalava-api-stubs-docs_annotations.zip
Bug: b/78245848
Change-Id: I66ca2a50adc095cc8a8a1a10620427a91480a9bc
2018-07-24 11:16:56 -07:00
Nan Zhang
ec93cd9f2a Add private-stub-annotations.jar as core-java lib
Since currently android.jar compile against to it.

Test: m -j metalava_android_stubs_current
Bug: b/78245848
Change-Id: Id5812f69125085821182295e577849b5f2c4bead
2018-07-24 11:16:56 -07:00
Dan Willemsen
af42826aee Fix go vet issues
am: 59339a29e1

Change-Id: I6c5de64ee36c1dde4e043b36f84d2cf140afac41
2018-07-22 23:23:59 -07:00
Dan Willemsen
59339a29e1 Fix go vet issues
Test: go vet ./...
Change-Id: Ifb936ccc5e2b5a2c3fcbbbcb54f680e2973ea1b3
2018-07-22 21:18:45 -07:00
Sundong Ahn
bbc48703a7 Merge "Change classpath for droiddoc"
am: 279fc89abd

Change-Id: Ieb6840db5377d29db54647564ded3ba20c1b8893
2018-07-18 02:18:17 -07:00
Sundong Ahn
241cd3747c Change classpath for droiddoc
When the module type is SdkLibraryDependency, the classpath has been
gotten from headerJar
Becuase droiddoc uses src files when it builds, we should change to use
ImplementationJars instead of headerJar.

Bug: 77577799
Test: make -j

Change-Id: I1a072be69d7edff5636ea80af700be7796c3b0fc
2018-07-17 23:52:49 +00:00
Olivier Gaillard
aaacff9d9a Add a Generate_get_transaction_name flag.
am: 0a4cfbc21a

Change-Id: I99ce1491cb01948c7b6cd09fdfbd53fafb8a42fb
2018-07-17 04:01:22 -07:00
Olivier Gaillard
0a4cfbc21a Add a Generate_get_transaction_name flag.
Add a flag to be able to generate the Binder#getTransactionName method

Test: manual
Bug: 111200705

Change-Id: I3e8106261df5c63cdc005d07c9d8efcc6732db70
2018-07-17 09:00:45 +00:00
Dan Willemsen
80e43f1095 Add missing properties to android_test
am: f5531d2ed6

Change-Id: I3c6619a6c98e2431abbba0bfc5ef8e39eb97416d
2018-07-16 19:18:07 -07:00
Dan Willemsen
f5531d2ed6 Add missing properties to android_test
These are in the AndroidTest struct, and being exported by the AndroidMk
functions, but aren't in the list given to blueprint.

Test: add test_suites to an android_test, check Android-*.mk
Change-Id: I1e46638755cbb579f28ed14638baad43fde5cb96
2018-07-16 17:23:35 -07:00
Colin Cross
0907f39afd Merge changes I5b8522aa,I541aea75
am: cdec7e7ee1

Change-Id: Ib68f185498f593f0812f481b2c82753cd5956fa5
2018-07-16 17:20:20 -07:00
Colin Cross
20075eb84b Merge changes from topic "merge_zips_strip"
am: 6d6faa1a1f

Change-Id: I5f8d1c2aaff59a2af9156d71532fbe9da7181a4b
2018-07-16 17:19:09 -07:00
Colin Cross
cdec7e7ee1 Merge changes I5b8522aa,I541aea75
* changes:
  Fix lint errors caught by go test
  Fix .kotlin_builtins glob
2018-07-17 00:14:33 +00:00
Treehugger Robot
6d6faa1a1f Merge changes from topic "merge_zips_strip"
* changes:
  Make merge_zips -stripFile use blueprint style globs
  Add tests for merge_zips
2018-07-17 00:09:58 +00:00
Colin Cross
4c03f68763 Make merge_zips -stripFile use blueprint style globs
merge_zips -stripFile was only considering the name of the file and
ignoring the path.  Make it more useful by supporting blueprint style
globs.  The previous behavior can be recreated by prefixing with **/.

Bug: 111389216
Test: m checkbuild
Change-Id: I25760fe3f1f77704dd9da9d107d9a38a415d681f
2018-07-16 15:24:43 -07:00
Colin Cross
29788aad61 Fix .kotlin_builtins glob
The files in kotlin jars seem to be called .kotlin_builtins, not
.kotlin_builtin.

Test: m checkbuild
Change-Id: I541aea758bbef6bb23632836cceb8339b82ffdff
2018-07-16 15:24:43 -07:00
Nan Zhang
9b54e8be60 Merge "Add more options in droiddoc.go"
am: dd41d7d631

Change-Id: Ie14cfee1b62743eec9356937208da2ec6801b191
2018-07-13 17:06:04 -07:00
Treehugger Robot
dd41d7d631 Merge "Add more options in droiddoc.go" 2018-07-13 22:41:43 +00:00
Colin Cross
b2efa2f6a7 Merge "Add exclude_files and exclude_dirs properties to java_import"
am: d71f86a79c

Change-Id: If2c5d32f747ab3319bd50c3301e12a26858aeaba
2018-07-12 22:53:43 -07:00
Treehugger Robot
d71f86a79c Merge "Add exclude_files and exclude_dirs properties to java_import" 2018-07-13 05:40:07 +00:00
Colin Cross
37f6d79c7e Add exclude_files and exclude_dirs properties to java_import
Prebuilt jars sometime contain files that we don't want.  In Make
we would delete everything in META-INF when importing jars, but
that caused problems when there were necessary files in there,
so we added LOCAL_DONT_DELETE_JAR_META_INF.

Soong does the opposite, keeping everything by default.  Add
properties to allow explicitly stripping unwanted files instead.

Bug: 111389216
Test: m checkbuild
Change-Id: I6d07f519ebc7d0e1bf0af93416bb569e3c2b1500
2018-07-12 16:59:59 -07:00
Sundong Ahn
e609876f41 Merge "Change link type rule"
am: 9fab1220b9

Change-Id: If81c3ae25bb75d4ad7954daf0cf54ce398d1cf2f
2018-07-11 18:14:08 -07:00
Sundong Ahn
57368eb515 Change link type rule
If linkType of a module is javaPlatform, the module will link to
<lib>.impl instead of <lib>.stubs.system.

Bug: 77577799
Test: make -j
Change-Id: I2a9a0ec7c76c0fc304935f16c4c371aea39bffd6
2018-07-11 23:56:17 +00:00
Nan Zhang
e2ba5d4c51 Add more options in droiddoc.go
These new options are required for online/offline-docs. These options
are only for Doclava, not Metalava.

Bug: b/70351683
Test: m -j offline-sdk-docs
Change-Id: Ie229821409d5640adfa6d7d05450e5f4c215b9b4
2018-07-11 15:35:24 -07:00
Colin Cross
31656958d6 Use manifest merger in Soong
Move the manifest merger config to Soong, and use it to merge
manifests of static dependencies of android_library and android_app
modules.

Bug: 110848854
Test: m checkbuild
Change-Id: Ib89e1f1a52a8b76157e4e0348baf42800412df0d
Merged-In: Ib89e1f1a52a8b76157e4e0348baf42800412df0d
Merged-In: I5d055ce63b8371db500f8868fb73ab3604b8c24a
2018-07-11 19:46:38 +00:00
Colin Cross
a90861ae3f Merge "Don't install java libraries by default"
am: d6a8e0fe00

Change-Id: If194f5a3986a6787e6a37f1fae0653155915f99b
2018-07-11 11:41:47 -07:00
Colin Cross
cfae5a6e2c Use manifest merger in Soong
Move the manifest merger config to Soong, and use it to merge
manifests of static dependencies of android_library and android_app
modules.

Bug: 110848854
Test: m checkbuild
Change-Id: Ib89e1f1a52a8b76157e4e0348baf42800412df0d
2018-07-11 05:52:26 +00:00
Colin Cross
9ae1b927d4 Don't install java libraries by default
Very few java libraries need to be installed, most are statically
included in other modules.  Device modules that are not installed
also don't need to be dexed, saving checkbuild time.  Change the
default for java_library to not be installed, and allow libraries
that should be installed to specify installed: true.  This makes
java_libary and java_library_static identical.  It also simplifies
some corner cases when converting from Make to Soong if a module
is built for the host (which doesn't differentiate between static
and non-static/installable) and statically for the device, which
couldn't be represented in a single java_library in soong.

Bug: 110885583
Test: m checkbuild, compare presubmit target files
Change-Id: Idc0841c39a17cebd7bac3559c9408596d167a393
2018-07-11 05:35:59 +00:00
Colin Cross
9405da836c Add min_sdk_version to android_library_import modules
am: 479884c93d

Change-Id: Ie0406567bbf45fd42932c1bc57feffa1f103a400
2018-07-10 16:01:24 -07:00
Colin Cross
479884c93d Add min_sdk_version to android_library_import modules
pom2bp now inserts a min_sdk_version into android_library_import
modules.

Bug: 110848854
Test: m checkbuild
Change-Id: I1396eabd8bfa02755c829ddac03022ffb7a5673e
2018-07-10 13:46:58 -07:00
Colin Cross
7c0f8e6ec7 Don't install android_library modules
am: 73ea6a3cf1

Change-Id: I23da7d99a5811345819f4dfc03e851487013a251
2018-07-10 08:20:02 -07:00
Colin Cross
73ea6a3cf1 Don't install android_library modules
Skip dexing and installing android_library modules, the platform
can't load them directly anyways.

Test: m checkbuild
Change-Id: I4940569f0deb0eefbe52ac1bee6a32a8b2a2c5be
2018-07-10 14:54:24 +00:00
Tobias Thierer
7215e2c1cd Merge "Generate system modules for any value of EXPERIMENTAL_USE_OPENJDK9."
am: 4599ec5b0b

Change-Id: I89c1f9fc33eddd8f41896b19cfef3bc646d8b60b
2018-07-10 04:09:55 -07:00
Tobias Thierer
4599ec5b0b Merge "Generate system modules for any value of EXPERIMENTAL_USE_OPENJDK9." 2018-07-10 11:02:59 +00:00
Mathew Inwood
06a96bbc9d Add support for -apiMapping parameter in DocLava.
am: 76c3de1cea

Change-Id: I4050d5a0ae39e8206e81238d20d04e871ca69885
2018-07-10 00:43:20 -07:00
Mathew Inwood
76c3de1cea Add support for -apiMapping parameter in DocLava.
This is used to output a mapping of class member signature to source
position, which in turn is used for automated addition of annotations in
frameworks code.

Metalava support does not exist (yet), and may not be needed, since the
addition of these annotations in a one-time thing. This change can be
reverted once this is complete.

See go/hidden-api-annotations for more context.

Test: m
Bug: 110868826
Change-Id: I90e409f6ea02b16eb9e03d92382f9bb46a8fdab5
2018-07-10 05:48:49 +00:00
Colin Cross
b6d2b5d931 Merge changes Ieaf37ba6,Ic69f1f93
am: ad234e4894

Change-Id: I53ede4011f281b0ab84f7e9a1fd36ee1f1a6a488
2018-07-09 17:18:44 -07:00
Colin Cross
83bb3167f6 Add support for min_sdk_version
Add min_sdk_version properties and use it for aapt2
--min-sdk-version and --target-sdk-version flags.  Add an sdkContext
interface that any function that needs an sdk version can take in
order to get the values for the current module.

Bug: 110848854
Test: m checkbuild
Change-Id: Ic69f1f935d8b865ec77689350407df08bfac5925
2018-07-09 12:42:01 -07:00
Tobias Thierer
b1c697d03e Generate system modules for any value of EXPERIMENTAL_USE_OPENJDK9.
The flag EXPERIMENTAL_USE_OPENJDK9 controls the *default* value
of java_version / LOCAL_JAVA_LANGUAGE_VERSION, but that default
value can be overridden by individual build targets.

One requirement for individual build targets to opt-in to
java_version 1.9 is for system modules to be generated even if
the default language version is still < 1.9. We plan to allow
this soon for libcore targets; therefore, this CL changes the
system module targets to always be defined, regardless of the
value of EXPERIMENTAL_USE_OPENJDK9.

Test: In a workspace that has http://r.android.com/646840
      "make" no longer runs into the build failure from bug 76219552.
Bug: 76219552

Change-Id: I5193347452c7967f7695929619509aea0fd46844
2018-07-09 19:47:33 +01:00
David Brazdil
bd8b75e636 Add option to compile dex for a Java library
am: 17ef5635fa

Change-Id: Idc5df275cffabb7a4180a79ace529f03e9f0389a
2018-07-09 09:34:29 -07:00
David Brazdil
17ef5635fa Add option to compile dex for a Java library
Currently Soong will only compile a Java library into dex if the
library has device support and is installable. For our use case of
inspecting the dex at build time this is not sufficient. Add a new
"compile_dex" device property which forces the creation of a dex
rule. In this case, the class jar remains the output file of the
module.

Bug: 79409988
Test: on related CL
Change-Id: Ia908a47148a03a0bdb0da4315cce6efc86c51865
2018-07-09 16:04:41 +00:00
Mathew Inwood
f739144c43 Use correct variant for annotation processors.
am: 878c662602

Change-Id: I330b1d8e8d4de4411565ddcfaf06020e3deece86
2018-07-03 11:16:46 -07:00
Mathew Inwood
878c662602 Use correct variant for annotation processors.
Annotation processors should always have a common host variant, rather
than a device variant as the build was looking for before.

Bug: 110868826
Test: m
Change-Id: I2b7d0e7ed1af3f2f9ddb87d2bf36920737a507e9
2018-07-03 17:06:48 +01:00
Sundong Ahn
4afa0dd6fb Merge "Add api_dirs property and use module name as prefix"
am: b1f0f1aecd

Change-Id: Ibf5b2ea7f0e1742228a986ee69f33e570e1c43e2
2018-07-02 22:11:49 -07:00