Commit graph

136 commits

Author SHA1 Message Date
Tobias Thierer
daddbdda2f Merge "javadoc/droidoc: Don't add .jar files to sourcepath." am: c209fb1799
am: 1bba4bfd24

Change-Id: I80c1ea39795610433f41f99512d52d6a70417cc9
2018-03-27 10:13:51 +00:00
Tobias Thierer
e5665cdb4e javadoc/droidoc: Don't add .jar files to sourcepath.
javadoc expects directories on the sourcepath, not jar files.
The original commit 88b607994a
in 2009 was already passing the jar files, and every revision
since then seems to have kept this habit through cargo cult.

This CL removes the superfluous jar file arguments from the
sourcepath argument to javadoc.

Test: Treehugger
Bug: 76436487

Change-Id: I44b4b8ba248ad4deafbb6462e6f7398f15bd2845
2018-03-27 00:33:18 +01:00
Nan Zhang
4d74d95e60 Print PRIVATE_SRC_LIST_FILE & PRIVATE_SRCJAR_LIST_FILE
to make sure if the inputs contains specific file path when
doclava throws the missing file error.

Test: m out/target/common/docs/core-current-stubs-gen-timestamp
Bug: b/76397326
Change-Id: Ib319912ae85e80fd53e7520f2c89268bb4b91c43
2018-03-26 15:27:08 -07:00
Colin Cross
3f99cd5933 Replace extract_srcjars.sh with zipsync
Use zipsync instead of extract_srcjars.sh.

Also fixes an issue where unzipping a resource zip would
ignore anything that wasn't a *.java file.

Bug: 73885582
Test: m checkbuild
Change-Id: I1c25f65afa196614879071c8655866febebac185
2018-03-15 16:40:05 -07:00
Jiyong Park
889773f7ab BUILD_DROIDDOC supports LOCAL_NO_STANDARD_LIBRARIES
When LOCAL_NO_STANDARD_LIBRARIES is set to true, droiddoc only omits
framework libraries from the required libs. This enables us to use
droiddoc even when frameworks/base is absent (i.e. master-art branch).

Test: m -j core.current.stubs
Test: build in master-art branch
Change-Id: Ia9f0b8bda84b006881b3e62e6573a7784ca56a8c
2018-02-14 21:16:15 +09:00
Sundong Ahn
7a02001fa9 Change the naming policy of system_$(VER)
The module name of system_$(VER) prebuilt file is system_sdk_v$(VER).
But this is inconsistent with sdk_v$(LOCAL_SDK_VERSION) in prebuilts/sdk.
So, system_sdk_v$(VER) is changed to sdk_vsystem_$(VER) to use the same
naming policy.

Bug: 72031391
Test: build
Change-Id: I379c0f9aa0de7407489eeec2b07ee7727e81d69d
2018-02-07 03:37:24 +00:00
Jiyong Park
5ebca30d21 Support LOCAL_SDK_VERSION := core_current
core_current is a pseudo SDK version which is a core Java API subset of
the Android API. It is expected to be mainly used for external Java
projects which are agnostic to Android; such as junit, guava, etc.

A module built with this SDK version can only link to java modules of
the same kind. It can't depend on modules built with LOCAL_SDK_VERSION
:= current or without LOCAL_SDK_VERSION.

Bug: 72206056
Test: m -j
Change-Id: I34a9696393aa6704fd6684a40ea5b05d3fb46b23
2018-02-01 17:14:55 +09:00
Colin Cross
eb1012b1d4 Add support for LOCAL_GENERATED_SOURCES to droiddoc
BUILD_DROIDDOC allows LOCAL_SRC_FILES to refer to sources in
$(LOCAL_PATH) and LOCAL_INTERMEDIATE_SOURCES to refer to sources
in $(TARGET_OUT_COMMON_INTERMEDIATES).  The droiddoc rules that
use files generated in Soong were trying to abuse LOCAL_SRC_FILES
to point to files in $(OUT_DIR)/soong using ../.. to counter
$(LOCAL_PATH), but failed if $(OUT_DIR) was absolute.  Add
LOCAL_GENERATED_SOURCES that can take a path relative to the
top of the source tree or an absolute path.

Bug: 70166718
Test: m OUT_DIR=/tmp/out docs
Change-Id: Iaf0d622a3405da0bf520f7312e11e75e9328062e
Merged-In: Iaf0d622a3405da0bf520f7312e11e75e9328062e
(cherry-picked from commit 4c44a94dab)
2017-12-05 01:07:23 +00:00
Sundong Ahn
3c113098f7 Fix build error
Fix the build error when TARGET_BUILD_APPS is set

Bug: 67724799
Test: m -j TARGET_PRODUCT=full TARGET_BUILD_APPS=TVTestInput

Merged-In: I981b0a245d7e8f2dabbd4e51db52d17aeacc6106
Change-Id: I981b0a245d7e8f2dabbd4e51db52d17aeacc6106
(cherry picked from commit 8e7a4c413f)
2017-12-01 00:40:56 +00:00
Sundong Ahn
5a44d1f069 Add LOCAL_SDK_VERSION := system_$(VER)
The system_$(VER) can be set in LOCAL_SDK_VERSION, and the apk will use
android_system.jar at build time.
If LOCAL_SDK_VERSION is not defined and this module is installed in
vendor.img, LOCAL_SDK_VERSION is set to system_current.

Bug: 67724799
Test: 1. build && run on taimen
2. LOCAL_SDK_VERSION:=system_27 in ims.apk && build ims.apk && check
the vsdk_v27_intermediates.

Merged-In: I5b11c78b8fcd4a2f2a5e3b141527cd34dbe80018
Change-Id: I5b11c78b8fcd4a2f2a5e3b141527cd34dbe80018
(cherry picked from commit ef212cbe8d)
2017-12-01 00:39:07 +00:00
Colin Cross
f1f66974c6 Merge changes from topics "soong_logtags", "droiddoc_srcjars"
* changes:
  Allow converting logtags to java without merged logtags file
  Add support for srcjars to droiddoc
2017-11-17 21:32:27 +00:00
Tobias Thierer
f6bd495728 Break EXPERIMENTAL_USE_OPENJDK9 into {USE,TARGET}_OPENJDK9.
This CL topic breaks the single flag value EXPERIMENTAL_USE_OPENJDK9
into two flags USE_OPENJDK9 and TARGET_OPENJDK9 which are computed
independently in config.mk and config.go; this means that later
build logic no longer depends on / duplicates the semantics of an
unset EXPERIMENTAL_USE_OPENJDK9, because that later build logic
can use USE_OPENJDK9 and TARGET_OPENJDK9 instead. Thus, it becomes
slightly easier to change this default in future CLs (touching
only config.mk and config.go).

It also makes it more straightforward to convert .mk files
to .bp.

This CL also introduces a new allowed value "false" for
EXPERIMENTAL_USE_OPENJDK9. This fourth possible value currently
has the same semantics as a default/unset
EXPERIMENTAL_USE_OPENJDK9, but allows people to explicitly
switch back to the old semantics when the default changes.

Test: make showcommands core-oj (in environments with
      EXPERIMENTAL_USE_OPENJDK9 set to "", "1.8", and "true").
Bug: 38177295

Change-Id: Iaade9610b237722e5d175143808b8653b1e98996
2017-11-17 13:14:11 +00:00
Colin Cross
e89df93231 Add support for srcjars to droiddoc
Soong generates the R.java for framework-res.apk to a srcjar.
Droiddoc will need to consume them, so add support to the droiddoc
rules for extracting sources from a srcjar.

Test: m checkbuild
Change-Id: I064889c9063b642835d9f668e2568b61d0fabe35
2017-11-16 14:58:05 -08:00
Nan Zhang
9bd540594d Use merge_zips to merge jars during Java build in Make.
1. Use merge_zips to merge jars without unzipping/rezipping static Java
libraries. And seperate merging process as a independent Make target so
that Javac can only depend on Turbine.

2. Remove duplicate vars: "full_java_lib_deps" in droiddoc.mk

3. Also use classes-header.jar for link_apk & link_instr

Bug: b/65455145
Test: m clean && m -j32

Change-Id: I7b0307664a6b86075c983284fce099bd3946318c
2017-09-19 18:49:33 -07:00
Tobias Thierer
cdcb785c3d Merge "droiddoc: Fix trailing ':' in -classpath, -sourcepath values"
am: 40594041f4

Change-Id: I5bd49c9a5e199f797781dbb14f3bd1bc2915c1ad
2017-07-21 09:48:36 +00:00
Tobias Thierer
40594041f4 Merge "droiddoc: Fix trailing ':' in -classpath, -sourcepath values" 2017-07-21 09:43:30 +00:00
Tobias Thierer
75ebdd6e7d droiddoc: Fix trailing ':' in -classpath, -sourcepath values
full_java_lib_deps has trailing whitespace if $(LOCAL_CLASSPATH)
is empty. Because the calculation of PRIVATE_CLASSPATH was
missing a $(strip ...), this resulted in an (unintentional)
trailing ':' in the values of the -classpath and -sourcepath
arguments to the javadoc tool, which that tool is documented
to interpret as '.' (the working directory).

This CL converts the expression to a call to normalize-path-list,
from definitions.mk, which contains the $(strip ...):

define normalize-path-list
$(subst $(space),:,$(strip $(1)))
endef

After this CL, an empty $(LOCAL_CLASSPATH) no longer gets
misinterpreted as the current working directory.

This issue was minor (it made no difference in practice).

Test: Treehugger
Bug: 62049770

Change-Id: Ia0e3e5657d0fa057fe998515f34bc7b8df5f6f16
2017-07-20 19:46:18 +01:00
Tobias Thierer
32b8d637dc Merge "Make 'make docs' work on OpenJDK 9 toolchain."
am: 8003d944a1

Change-Id: Ib15f74276865c690631e709d002920cc2a63494c
2017-07-19 09:55:30 +00:00
Tobias Thierer
0b05860556 Make 'make docs' work on OpenJDK 9 toolchain.
OpenJDK 9's javadoc tool doesn't support the -bootclasspath
command line option, even with -source 1.8.

Instead, under OpenJDK 9, javadoc needs to be passed a
--patch-module argument to tell it the location of the
classes patching packages from java.* modules.

The source files in libcore/{dalvik,libart,luni,ojluni} and
external/icu/android_icu4j that go into PRIVATE_BOOTCLASSPATH
patch packages from the modules java.base, java.desktop,
java.logging, java.prefs, java.sql, jdk.net, and
jdk.unsupported. However, this CL takes the simpler approach
of placing them all in java.base, which appears to work for
the purposes of the javadoc run.

Test: Ran the following both on OpenJDK 8 toolchain and on
      OpenJDK 9 (with EXPERIMENTAL_USE_OPENJDK9=true):
      rm -rf out/target/common/docs/ && make docs
Test: Compared (via meld) the contents of out/target/common/docs
      for the two toolchains (there were some differences, see bug).
Bug: 62049770

Change-Id: If3dd927477ca32dab7ffb528350de872e1017184
2017-07-18 16:03:35 +01:00
Colin Cross
e885ccf0df Merge "Provide make variables for java binaries"
am: 5e19557eb9

Change-Id: Ib1be7da98214e3b6c27867b80005e18cc68a0d33
2017-07-01 01:36:14 +00:00
Colin Cross
0851df8c82 Provide make variables for java binaries
Replace java -> $(JAVA), etc. to prepare for moving java binaries
out of the path and using full paths to them.

Test: builds
Bug: 62956999
Change-Id: I5dfcd0d4e855ecde69cd127169e9545e59723d12
2017-07-01 01:03:14 +00:00
Dan Willemsen
2bd2a9d630 Merge "Apply ALLOW_MISSING_DEPENDENCIES to droiddoc template dir" am: cb07cb1aa7
am: cf8ac2a820

Change-Id: Ieef27917a409ff8682cb2159341876480b099d4b
2017-06-13 15:29:55 +00:00
Dan Willemsen
6402873d49 Apply ALLOW_MISSING_DEPENDENCIES to droiddoc template dir
Some of our minimal branches don't have the necessary droiddoc
templates, so don't cause a FindEmulator warning when the template dir
is missing and ALLOW_MISSING_DEPENDENCIES is set. The warnings will soon
be errors.

When the template directory is missing, ensure that the command doesn't
succeed by adding the directory into the dependency list. Passing a
missing directory doesn't cause an error otherwise, it just wouldn't use
the template.

Test: build-aosp_arm64.ninja is identical before and after this change
Test: Move away build/tools/droiddoc/templates-sdk; m -j libcore-docs
Change-Id: I122f3916b6ab348a5a98dcf2520992eda3655e26
2017-06-12 19:31:50 -07:00
Tobias Thierer
5a64925af7 Merge "Drop build support for LEGACY_USE_JAVA7." am: 5368131063 am: 28be9906d4
am: 7d8194becd

Change-Id: I9c5d261b7c9c0f652c733ebc89c44d1295986cf8
2017-05-24 10:33:33 +00:00
Tobias Thierer
5368131063 Merge "Drop build support for LEGACY_USE_JAVA7." 2017-05-24 10:24:53 +00:00
Tobias Thierer
c61bd998b5 Drop build support for LEGACY_USE_JAVA7.
This flag allowed for building with an OpenJDK 7 toolchain. It was
used for build bot builds that now work with an OpenJDK 8 toolchain.
Hence, this feature is no longer required. This CL drops it.

Bug: 27583810
Test: Treehugger build succeeds.
Change-Id: I7efca363d665292bfb88f4a4d6f3a120fc8f93f3
2017-05-23 14:17:48 +01:00
Tobias Thierer
57fa914a79 Merge "Fix fragile assumptions about build toolchain. (attempt #2)" am: 48ee187e98 am: b9511c87b6
am: d7f60e4fbc

Change-Id: I7cff67ba4208293eacf7a9346c99b9f964ba270b
2017-05-23 12:26:25 +00:00
Tobias Thierer
0ed47f7fd1 Fix fragile assumptions about build toolchain. (attempt #2)
This CL resubmits a fixed version of commit
e2a8da2683.

This CL applies the following changes:

- explicitly set the path where desugar will dump temporary class files.
  This ensures that the system property is set before it is read during
  InnerClassLambdaMetafactory.<clinit>. Before this CL, the system
  property was set by Desugar.createAndRegisterLambdaDumpDirectory(),
  which may run too late.

- explicitly specify -source 1.8 for droiddoc's javadoc run.
  Previously, the command used the language version of the build
  toolchain, which might fail due the backward-incompatible restrictions
  imposed by the proposed module system.

  Some Android build targets use LOCAL_JAVA_LANGUAGE_VERSION 1.7,
  but droiddoc combines sources from multiple build targets and there
  where no backwards incompatible changes in 1.8, so it should be fine
  to use 1.8 for code from either language level.

Bug: 38318052
Bug: 38225656
Bug: 38177295
Test: make clean && make ANDROID_COMPILE_WITH_JACK=false checkbuild tests \
      && make checkbuild tests
      (using OpenJDK 8 toolchain)

Change-Id: I2fffe6668747f48be44e34c67332af9b8a996d2a
2017-05-22 23:03:24 +01:00
Tobias Thierer
1a48fbca55 Merge "Revert "build/make/core: Fix fragile assumptions about build toolchain."" am: a0203a6544 am: 64517075a5
am: aadebe100d

Change-Id: I97126a25f703974f3829cb1b41c1f710e80cbd4e
2017-05-18 14:41:23 +00:00
Tobias Thierer
4c764abf37 Revert "build/make/core: Fix fragile assumptions about build toolchain."
This reverts commit e2a8da2683.

Reason for revert: broke build. 

Change-Id: I951cc070adbbbd784aa4f8e171e543c35d0249de
2017-05-18 14:00:29 +00:00
Tobias Thierer
4c1d087d7e Merge "build/make/core: Fix fragile assumptions about build toolchain." am: b371c7756a am: 68587c24a9
am: bbe4662305

Change-Id: I1cdcfa09a9bab0a519ff695a9b6eb86afa5d71bc
2017-05-18 12:21:43 +00:00
Tobias Thierer
e2a8da2683 build/make/core: Fix fragile assumptions about build toolchain.
- explicitly set the path where desugar will dump temporary class files.
  This ensures that the system property is set before it is read during
  InnerClassLambdaMetafactory.<clinit>. Before this CL, the system
  property was set by Desugar.createAndRegisterLambdaDumpDirectory(),
  which may run too late.

- explicitly specify -source 1.8 for droiddoc's javadoc run.
  Previously, the command used the language version of the build
  toolchain, which might fail due the backward-incompatible restrictions
  imposed by the proposed module system.

  Some Android build targets use LOCAL_JAVA_LANGUAGE_VERSION 1.7,
  but droiddoc combines sources from multiple build targets and there
  where no backwards incompatible changes in 1.8, so it should be fine
  to use 1.8 for code from either language level.

Bug: 38318052
Bug: 38225656
Bug: 38177295
Test: make clean && make checkbuild docs
      (using OpenJDK 8 toolchain)

Change-Id: Ie5fe0502dfe2f99fc58b1a723b7c18d5896a2646
2017-05-17 22:53:38 +01:00
Jeff Sharkey
cada716b78 Have doclava emit meaningful stack traces.
This flag enables stack traces when invoking doclava, which were
otherwise being truncated to simply be the exception name, which was
useless for debugging things.

Test: make -j32 online-system-api-sdk-docs
Bug: 38164929
Change-Id: Ie281e2b2ed988bb6d587af33256fcdee1450fc79
2017-05-09 11:44:33 -06:00
Dan Willemsen
922ae6846b resolve merge conflicts of dd9aee1 to stage-aosp-master
Change-Id: I4278b9700c8729a06d38acc26e22ce7c340382f2
2016-07-29 14:15:14 -07:00
Dan Willemsen
3bf15e71d3 Record module type statistics
Creates a build_system_stats.txt build artifact that contains statistics
on how many BUILD_* modules are defined in a build. Also writes out
information about the Soong module types sent from the Soong build.

Merged-In: Iaf0c7062f542dc6942b5349854f3d49267cac4a5
Change-Id: Iaf0c7062f542dc6942b5349854f3d49267cac4a5
2016-07-29 19:58:35 +00:00
Dan Willemsen
1684b32620 Record module type statistics
Creates a build_system_stats.txt build artifact that contains statistics
on how many BUILD_* modules are defined in a build. Also writes out
information about the Soong module types sent from the Soong build.

Change-Id: Iaf0c7062f542dc6942b5349854f3d49267cac4a5
2016-07-28 16:47:58 -07:00
Dan Willemsen
9ffa38b193 Merge "Remove USE_NINJA=false" am: 3bfc095f53
am: d73633c082

* commit 'd73633c0824a63f7104bddf9a798bccc952b545c':
  Remove USE_NINJA=false
2016-02-29 22:19:29 +00:00
Dan Willemsen
1c6dc5b942 Remove USE_NINJA=false
And everything special-cased on that. Add a warning if USE_NINJA is
set to let users know that it no longer changes anything.

Change-Id: Ib8739151fe26ea6bf8f76b7ac2b8f4097dab0b47
2016-02-26 21:48:31 -08:00
Neil Fuller
fcf7c81a7f Revert "Revert "Make OpenJDK 8 the default""
Reapply the JDK 8 switch in internal builds.

This reverts commit 85bddfdedf.
2016-01-25 17:35:57 +00:00
Neil Fuller
3ec8eeb90b Merge "Revert "Make OpenJDK 8 the default"" am: c0acea2571
am: a5e4ea2e44

* commit 'a5e4ea2e44e324101b412bac9f2fbb97bdc91670':
  Revert "Make OpenJDK 8 the default"
2016-01-25 17:17:04 +00:00
Neil Fuller
1f495b865e Revert "Revert "Make OpenJDK 8 the default""
Reapply the switch to JDK 8 on aosp/master.

This reverts commit 85bddfdedf.

Change-Id: If2e8733ba78b007d37914c0512cd6be1bd4c1e69
2016-01-25 17:12:41 +00:00
Neil Fuller
85bddfdedf Revert "Make OpenJDK 8 the default"
Temporary revert to help out Brillo folks.
It will be resubmitted tomorrow.

This reverts commit 4495f6afb8.

Change-Id: Id378c7d3a6e72e9be50f9404b19d5763568987a5
2016-01-25 17:04:14 +00:00
Neil Fuller
4495f6afb8 Make OpenJDK 8 the default
To return to OpenJDK 7:
export LEGACY_USE_JAVA7=true

And run envsetup.sh/lunch again.

Bug: 25786468
Change-Id: I8e00591a24d13e3b8b6baaafe0fdff6536c58770
2016-01-25 10:19:25 +00:00
Neil Fuller
3dfaceea79 Revert "Revert "Revert "Revert "Make OpenJDK 8 the default""""
This reverts commit ee89f219ea.

This reapplies commit
1bd16b67c4
for the third time.

Change-Id: I3be72f643f5ddce87dfc39d98f19e395525554d8
2016-01-15 16:35:54 +00:00
Neil Fuller
ee89f219ea Revert "Revert "Revert "Make OpenJDK 8 the default"""
This reverts commit c288d65762.

The launch control change that switched various builds
to JDK 8 was reverted so JDK 8 can't be mandatory without
breaking builds.

Change-Id: I5e3feb21488d3bb57c5718cfe105a931eeaa9587
2016-01-14 21:12:27 +00:00
Neil Fuller
c288d65762 Revert "Revert "Make OpenJDK 8 the default""
This reverts commit a87553f414.

Change-Id: Ibd7bf08f3adfdc3f50584b8a61b3f81f1bff53de
2016-01-12 15:11:32 +00:00
Neil Fuller
a87553f414 Revert "Make OpenJDK 8 the default"
Reverting until all continuous builds that cover branches downstream of master can be updated to use JDK 8.

This reverts commit 1bd16b67c4.

Change-Id: Icb0daa440a6286e07d3cfd9ff8b082b4154ebc21
2016-01-11 13:37:43 +00:00
Neil Fuller
1bd16b67c4 Make OpenJDK 8 the default
To return to OpenJDK 7:
export LEGACY_USE_JAVA7=true

And run envsetup.sh/lunch again.

Bug: 25786468
Change-Id: Iba08a9d3cf73bae7124e431dfe87c20ac219591e
2016-01-11 11:25:26 +00:00
Piotr Jastrzebski
052a00f64e Use core-oj alongside core-libart wherever required.
With some core classes moved to separate core-oj jar
we need to use the new jar.

(cherry picked from commit 89b94c827f)

Change-Id: I025c0adc70535bf23def3ab0ce28a1bfaef72514
2015-12-24 10:10:55 +00:00
Narayan Kamath
8abec039ff Set -Xdoclint:none
Mac builds use a javadoc tool that fails on more warnings than linux
builds.  Add -Xdoclint:none to all java 8 standard doclet javadoc
commands.

Don't add it to javadoc commands that use the com.google.doclava.Doclava
doclet, it doesn't understand -Xdoclint:none.

(cherry-picked from commit 8bf7b5d51a)

Change-Id: Ic5b8431ec2facb7989473b06ebe07246f6d2317f
2015-12-16 19:26:02 +00:00