Commit Graph

656 Commits

Author SHA1 Message Date
Nan Zhang
43f7de9448 Support API compatibility check in Soong am: a05ff57f29 am: 5d7a0505a2
am: b6fbcad927

Change-Id: I57ae3812ac871ab561e6fcd0b02d5892bcf56c5b
2018-08-23 02:52:02 -07:00
Nan Zhang
a05ff57f29 Support API compatibility check in Soong
Test: m -j api-stubs-docs
Bug: b/78245848
Change-Id: Id88a3e3716f9f07f0dc0071aa56a328c4712fcc9
2018-08-22 18:28:58 -07:00
Nan Zhang
66dc236781 Add support for dumping proguard api file.
Test: ref go/ag/4783442
Bug: b/70351683
Change-Id: I0aedd41686535c9a662b935003b80634e56663e0
Merged-In: I0aedd41686535c9a662b935003b80634e56663e0
(cherry-picked from commit: 26c055258b)
2018-08-22 13:59:48 -07:00
Colin Cross
b3d1b77cf8 Merge "Fix overlaying android resources from static libraries" am: 9af53b4795 am: 26d7533901
am: cf8896f68b

Change-Id: I9cf22c991ba5e201035e98865b883e440ab5068f
2018-08-22 04:49:23 -07:00
Nan Zhang
ec9d3b43a0 Hardcode "-source 1.8" for Doclava. am: 443fa525df am: 5080c43808
am: a6afaf0c8e

Change-Id: I37204a3e6a395241253455d30b953d285c005a2f
2018-08-22 03:54:05 -07:00
Treehugger Robot
9af53b4795 Merge "Fix overlaying android resources from static libraries" 2018-08-22 00:52:46 +00:00
Colin Cross
4aaa84af86 Fix overlaying android resources from static libraries
Match the make logic for combining app resources with static library
resources.

Bug: 112822358
Test: app_test.go
Test: aapt2 dump resources $OUT/system/priv-app/SystemUIGoogle/SystemUIGoogle.apk | grep -A1 ' string/config_systemUIVendorServiceComponent'
Change-Id: I565404e7ffb726dab952c72ab23600d6f2ee4ad4
2018-08-21 15:53:46 -07:00
Nan Zhang
49e0f4fc37 Merge "Add support for dumping proguard api file." 2018-08-21 21:37:42 +00:00
Nan Zhang
443fa525df Hardcode "-source 1.8" for Doclava.
Due to various bugs hidden deeply within Doclava, running with
 "-source 1.9" is always failed for it.

So switch to "-source 1.8" for now. This includes the case of running the
combination of Metalava + Doclava. Once we have new documentation tool
in system, we can full deprecate Doclava.

Test: USE_R8=true EXPERIMENTAL_USE_OPENJDK9=true m -j core-docs
Bug: b/70351683
Change-Id: I9553f88d0dd9bc263a249c49075c0b931b5d4927
2018-08-21 11:19:53 -07:00
Colin Cross
88a1047041 Merge "Fix using defaults in android_app and android_test modules" am: 06e36c737f am: 777eeb5556
am: 7ec95ebb79

Change-Id: I29276a5703111c6887df7861d0c69644086c9edc
2018-08-20 15:38:35 -07:00
Nan Zhang
4061a9f958 Merge "Append previous_api to "--migrate-nullness" option" am: 910fff22e6 am: 3e3b0649d2
am: 17fa0e5796

Change-Id: I18c21f524fdfdc3d8c10d8b23aa9fa8bdda0b778
2018-08-20 15:27:54 -07:00
Treehugger Robot
06e36c737f Merge "Fix using defaults in android_app and android_test modules" 2018-08-20 22:21:32 +00:00
Colin Cross
b98c0f4c7d Fix using defaults in android_app and android_test modules
android_app and android_test modules weren't getting
InitDefaultableModule called on them.  Call InitJavaModule
which does both InitAndroidArchModule and InitDefaultableModule.

Test: m checkbuild
Change-Id: I26f3c04ea8bdfcacb59dcdbc63d6db5604c2598a
2018-08-20 13:45:45 -07:00
Nan Zhang
d05a436e8b Append previous_api to "--migrate-nullness" option
"--previous-api" option was not recommended after Metalava was
changed on how to consume the api file args.

Test: m -j api-stubs-docs
Bug: b/78245848
Change-Id: I1054173e11b4d47942dda0b95193277758aa8193
2018-08-20 13:28:41 -07:00
Nan Zhang
2dfd54f81a Add update-api support for Metalava am: 55e0bf4231 am: d436e87797
am: d176680803

Change-Id: I4c498d12753098d99e4f2b690f67c8fee7f2c993
2018-08-17 17:08:02 -07:00
Nan Zhang
55e0bf4231 Add update-api support for Metalava
Test: m -j api-stubs-docs-update-current-api
Bug: b/112668343
Change-Id: Ia91ae6969b01c21d88de7ceef4b25a73d0efd4a1
2018-08-17 12:38:15 -07:00
Nan Zhang
863f05b797 Removed Metalava related checks
Test: m -j checkbuild
Bug: b/70351683 b/78245848
Change-Id: Ie26e95081d8d90b626cfb43d017cb2ae500b7b25
Merged-In: Ie26e95081d8d90b626cfb43d017cb2ae500b7b25
2018-08-17 09:17:49 -07:00
Colin Cross
3b8d4b9894 Merge changes from topic "java_test_junit" am: a192c7370c am: 49306342c6
am: dba150d0ab

Change-Id: I06d2df4938ddf1ad5835ee3ad48fe4dab666ec59
2018-08-16 23:51:06 -07:00
Colin Cross
d3a62e1591 Support patch_module in java modules am: 8144008360 am: 7dcc028055
am: 578229e5c3

Change-Id: Ief9b24272d9b41c9b2b7f124b546823c9b79df57
2018-08-16 23:50:41 -07:00
Colin Cross
117a108f9b Make :module provide the output file for java modules am: 3063b78ea5 am: 976957aa2c
am: 5bc2fd8921

Change-Id: I8160beeba8a2734d72146990f62be135ae217a93
2018-08-16 23:50:28 -07:00
Colin Cross
655cc9e674 Don't link java tests against junit by default am: b628ea5327 am: 7973efc07b
am: ad04436e12

Change-Id: Ibd23ec94fb76644a54e92cc932b2d0ae8c63a57e
2018-08-16 23:50:15 -07:00
Colin Cross
331a1213b0 Don't pass resources to r8
R8 complains when it gets dex files in the input jar, but some tests
use dex files or dex jars as resources.  Keep resources separate
from classes until after r8 has been run.

Test: java_test.go
Test: m checkbuild
Change-Id: I1d9164d60d6b054ebb138648da07d80ee769177f
2018-08-16 17:03:56 -07:00
Colin Cross
8144008360 Support patch_module in java modules
A few tests that have classes in the java.base module need to pass
--patch-module=java.base=<classpath> to javac.

Test: m checkbuild
Change-Id: I246bad92dcde976969b064aace5e2856e2bac971
2018-08-16 16:14:09 -07:00
Colin Cross
3063b78ea5 Make :module provide the output file for java modules
Make :module on a java_library provide the output file, which is
normally the implementation jar.  For java_library modules with
installable: true or compile_dex: true this will be the dexjar
instead.  For android_app modules this will be the apk.

Bug: 80144045
Test: no change to out/soong/build.ninja
Change-Id: I739674aee60a38bfccb859369e4414b46f293d82
2018-08-16 16:13:58 -07:00
Nan Zhang
26c055258b Add support for dumping proguard api file.
Test: ref go/ag/4783442
Bug: b/70351683
Change-Id: I0aedd41686535c9a662b935003b80634e56663e0
2018-08-15 12:15:43 -07:00
Colin Cross
b628ea5327 Don't link java tests against junit by default
There is more variety of java tests than I expected, don't
default to including junit, that's just going to lead to
unexpected junit classes for module authors that don't know
to set junit: false.  All existing uses of java_test are
already not using junit or setting static_libs: ["junit"],
and all test in Make are already specifying junit.

Bug: 70770641
Test: m checkbuild
Change-Id: I4393b70d87dd2b6e3bb719fdb758915053bee0c7
2018-08-15 11:08:59 -07:00
Colin Cross
2c18b5fa8c Support data properties in java_test and android_test am: d96ca35779 am: 14763b2640
am: a128a7a076

Change-Id: Ie2a22bfd1fe6132159c8e96688d0d8d296809bbc
2018-08-15 07:51:41 -07:00
Colin Cross
0fbb119156 Move autogenerated test config into Soong am: 303e21f695 am: f83e82933e
am: 16a1d89a2a

Change-Id: Ib3fadbfbaaa90dcc08d2539290965733104fcfc1
2018-08-14 20:55:32 -07:00
Colin Cross
d96ca35779 Support data properties in java_test and android_test
Files in the data property will be passed to
LOCAL_COMPATIBILITY_SUPPORT_FILES in Make.

Test: m checkbuild
Change-Id: Ifc074317f957aba8f55daa30abc5b9737d1eceac
2018-08-14 15:44:39 -07:00
Colin Cross
303e21f695 Move autogenerated test config into Soong
Move autogenerating the test config for Soong modules into Soong
for java_test and android_test modules.

Bug: 70770641
Test: m checkbuild
Test: atest CtsUiRenderingTestCases
Change-Id: I02593add0407ef694b91c14cf27411a4f3cc4745
2018-08-14 15:44:08 -07:00
TreeHugger Robot
bf1d9eae26 Merge "Revert "Revert "Fix manifest merging flags""" 2018-08-14 21:31:50 +00:00
Colin Cross
db522fc75c Revert "Revert "Fix manifest merging flags""
This reverts commit b0c795d78b.

Reason for revert: SystemUITests fixed in b/112587252
Bug: 112587252
Bug: 112467584

Change-Id: Ie00c1923cb5f17c76ce6ff0528b1f729fdabc4f2
2018-08-14 20:03:38 +00:00
Colin Cross
f37d153bea Merge "Revert "Fix manifest merging flags"" 2018-08-14 19:26:21 +00:00
Colin Cross
b0c795d78b Revert "Fix manifest merging flags"
This reverts commit b7c147efec.

Reason for revert: broke SystemUI tests
Bug: 112587252
Bug: 112467584

Change-Id: I0d442e40d22ff9b04b1bb618a68a7d04c20e376b
2018-08-14 19:25:26 +00:00
Nan Zhang
116901a7c2 Merge "Removed Metalava related checks" 2018-08-14 18:18:16 +00:00
TreeHugger Robot
6a5de55f41 Merge "Fix manifest merging flags" 2018-08-13 23:23:50 +00:00
Colin Cross
bd1cef5618 Add proguard_flags_files to r8 command line
We were not passing the proguard_flags_files files as -include
arguments to R8.

Bug: 112462307
Test: m checkbuild
Change-Id: I8f3b10fc338aa4b15c0fb220ee2891efbb0b020f
2018-08-13 17:29:58 +00:00
Treehugger Robot
815ef453df Merge "Support Dokka in Soong." 2018-08-11 00:10:16 +00:00
Nan Zhang
4973ecff89 Enable prebuilt jar installation in framework
Test: m -j dokka
Bug: 72394196
Change-Id: Ide09dc2fe64ea5db0d771e16d4b9293638b5d65c
2018-08-10 13:42:12 -07:00
Nan Zhang
86d2d55ade Support Dokka in Soong.
Metalava is supposed to treat all the args after
"--generate-documentation" as either Javadoc or Dokka commands, and it starts
 seperate process to invoke javadoc or java -jar dokka...

Dokka doesn't support --bootclasspath in its args, so treat all the
bootclasspath as classpath.

Also continue to refactor code to seperate Dokka runs from Javadoc or
Metalava.

Test: m -j metalava-dokka-core-docs
Bug: b/72394196
Change-Id: I0f0f3dd80cb2dbb53f19da8fa11ae0b1d92ac5d7
2018-08-10 13:37:24 -07:00
Treehugger Robot
1a1f7f24ab Merge "Remove additional 'docs' Dir when genearate Soong droiddoc" 2018-08-10 20:03:25 +00:00
Jason Monk
b7c147efec Fix manifest merging flags
library manifests were just being dropped on the ground.

Bug: 112467584
Test: build
Change-Id: I61c2efca37aa3fdb9c944260f4a276d1d3c26f6c
2018-08-10 11:27:21 -07:00
Jason Monk
d4122be915 Support overrides for android_app
Test: use it
Change-Id: I61b933b757081f08a417e66a8c02d62916bd3f8b
2018-08-10 09:52:36 -04:00
Nan Zhang
de860a4c1c Remove additional 'docs' Dir when genearate Soong droiddoc
Test: m -j core-docs
Bug: b/70351683
Change-Id: Icb0b096e24ee8e498532ca32c9e9e74c2803191d
2018-08-09 15:53:33 -07:00
Colin Cross
5fa9d6f445 Use soong_droiddoc_prebuilt.mk
Soong droiddoc modules were using soong_java_prebuilt.mk, but they
don't need any of the java logic from it, and it includes
base_rules.mk which was not included by droiddoc.mk.  Use
soong_droiddoc_prebuilt.mk that just installs the droiddoc
outputs without including base_rules.mk.

Fixes building docs modules in mm, mma, and m checkbuild.

Bug: 112388925
Test: m docs
Change-Id: I8ccbcd34adf268a830ee1a203270b955ea696701
2018-08-08 21:48:39 -07:00
Julien Desprez
e146e39fa6 Support 'test_config' into soong modules
Test: make general-tests
Bug: 110982517
Change-Id: Ib2eab2653fdfce6f699b85c9fbc64558b6d40363
2018-08-07 15:51:21 -07:00
Nan Zhang
2ef0a47155 Removed Metalava related checks
Test: m -j checkbuild
Bug: b/70351683 b/78245848
Change-Id: Ie26e95081d8d90b626cfb43d017cb2ae500b7b25
2018-08-07 15:50:49 -07:00
Nan Zhang
32e554b572 Use config.DefaultLibraries for droiddoc
am: 77a69ecb70

Change-Id: Ib3ff4894cae354a3907bd75449dfa4ca2e222bff
2018-08-06 18:42:04 -07:00
Nan Zhang
070550940a Merge "Fix the issue that changing merge_annotations_dir doesn't trigger build"
am: 816aa9da76

Change-Id: I3965119588c6a98b85c8c54831327370309e5370
2018-08-06 18:26:50 -07:00
Xin Li
6bfe4eb42c Merge Android Pie into master
Bug: 112104996
Change-Id: I160274b2c2bbe8219ed9a3b5d39c3935bfcb13f0
2018-08-06 17:23:26 -07:00