Skip to content
  1. Jan 09, 2024
  2. Jan 08, 2024
    • Jihoon Kang's avatar
    • Colin Cross's avatar
      Merge "Remove more bp2build" into main · 8460fab9
      Colin Cross authored
      8460fab9
    • Jihoon Kang's avatar
      Generate "exportable" stubs library in java_sdk_library · fa4a90d4
      Jihoon Kang authored
      Given that now the droidstubs module generates the "exportable" stubs,
      this change modifies java_sdk_library to generate the java_library
      modules that compiles the "exportable" stubs per api scope.
      The detailed naming scheme of the generated modules are available in the
      bug linked in the footer.
      
      Similar to the from-text java_api_library vs from-source java_library
      static lib selection for the "everything" stubs, the "exportable" stubs
      module can also toggle between the stubs java_api_library and the
      java_library module. However, given that the "exportable" stubs
      generation has not been implemented for from-text stubs, the module
      always default to depend on the from-source "exportable" stubs compiling
      java_library module.
      
      Test: go test ./java
      Bug: 315495926
      Change-Id: I5798312c1338c55625b2030da728b056385171a4
      fa4a90d4
    • Jihoon Kang's avatar
      Enable droidstubs to export "exportable" artifacts · 78f8914f
      Jihoon Kang authored
      This change adds support for the droidstubs module to export the
      "exportable" artifacts via OutputFiles(tag string) method, while
      supporting the current behavior of exporting "everything" artifacts via
      a tag. With the support, a rdep module can depend on the "exportable"
      (and "runtime" in the long run) artifacts by prepending the stubs type
      in the tag. For instance, given that the currently supported tag
      {.annotations.zip} exports the everything annotations.zip file,
      {.exportable.annotations.zip} tag will export the exportable
      annotations.zip file. For an unsupported combination (e.g. all runtime
      stubs related artifacts as of now), an error will be thrown.
      
      Test: m nothing --no-skip-soong-tests
      Bug: 315490657
      Change-Id: Idcefd9cdc02d323306fb8d7be2a2b34f67501f56
      78f8914f
    • Jihoon Kang's avatar
      Generate "exportable" stubs in droidstubs · 3c89f047
      Jihoon Kang authored
      This change generates rules for "exportable" stubs in the droidstubs
      module.
      
      Given that there are a lot of overlap between the currently existing
      "everything" stubs rule and the newly introducing "exportable" stubs
      rule, the currently existing metalava rule commands are modularized to
      be utilized in the "exportable" stubs rule commands.
      
      The currently existing build actions are modularized in the followings:
      - commonMetalavaStubCmd(...): metalava commands that are required for
        generation of both "everything", "exportable", and potentially
        "runtime" stubs
      - everythingOptionalCmd(...): metalava commands that are dependent on
        "everything" stubs and not dependent on flagged apis annotations, such
        as api lint, released api check
      
      Based on this modularization, the "everything" stubs are now generated
      in everythingStubCmd(...), which calls commonMetalavaStubCmd(...) and
      everythingOptionalCmd(...).
      Similarly, the "exportable" stubs are generated in
      optionalStubCmd(stubsType=Exportable, ...), which calls
      commonMetalavaStubCmd(...) and appends additional flags. Runtime stubs
      can be generated similarly in the future with
      optionalStubCmd(stubsType=Runtime, ...).
      
      "everything"-related artifacts will now  be created in
      `everything/` subdirectory, and "exportable"-related artifacts will be
      created in `exportable/` subdirectory. For example, the outdir of a
      droidstubs module "foo" would look like below:
      ```
      foo
        |-- everything
        | |-- foo_api.txt
        | |-- foo-stubs.srcjar
        |
        |-- exportable
          |-- foo_api.txt
          |-- foo-stubs.srcjar
      ```
      
      The module generates the build rules for the "exportable" stubs
      regardless of whether the module defines the `aconfig_declarations`
      property or not. All APIs marked with `@FlaggedApis` annotations are
      stripped out for the "exportable" stubs when the `aconfig_declarations`
      property is not defined. On the other hand, only the `@FlaggedApis` that
      are specified in the aconfig_declarations module and are enabled will be
      included (and all others are stripped) when the `aconfig_declarations`
      propety is defined.
      
      Test: go test ./java && BUILD_FROM_SOURCE_STUBS=true m
      Bug: 315490657
      Change-Id: I300273cd2a62fa978b046c0268e3a67c35e22b08
      3c89f047
    • Jihoon Kang's avatar
      Add aconfig_declarations property to droidstubs and java_sdk_library · 6592e87d
      Jihoon Kang authored
      In consideration of the incremental build performance, this change let
      droidstubs and java_sdk_library (which generates droidstubs per api
      scope) modules to specify `aconfig_declaration` modules where the
      dependent flags are defined in via the "aconfig_declarations" property,
      opposed to passing uniform "all_aconfig_declaration"-generated flag
      arguments to metalava.
      
      When "aconfig_declarations" property is defined for java_sdk_library
      modules, the property is passed to the generated droidstubs modules.
      
      When "aconfig_declarations" property is defined for droidstubs modules,
      the all aconfig_declaration modules listed in the property are listed as
      deps, all cache protobuf files are gathered and metalava-consumable
      flags are generated in "revert-annotations.txt".
      
      Although this change introduces scalable implementation to easily
      support generation of the "runtime" stubs corresponding flags, actual
      support of the runtime flags/stubs will be done in future changes. This
      change mostly focuses on the generation of the "exportable" flags.
      
      Utilization of the generated "exportable" flags will be done in future
      changes.
      
      Test: go test ./java
      Bug: 315485740
      Change-Id: I37becd1b9dd9069d7ac4abed130906df30b3fdf4
      6592e87d
  3. Jan 06, 2024
    • Treehugger Robot's avatar
      Merge changes from topics... · 208444ce
      Treehugger Robot authored
      Merge changes from topics "revert-2897484-revert-2897682-dont_limit_systemsdk-JCOOOXGAIF-BSJGJAJAWC", "revert-2897568-revert-2894701-limit_systemsdk-WNEMOTGMRS-ROJNXPXKUV" into main
      
      * changes:
        Revert^2 "Add BUILD_BROKEN_DONT_CHECK_SYSTEMSDK"
        Revert "Revert "Limit System SDK to 34 for Java modules in the v..."
      208444ce
  4. Jan 05, 2024
  5. Jan 04, 2024
  6. Jan 03, 2024
Loading