Some paths contain glob characters. For now allow paths with glob
characters as long as they are in glob results. In the future we
may need to allow escaping glob characters.
Test: m checkbuild
Test: paths_test.go
Change-Id: I1cbeea658e8fc4975ca0b6a50a8c24ac2de026c5
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
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
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
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
Files in the data property will be passed to
LOCAL_COMPATIBILITY_SUPPORT_FILES in Make.
Test: m checkbuild
Change-Id: Ifc074317f957aba8f55daa30abc5b9737d1eceac
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
We were not passing the proguard_flags_files files as -include
arguments to R8.
Bug: 112462307
Test: m checkbuild
Change-Id: I8f3b10fc338aa4b15c0fb220ee2891efbb0b020f
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
Bug: 78793464
Test: mmm
libhardware needs to be made available in recovery without
exporting bluetooth and audio headers.
Change-Id: Ib1d1bcda49abccfb9a4768580e1c1d92ead68773
Adding a mechanism to conditionally exclude some header library
dependencies when a lib is built for vendors.
Without this, some libraries cannot be earily marked as vendor_available
if they are depending on header libs can shouldn't be marked as
vendor_available.
By using exclude_header_libs with exclude_srcs (or __ANDROID_VNDK__
macro), we can eliminate the unnecessary dependency for vendors.
Bug: 112338314
Test: build
Change-Id: If12dceb6045099fe828fe33af2ac4428f88499a2
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
This commit changes how `cc/androidmk.go` generates LOCAL_MODULE_STEM,
LOCAL_MODULE_SUFFIX, and LOCAL_BUILT_MODULE_STEM. Now, `splitFileExt()`
takes a file name and a list of expected file extensions.
`splitFileExt()` searches the first occurrence of expected file
extensions in the file name. If it can not find any, it will simply
return the last file extension.
Before this commit, `cc/androidmk.go` simply extracts the last file
extension (e.g. `.so`). However, if the prebuilt shared libs end with
version numbers (e.g. `libc++.so.1`), it will use `$(LOCAL_MODULE).1` as
LOCAL_BUILT_MODULE_STEM and this will lead to missing target ninja
error.
Bug: 111579848
Test: Build a program that links libc++_host (from prebuilts/clang)
Change-Id: Id96726c69705d518ea725bb6abd8ff4527ca0cbc
This is common to binaries and libraries, so move it from library.link
and binary.link to baseLinker.linkerFlags and baseLinker.linkerDeps.
Test: make checkbuild
Bug: None
Change-Id: I5fb24118e601673ae0713a6adc773a1565749be8
This seems to have bitrotted at some point. Revive it and document
all the enum values.
Test: make checkbuild
Bug: None
Change-Id: If3e7b096e95b089097271ed594a808437f810639
Buildbot parses failure messages that look like ninja errors, but this
error doesn't look like a ninja error. We used to output this via
stderr, which buildbot would fall back to, but that had synchronization
issues between stderr and stdout.
So switch this over to use the status API, marking this action as failed
when necessary, which will display a ninja-like error that buildbot can
parse.
Bug: 112007097
Test: add dangling dep, look at output.
Change-Id: Ib2bbba4373ea22ac01af8aa6bbf295296a93e94d
We don't have API exported to glob any dir outside of current module.
Any files deps outside of current module should be either a
filegroup/filegroup or a customized module.
We already have similar customized module to track droiddoc-template, so
rename it to be more generic so that it can be used by
merge_annotations_dir also.
Bug: b/111916275, b/70351683
Test: touch manual/android/support/design/widget/annotations.xml, and m
-j metalava-api-stubs-docs, and check the built output srcjar.
Change-Id: I75420ddba69785e46bea75b6dd3f189be7cfe5ad
The GenerateAndroidBuildActions() is too big to be maintained and added-in new
features.
Since the GenerateAndroidBuildActions() is a giant code block having build flags
setting and workflow logic mixed in it. So seperate these two main
stuff to only keep workflow logic in the function, and create other
indipendent flags setting functions to increase the modularity.
Test: m -j api-stubs-docs && m -j metalava-api-stubs-docs, and check
build.ninja file
Bug: b/70351683
Change-Id: I4230d353756aeb4b24640f641b8f8bab6b21204d
Droiddoc_options is added, since all sdk libraries don't builds with the
same argument. We provide basic droiddoc argument and options can be
added like "stubsourceonly" by this property.
When building stubs, soong don't make dex files, but some module uses
dex files from stubs. So Complie_dex is added for compiling dex
regardless of installable.
Srcs_lib_whitelist_pkgs property is added for using other whitelist
pkgs instead of "android.annotation".
Bug: 77577799
Test: m -j
Change-Id: Ic2fb7bc9c49a825550dbebe3e9132ad9a735322f
This commit removes LinuxClangCppflags. Adding these `-isystem` flags
results in build failures when we build a module with `libc++_host`.
Furthermore, these headers are not being used anymore.
Bug: 111579848
Test: make checkbuild # on aosp and internal
Change-Id: Ideca268431d9d60d383e3e5b7bb3f73ece416bd2
bundle files related to sdk dev tool(activity_actions.txt, and etc.) to the
final -docs.zip file since sdk.atree needs to copy these files from
$(OUT_DOCS)/offline-sdk dir.
Test: m -j out/target/common/docs/offline-sdk-timestamp
Bug: b/70351683
Change-Id: I3bfb3c56570dd6728dec272d38c6046e0d44c40f
Merged-In: I3bfb3c56570dd6728dec272d38c6046e0d44c40f