<feed xmlns='http://www.w3.org/2005/Atom'>
<title>platform_tools_base/bazel/src, branch studio-master-dev</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_tools_base/'/>
<entry>
<title>Exit from BazelWorker when stdin receives EOF.</title>
<updated>2020-05-19T16:18:53+00:00</updated>
<author>
<name>Tom Renn</name>
<email>tomrenn@google.com</email>
</author>
<published>2020-04-30T23:06:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_tools_base/commit/?id=62d021abed4b0e7c9302517fa2f9a6767d06250b'/>
<id>62d021abed4b0e7c9302517fa2f9a6767d06250b</id>
<content type='text'>
When bazel workers are stopped the delimited WorkRequest stream
will end returning null. Instead of crashing, gracefully break
from the while(true) loop.

This isn't a direct fix for any particular bug but something I
stumbled across and thought was causing other issues.

Bug: none
Test: none
Change-Id: I019e8a75fc5db2a254e53ba72a0a90ebfd5bad0f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When bazel workers are stopped the delimited WorkRequest stream
will end returning null. Instead of crashing, gracefully break
from the while(true) loop.

This isn't a direct fix for any particular bug but something I
stumbled across and thought was causing other issues.

Bug: none
Test: none
Change-Id: I019e8a75fc5db2a254e53ba72a0a90ebfd5bad0f
</pre>
</div>
</content>
</entry>
<entry>
<title>Add an optional max_workers attribute to the gradle_build rule, and set it to 1 in data-binding targets.</title>
<updated>2020-05-14T00:37:41+00:00</updated>
<author>
<name>Zach Yu</name>
<email>zachyu@google.com</email>
</author>
<published>2020-05-14T00:06:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_tools_base/commit/?id=fc957e59e50058c59e0eba63915ffcb7e43b6341'/>
<id>fc957e59e50058c59e0eba63915ffcb7e43b6341</id>
<content type='text'>
This attribute is passed thru to Gradle as the --max-workers flag to set number of workers. It has no impact if the attribute is not set.

Test: presubmit test
Bug: 155772061
Change-Id: I71057dd119268fc299d61d88ff4bf860e5223c7d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This attribute is passed thru to Gradle as the --max-workers flag to set number of workers. It has no impact if the attribute is not set.

Test: presubmit test
Bug: 155772061
Change-Id: I71057dd119268fc299d61d88ff4bf860e5223c7d
</pre>
</div>
</content>
</entry>
<entry>
<title>Suppress intellij.gradle.toolingExtension.impl</title>
<updated>2020-05-09T01:00:00+00:00</updated>
<author>
<name>Dana Dahlstrom</name>
<email>dahlstrom@google.com</email>
</author>
<published>2020-05-08T03:00:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_tools_base/commit/?id=3535626c0c0a9c8d2711f66250a9e78fb3937a96'/>
<id>3535626c0c0a9c8d2711f66250a9e78fb3937a96</id>
<content type='text'>
… because Bazel fails to compile it.

Change-Id: I21a0c39f7ada09f8aa03be6d9403af532e6dc044
Issue: 156122269
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
… because Bazel fails to compile it.

Change-Id: I21a0c39f7ada09f8aa03be6d9403af532e6dc044
Issue: 156122269
</pre>
</div>
</content>
</entry>
<entry>
<title>Verify iml and bazel build files are in sync.</title>
<updated>2020-04-27T15:38:40+00:00</updated>
<author>
<name>Chris Warrington</name>
<email>cmw@google.com</email>
</author>
<published>2020-04-15T14:33:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_tools_base/commit/?id=d6bc10a331255915700450f7ca2f47626445db43'/>
<id>d6bc10a331255915700450f7ca2f47626445db43</id>
<content type='text'>
This removes the support added in
I1d6db69a28ac3c337f1594121ec2e93590245cf1, but does include a workaround
for https://github.com/bazelbuild/bazel/issues/6038 where bazel does not
respect the no-cache tag when run remotely.

Bug: 147349418
Test: Added new automated bazel test //tools/base/bazel:iml_to_build_consistency_test
Change-Id: I71d9f481549326e2aed6e6b0e96979c04c129dd0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes the support added in
I1d6db69a28ac3c337f1594121ec2e93590245cf1, but does include a workaround
for https://github.com/bazelbuild/bazel/issues/6038 where bazel does not
respect the no-cache tag when run remotely.

Bug: 147349418
Test: Added new automated bazel test //tools/base/bazel:iml_to_build_consistency_test
Change-Id: I71d9f481549326e2aed6e6b0e96979c04c129dd0
</pre>
</div>
</content>
</entry>
<entry>
<title>Disable warnings for kotlinc in Bazel</title>
<updated>2020-04-14T19:56:27+00:00</updated>
<author>
<name>Matthew Gharrity</name>
<email>gharrma@google.com</email>
</author>
<published>2020-04-14T19:17:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_tools_base/commit/?id=d4b9ee8ac513a45109a0d7f5f7d630cac080314b'/>
<id>d4b9ee8ac513a45109a0d7f5f7d630cac080314b</id>
<content type='text'>
Fixes: 154016174
Change-Id: Ibde25980479488e10d0afe17a7cc89e623780686
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes: 154016174
Change-Id: Ibde25980479488e10d0afe17a7cc89e623780686
</pre>
</div>
</content>
</entry>
<entry>
<title>[iml_to_build] Support cross-module test friends</title>
<updated>2020-03-31T17:09:33+00:00</updated>
<author>
<name>Matthew Gharrity</name>
<email>gharrma@google.com</email>
</author>
<published>2020-03-27T14:42:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_tools_base/commit/?id=fdc71cbbf4643b033d30b0443522964022fa5f89'/>
<id>fdc71cbbf4643b033d30b0443522964022fa5f89</id>
<content type='text'>
This adds support for iml lines like this:

  &lt;component name="TestModuleProperties" production-module="&lt;name&gt;" /&gt;

That line specifies a module that should be treated as a
Kotlin 'friend', allowing access to internal members.

Note: Kotlin friends should generally not affect the connected
components of the module dependency graph, because Kotlin friends
will generally be declared as normal dependencies as well.

Fixes: 152503545
Test: updated //tools/base/bazel:iml_to_build_tests
Change-Id: I80524fd1c169977668a2c2bc276f9186078d2fea
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds support for iml lines like this:

  &lt;component name="TestModuleProperties" production-module="&lt;name&gt;" /&gt;

That line specifies a module that should be treated as a
Kotlin 'friend', allowing access to internal members.

Note: Kotlin friends should generally not affect the connected
components of the module dependency graph, because Kotlin friends
will generally be declared as normal dependencies as well.

Fixes: 152503545
Test: updated //tools/base/bazel:iml_to_build_tests
Change-Id: I80524fd1c169977668a2c2bc276f9186078d2fea
</pre>
</div>
</content>
</entry>
<entry>
<title>Separate friend paths by ","</title>
<updated>2020-03-26T22:04:06+00:00</updated>
<author>
<name>Matthew Gharrity</name>
<email>gharrma@google.com</email>
</author>
<published>2020-03-26T17:28:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_tools_base/commit/?id=5c0eabb8a0b665a8af2e5d4fbbe27b2cbc9f85c2'/>
<id>5c0eabb8a0b665a8af2e5d4fbbe27b2cbc9f85c2</id>
<content type='text'>
...instead of File.pathSeparator, since it turns out Kotlin ignores that.

Issue: 152503545
Change-Id: I2f5c5f93eb5d8ea3427b4e7c89418a824f99932d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
...instead of File.pathSeparator, since it turns out Kotlin ignores that.

Issue: 152503545
Change-Id: I2f5c5f93eb5d8ea3427b4e7c89418a824f99932d
</pre>
</div>
</content>
</entry>
<entry>
<title>Use native singlejar for build speedup</title>
<updated>2020-03-03T22:01:44+00:00</updated>
<author>
<name>Matthew Gharrity</name>
<email>gharrma@google.com</email>
</author>
<published>2020-01-31T23:06:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_tools_base/commit/?id=f2bedac245b06234244979a579269d22fe147f6a'/>
<id>f2bedac245b06234244979a579269d22fe147f6a</id>
<content type='text'>
In the past, we wrote custom Java code for merging jar files.
Meanwhile, Bazel has written an optimized version of singlejar
in C++ that is much faster. It even works on Windows now; see
https://github.com/bazelbuild/bazel/issues/2241

Our previous jar merging tool takes about 10 seconds to produce
intellij.android.core.jar, whereas the native tool takes about
200 ms (50x speedup).

Jar merging tends to take around 5% of the critical path build
time, so hopefully this change will improve presubmit latency.
It's hard to say, though, because singlejar is not as fast on
RBE as it is locally.

I've verified that singlejar is deterministic when we pass
the --normalize flag, just like our previous jar merging tool.

Note that while singlejar supports a --no_duplicates flag, we
cannot use it for most targets because we do in fact pass in
jars containing duplicate entries. This is worth investigating,
but is not tackled here.

Migrating to an official singlejar implementation also brings some
correctness benefits. For example, it properly merges META-INF/services
resources.

Change-Id: Ib87292d4e0ba626f28caffd95ac474eaf2102606
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the past, we wrote custom Java code for merging jar files.
Meanwhile, Bazel has written an optimized version of singlejar
in C++ that is much faster. It even works on Windows now; see
https://github.com/bazelbuild/bazel/issues/2241

Our previous jar merging tool takes about 10 seconds to produce
intellij.android.core.jar, whereas the native tool takes about
200 ms (50x speedup).

Jar merging tends to take around 5% of the critical path build
time, so hopefully this change will improve presubmit latency.
It's hard to say, though, because singlejar is not as fast on
RBE as it is locally.

I've verified that singlejar is deterministic when we pass
the --normalize flag, just like our previous jar merging tool.

Note that while singlejar supports a --no_duplicates flag, we
cannot use it for most targets because we do in fact pass in
jars containing duplicate entries. This is worth investigating,
but is not tackled here.

Migrating to an official singlejar implementation also brings some
correctness benefits. For example, it properly merges META-INF/services
resources.

Change-Id: Ib87292d4e0ba626f28caffd95ac474eaf2102606
</pre>
</div>
</content>
</entry>
<entry>
<title>Devtools lint: Support tests.</title>
<updated>2020-02-21T16:18:37+00:00</updated>
<author>
<name>Chris Warrington</name>
<email>cmw@google.com</email>
</author>
<published>2020-02-21T13:20:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_tools_base/commit/?id=644f7a3987f2af7e5569c8b694a595f79694417c'/>
<id>644f7a3987f2af7e5569c8b694a595f79694417c</id>
<content type='text'>
Some lint tests, such as VisibleForTests, behave differently on test
sources. This change introduces lint_is_test_sources to kotlin_library
to allow a target to opt-in for lint treating the sources as test
sources.

Bug: N/A
Test: Used in I71754a7a3f8a8f9cb50293ee5ef3f58b944c05e7
Change-Id: I62d9d04e0da8a2b790cdd4c284f3a810b139fa1d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some lint tests, such as VisibleForTests, behave differently on test
sources. This change introduces lint_is_test_sources to kotlin_library
to allow a target to opt-in for lint treating the sources as test
sources.

Bug: N/A
Test: Used in I71754a7a3f8a8f9cb50293ee5ef3f58b944c05e7
Change-Id: I62d9d04e0da8a2b790cdd4c284f3a810b139fa1d
</pre>
</div>
</content>
</entry>
<entry>
<title>Stop calling System.gc() in BazelWorker</title>
<updated>2020-02-18T22:23:47+00:00</updated>
<author>
<name>Matthew Gharrity</name>
<email>gharrma@google.com</email>
</author>
<published>2020-02-18T21:01:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_tools_base/commit/?id=c8ed7cfa033b99f8abcdbec2c5b662df8ebf71a3'/>
<id>c8ed7cfa033b99f8abcdbec2c5b662df8ebf71a3</id>
<content type='text'>
It adds ~200 ms latency per job, and it's not clear
that it will actually give memory back to the OS.

Change-Id: I1e1eaba69fe33edafde9b9091e2c046dfe3f46f6
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It adds ~200 ms latency per job, and it's not clear
that it will actually give memory back to the OS.

Change-Id: I1e1eaba69fe33edafde9b9091e2c046dfe3f46f6
</pre>
</div>
</content>
</entry>
</feed>
