162 Commits

Author SHA1 Message Date
Anton Hansson
f28c32e17d Merge "Remove obsolete droidstub args" into rvc-dev am: 19f58926e3
Change-Id: I28ad01b85a1f88a8b259b51463dee6dd00fdd896
2020-04-23 09:52:00 +00:00
Anton Hansson
0fa5427c3b Remove obsolete droidstub args
- I see no usages of private_api_filename / private.txt /
  private_dex_api_filename
- tags are no longer used as of
  Iff355041d88eb59ac47dd19a03e993cf1ce3927e
- api_filename/removed_api_filename does nothing if check_api is
  specified. test-api does not need a removed.txt

Bug: 152479829
Bug: 144149403
Test: m
Change-Id: Ic1e859dc6aa91f8d7b4f285b63d3faafb27edc9b
Merged-In: Ic1e859dc6aa91f8d7b4f285b63d3faafb27edc9b
(cherry picked from commit 960c16cd389fd56542fd3dcc8935406e022cb1be)
2020-04-22 21:14:47 +01:00
Anton Hansson
960c16cd38 Remove obsolete droidstub args
- I see no usages of private_api_filename / private.txt /
  private_dex_api_filename
- tags are no longer used as of
  Iff355041d88eb59ac47dd19a03e993cf1ce3927e
- api_filename/removed_api_filename does nothing if check_api is
  specified. test-api does not need a removed.txt

Bug: 152479829
Bug: 144149403
Test: m
Change-Id: Ic1e859dc6aa91f8d7b4f285b63d3faafb27edc9b
2020-04-22 20:59:21 +01:00
Aurimas Liutikas
9b7b73d91b Stop building unused dex.txt files
Testing with:
touch frameworks/base/core/java/android/view/View.java && time make -j framework

Before patch:
Run #1: 107.8 seconds
Run #2: 106.5 seconds
Run #3: 108.3 seconds
Average: 107.5 seconds

After patch:
Run #1: 105.5 seconds
Run #2: 105.6 seconds
Run #3: 105.0 seconds
Average: 105.4 seconds

Savings of 2.2 seconds (~2%)

Test: make framework
Bug: 151160048

Change-Id: Ic58875a315c9d1dc09b029d3de405a5f5648c46e
Merged-In: Ic58875a315c9d1dc09b029d3de405a5f5648c46e
2020-04-22 14:36:57 +01:00
Anton Hansson
ba367d3b7d Convert disting of api txt from mk to bp
droidstubs dist now dists the api file, so convert these manual
mk rules into bp dist instead.

Bug: 149293194
Test: m dist sdk && find out/dist/apistubs -name /android\.txt
Change-Id: I96052b427dc01a6d24b040ad0006129d4d1e48fb
Merged-In: I96052b427dc01a6d24b040ad0006129d4d1e48fb
2020-04-17 11:38:20 +01:00
Anton Hansson
3be3a8c822 Merge "Make non-updatable stubs depend on sdk 29" into rvc-dev am: d42b7dd9df
Change-Id: I2d0ea3d715a557567406aab59cb247001a6ae8ee
2020-04-17 08:24:22 +00:00
Anton Hansson
394febc71b Make non-updatable stubs depend on sdk 29
There are a few classes from modules referenced as type
arguments in the non-updatable part of the API, which
need to be resolved.

The current dependencies that satisfy those references
create dependency cycles when we change the big stubs to
be assembled from other stubs. I considered two options for
breaking that cycle:
1) depending on a previous SDK
2) add empty classes in a simple manual stub lib

This CL does #1. #2 is more work, but may be required when/if
we want to reference a newly-added API in the same release.

Bug: 144149403
Bug: 149906971
Test: m
Change-Id: I3c5e611ca45536bdd931291e663a21757e35992f
2020-04-15 10:12:44 +01:00
Treehugger Robot
ec90b54f4d Merge "Rename conscrypt-module-public-api-stubs-source" am: 8d7c075bee am: fa22e9cbd6
Change-Id: I83f6a9a33e6c633ac8030dc13d3fd80886b8711e
2020-04-14 12:25:57 +00:00
Treehugger Robot
8d7c075bee Merge "Rename conscrypt-module-public-api-stubs-source" 2020-04-14 11:45:54 +00:00
Anton Hansson
1b0df10bb9 Merge "Use sdk_version: none for platform stubs" am: ad2433ffcd am: b85c57cd47
Change-Id: Ie92c5e97901a103d09aed63781254bbc4337ec61
2020-04-10 14:36:24 +00:00
Anton Hansson
ad2433ffcd Merge "Use sdk_version: none for platform stubs" 2020-04-10 14:00:16 +00:00
Treehugger Robot
52693bd2df Merge "Disable stubs generation when generating module_lib .txt file" am: 95f4ad098a am: 99142fc4c6
Change-Id: I11bf75b8ad226194bbca6731f833c9da8fbdfd7e
2020-04-10 08:21:43 +00:00
Paul Duffin
29adf462b6 Rename conscrypt-module-public-api-stubs-source
Renamed conscrypt-module-public-api-stubs-source to
conscrypt.module.public.api.stubs.source to match the format of the
name created by java_sdk_library.

This is in preparation for switching to use java_sdk_library to
generate conscrypt's public API.

Bug: 153443117
Test: m nothing
Change-Id: I26ad21cf74ad3600de250df8e84deec65b91b3f9
2020-04-09 21:45:27 +01:00
Paul Duffin
4c5dc18da5 Disable stubs generation when generating module_lib .txt file
Avoids droidstubs doing unnecessary work to create stubs files that are
not actually used.

Bug: 146727827
Test: framework-sdkextensions-api-module_libs_api
Change-Id: Ic537fda99b564877709666025fb8df872144d827
2020-04-09 18:11:26 +01:00
Anton Hansson
87c7d28881 Use sdk_version: none for platform stubs
These stubs contain the libcore sources inside them, so need not
compile against core_current.

Also rename the defaults rule to be in line with the new neverallow.

Bug: 144149403
Test: m
Change-Id: I5f1b01875b0073f942c692882db157a8c5788ce0
Merged-In: I5f1b01875b0073f942c692882db157a8c5788ce0
2020-04-09 17:31:28 +01:00
Anton Hansson
fbd32f3274 Use sdk_version: none for platform stubs
These stubs contain the libcore sources inside them, so need not
compile against core_current.

Also rename the defaults rule to be in line with the new neverallow.

Bug: 144149403
Test: m
Change-Id: I5f1b01875b0073f942c692882db157a8c5788ce0
2020-04-09 15:00:54 +01:00
Artur Satayev
7e7fdde3a5 Remove hiddenapi-mappings and hiddenapi-list-docs.
We still need to keep access to removed APIs to keep them on greylist. Instead of having a separate run to generate those, we would instead depend on the actual droidstubs.

Kudos to Makoto for producing build traces:

"m droid"
Before: https://screenshot.googleplex.com/oEcd4x76YAz
After: https://screenshot.googleplex.com/CxZCNJMDyK5

"m sync"
Before: https://screenshot.googleplex.com/7cjE96qcNAL
After: https://screenshot.googleplex.com/po6BhCoP9L3

Bug: 143864733
Test: diff out/soong/hiddenapi/hiddenapi-flags.csv
Exempt-From-Owner-Approval: clean cherry-pick

(cherry picked from commit 0a97d5eaf2f57ed9d93c8360a8a83e98440a4ec7)

Change-Id: If9dcac94eb077c6265c5acf5b3ce6d262db64f90
Merged-In: If9dcac94eb077c6265c5acf5b3ce6d262db64f90
2020-03-31 18:25:28 +00:00
satayev
893fc27f7a Merge "Remove hiddenapi-mappings and hiddenapi-list-docs." am: d5ed17def6 am: fcd3de32fe
Change-Id: I337ff9ff4b1a1de7eb49748e1f248b7bede3ac31
2020-03-31 12:54:49 +00:00
Artur Satayev
0a97d5eaf2 Remove hiddenapi-mappings and hiddenapi-list-docs.
We still need to keep access to removed APIs to keep them on greylist. Instead of having a separate run to generate those, we would instead depend on the actual droidstubs.

Kudos to Makoto for producing build traces:

"m droid"
Before: https://screenshot.googleplex.com/oEcd4x76YAz
After: https://screenshot.googleplex.com/CxZCNJMDyK5

"m sync"
Before: https://screenshot.googleplex.com/7cjE96qcNAL
After: https://screenshot.googleplex.com/po6BhCoP9L3

Bug: 143864733
Test: diff out/soong/hiddenapi/hiddenapi-flags.csv
Change-Id: If9dcac94eb077c6265c5acf5b3ce6d262db64f90
2020-03-30 17:25:17 +01:00
Paul Duffin
a1248cae0e Merge "Reference libcore, conscrypt and icu sources directly" am: 77481306a7 am: 0843760b84
Change-Id: Id81fcef1856a0cb3b3df5572cc9623a31d718734
2020-03-27 12:58:01 +00:00
Treehugger Robot
3d2bab1379 Merge "Use art-notices-for-framework-stubs-jar instead of filegroup" am: 23d37487df am: 67b9d32a7d
Change-Id: Ia0088c440e9ccfe8f2fcded53aebe08c7a8c1beb
2020-03-26 19:12:41 +00:00
Paul Duffin
5c89e70a1f Reference libcore, conscrypt and icu sources directly
Avoids an extra aggregation step in the creation of the API sources.

Test: m nothing
Bug: 142935992
Change-Id: Ia15c3ceb9fc59e7945687536c60ce265ec95781e
2020-03-26 15:41:25 +00:00
Paul Duffin
a281e926fc Use art-notices-for-framework-stubs-jar instead of filegroup
Bug: 142935992
Test: m droid
      manually check android_stubs_current contains the notices
Change-Id: I55a231ff8325d3ba67bf7ccdee720d450a8ebae4
2020-03-26 11:56:12 +00:00
Anton Hansson
7a046a99b7 Merge "Convert disting of api txt from mk to bp" into rvc-dev am: 9cc8c2e6f2
Change-Id: I468b59ab9157fae56889ff74df5770d2249a3489
2020-03-26 08:55:55 +00:00
Anton Hansson
9cc8c2e6f2 Merge "Convert disting of api txt from mk to bp" into rvc-dev 2020-03-26 08:41:20 +00:00
Anton Hansson
33d6fda1e0 Merge "Add module_lib and system-server artifacts to sdk dist" 2020-03-25 15:56:51 +00:00
Aurimas Liutikas
6bb95ad751 Reconfigure stub libraries to do less work.
- Stop generating api version XML file
- Stop reading api version XML file

Testing with:
touch frameworks/base/core/java/android/view/View.java && time make -j framework

Before patch:
Run #1: 118.7 seconds
Run #2: 118.8 seconds
Run #3: 117.7 seconds
Average: 118.4 seconds

After patch:
Run #1: 107.8 seconds
Run #2: 106.5 seconds
Run #3: 108.3 seconds
Average: 107.5 seconds

Savings of 10.7 seconds (~9.2%)

Test: make framework
Bug: 151160048
Change-Id: Ie3a7e078844d1d1cac7976142e2069704d4c1545
Merged-in: Ie3a7e078844d1d1cac7976142e2069704d4c1545
2020-03-23 18:52:53 +00:00
Anton Hansson
d9a3fee23d Convert disting of api txt from mk to bp
droidstubs dist now dists the api file, so convert these manual
mk rules into bp dist instead.

Bug: 149293194
Test: m dist sdk && find out/dist/apistubs -name /android\.txt
Change-Id: I96052b427dc01a6d24b040ad0006129d4d1e48fb
2020-03-23 18:33:21 +00:00
Anton Hansson
9a01e55cb6 Add module_lib and system-server artifacts to sdk dist
Makes these artifacts available for the update_prebuilts script.

Bug: 149293194
Test: m win_sdk dist && find out/dist -type f
Change-Id: Ia1064e50e987433e5e308527c6770ba2d3e8bde3
Merged-In: Ia1064e50e987433e5e308527c6770ba2d3e8bde3
(cherry picked from commit 7b0414beb77aaf67124c3ef7f2a55a898772bd1d)
2020-03-20 15:22:20 +00:00
Anton Hansson
f085f1de87 Merge "Add module_lib and system-server artifacts to sdk dist" into rvc-dev am: 043255c8bf
Change-Id: Icc248d1d5b3afc97aa058bcb3fbf597f4285265c
2020-03-20 13:00:55 +00:00
Anton Hansson
043255c8bf Merge "Add module_lib and system-server artifacts to sdk dist" into rvc-dev 2020-03-20 12:44:49 +00:00
Anton Hansson
e53bec0567 Remove SDK dep from module_lib_api
This had the consequence of making two large metalava invocations
run in sequence rather than parallell.

For now, add back the dependency on framework-all instead. Building
framework-all should be a lot faster than the sdk stubs.

Also move the module stubs dep from framework_defaults to
framework-minus-apex. framework-all does not need this dep.

Bug: 151092414
Test: m
Test: NINJA_ARGS="-t path out/soong/.intermediates/frameworks/base/module-lib-api-stubs-docs/android_common/module-lib-api-stubs-docs-stubs.srcjar \
                          out/soong/.intermediates/frameworks/base/system-api-stubs-docs/android_common/system-api-stubs-docs-stubs.srcjar" m
Change-Id: Ifdf8823d374254e594330b43ae3a39a76c7b90c5
Merged-In: Ifdf8823d374254e594330b43ae3a39a76c7b90c5
(cherry picked from commit 92d79fddd49b1b502f0b47c574fb1aec7ca85b15)
2020-03-20 11:30:59 +00:00
Anton Hansson
a758a7f1dd Merge "Remove SDK dep from module_lib_api" into rvc-dev am: d3bf9fdefd
Change-Id: I92c7079d321806398e992250efb79c071dcdd335
2020-03-20 11:24:15 +00:00
Anton Hansson
92d79fddd4 Remove SDK dep from module_lib_api
This had the consequence of making two large metalava invocations
run in sequence rather than parallell.

For now, add back the dependency on framework-all instead. Building
framework-all should be a lot faster than the sdk stubs.

Also move the module stubs dep from framework_defaults to
framework-minus-apex. framework-all does not need this dep.

Bug: 151092414
Test: m
Test: NINJA_ARGS="-t path out/soong/.intermediates/frameworks/base/module-lib-api-stubs-docs/android_common/module-lib-api-stubs-docs-stubs.srcjar \
                          out/soong/.intermediates/frameworks/base/system-api-stubs-docs/android_common/system-api-stubs-docs-stubs.srcjar" m
Change-Id: Ifdf8823d374254e594330b43ae3a39a76c7b90c5
2020-03-20 09:24:15 +00:00
Anton Hansson
7b0414beb7 Add module_lib and system-server artifacts to sdk dist
Makes these artifacts available for the update_prebuilts script.

Bug: 149293194
Test: m win_sdk dist && find out/dist -type f
Change-Id: Ia1064e50e987433e5e308527c6770ba2d3e8bde3
2020-03-19 19:21:49 +00:00
Anton Hansson
b7a4febf02 Merge "Take module APIs out of the module_current stubs" 2020-03-17 08:52:08 +00:00
Automerger Merge Worker
b5d9f9f4ed Merge "Stop building unused dex.txt files" am: 8a8b52a6be am: 95de721b49
Change-Id: I23a0cd0a8c44b83475055f6aa7723d3773bfe709
2020-03-16 17:01:08 +00:00
Anton Hansson
537564eb3d Take module APIs out of the module_current stubs
This allows modules components to depend on internals of other
module components, by specifying the non-stub version of that
library.

Bug: 151092414
Test: m
Change-Id: Ia39b2686de7619ccb1ec154588c11a8b1b322647
Merged-In: Ia39b2686de7619ccb1ec154588c11a8b1b322647
2020-03-16 16:06:16 +00:00
Aurimas Liutikas
d8fdf73da9 Stop building unused dex.txt files
Testing with:
touch frameworks/base/core/java/android/view/View.java && time make -j framework

Before patch:
Run #1: 107.8 seconds
Run #2: 106.5 seconds
Run #3: 108.3 seconds
Average: 107.5 seconds

After patch:
Run #1: 105.5 seconds
Run #2: 105.6 seconds
Run #3: 105.0 seconds
Average: 105.4 seconds

Savings of 2.2 seconds (~2%)

Test: make framework
Bug: 151160048

Change-Id: Ic58875a315c9d1dc09b029d3de405a5f5648c46e
2020-03-16 15:45:48 +00:00
Automerger Merge Worker
5b816a3d6b Merge "Take module APIs out of the module_current stubs" into rvc-dev am: 93f9bb0485
Change-Id: Iba1bbec3db531faa39646e76f774643cd2de632a
2020-03-16 12:52:42 +00:00
Automerger Merge Worker
06f550e21e Merge "Reconfigure stub libraries to do less work." am: 7488b79ea0 am: 78e96933f3
Change-Id: I02c41d6346a405badbafaed78b551ab75fa4c117
2020-03-13 02:44:21 +00:00
Aurimas Liutikas
94bac9cceb Reconfigure stub libraries to do less work.
- Stop generating api version XML file
- Stop reading api version XML file

Testing with:
touch frameworks/base/core/java/android/view/View.java && time make -j framework

Before patch:
Run #1: 118.7 seconds
Run #2: 118.8 seconds
Run #3: 117.7 seconds
Average: 118.4 seconds

After patch:
Run #1: 107.8 seconds
Run #2: 106.5 seconds
Run #3: 108.3 seconds
Average: 107.5 seconds

Savings of 10.7 seconds (~9.2%)

Test: make framework
Bug: 151160048
Change-Id: Ie3a7e078844d1d1cac7976142e2069704d4c1545
2020-03-12 17:06:12 -07:00
Anton Hansson
822cdb3031 Take module APIs out of the module_current stubs
This allows modules components to depend on internals of other
module components, by specifying the non-stub version of that
library.

Bug: 151092414
Test: m
Change-Id: Ia39b2686de7619ccb1ec154588c11a8b1b322647
2020-03-11 15:01:20 +00:00
evitayan
5daf75d5b8 Do not expose module IPsec(IKE) API from frameworks
Module IPsec(IKE) will not be in bootclasspath or expose API
from frameworks/base anymore. Instead it will be built as a
java_sdk_library and expose APIs under its own directory.

This commit:
- Removes API from frameworks/base
- Adds ike to FrameworksNetTests manifest so that VpnTest is
  able to load it.

Bug: 145995723
Test: build, flash, boot
Test: atest FramewokrsIkeTests (passed)
Test: m mts && mts-tradefed run mts-ipsec (passed)
Test: manually tested that FrameworksNetTests can use ike.jar
Change-Id: I37ba02eb3003ea28e66f50ca0b612597ef48f6d5
Merged-In: I37ba02eb3003ea28e66f50ca0b612597ef48f6d5
2020-02-20 05:51:35 +00:00
evitayan
daeb328e32 Do not expose module IPsec(IKE) API from frameworks
Module IPsec(IKE) will not be in bootclasspath or expose API
from frameworks/base anymore. Instead it will be built as a
java_sdk_library and expose APIs under its own directory.

This commit:
- Removes API from frameworks/base
- Adds ike to FrameworksNetTests manifest so that VpnTest is
  able to load it.

Bug: 145995723
Test: build, flash, boot
Test: atest FramewokrsIkeTests (passed)
Test: m mts && mts-tradefed run mts-ipsec (passed)
Test: manually tested that FrameworksNetTests can use ike.jar
Change-Id: I37ba02eb3003ea28e66f50ca0b612597ef48f6d5
2020-02-19 12:55:25 -08:00
Anton Hansson
626afea1bd Enable compat checking & lint for module_lib api
These were previously turned off as there were no previous
releases to compare it to. Check in empty files as comparison.

The new tethering APIs fail lint -- I have filed a release
blocking bug to get these cleaned up.

Bug: 149430003
Bug: 147559833
Test: m module-lib-api-api-lint
Test: m module-lib-api-check-last-released-api (with+without incompatibilities)
Change-Id: I2b171dc836ca121502fb345d8dd512a05c566a49
Merged-In: I2b171dc836ca121502fb345d8dd512a05c566a49
(cherry picked from commit 79e35c3bebb348be9ccb95bfd7d1862365303fcb)
2020-02-19 14:58:44 +00:00
Anton Hansson
79e35c3beb Enable compat checking & lint for module_lib api
These were previously turned off as there were no previous
releases to compare it to. Check in empty files as comparison.

The new tethering APIs fail lint -- I have filed a release
blocking bug to get these cleaned up.

Bug: 149430003
Bug: 147559833
Test: m module-lib-api-api-lint
Test: m module-lib-api-check-last-released-api (with+without incompatibilities)
Change-Id: I2b171dc836ca121502fb345d8dd512a05c566a49
2020-02-12 23:55:41 +00:00
Anton Hansson
42afd61fe2 Dedup stub jar build rules
Move shared attrs into defaults.

Bug: 146757305
Test: m
Change-Id: I90292cafaac1dcc64d642db072ce4880fcdb87cb
Merged-In: I90292cafaac1dcc64d642db072ce4880fcdb87cb
2020-02-10 14:56:52 +00:00
Anton Hansson
708d1211df Tweak module_libs stub build rules
- Don't depend on framework-all (we depend on srcs)
- Set sdk_version to core_current

Bug: 146757305
Test: m
Change-Id: I9f14d35ba657045e99190b7a651781a5b87d490d
Merged-In: I9f14d35ba657045e99190b7a651781a5b87d490d
2020-02-10 14:52:59 +00:00
Anton Hansson
08b48bb91f Dedup stub jar build rules
Move shared attrs into defaults.

Bug: 146757305
Test: m
Change-Id: I90292cafaac1dcc64d642db072ce4880fcdb87cb
2020-02-08 20:43:19 +00:00