)]}'
{
  "commit": "063ec003f98a1cb45ddbda607dd41563d204f85d",
  "tree": "007941d946ad6f7380b3596856d195fb2357cd9d",
  "parents": [
    "d30ac8a32a9ff28db781db20e6dbe08d0b04b394"
  ],
  "author": {
    "name": "Jihoon Kang",
    "email": "jihoonkang@google.com",
    "time": "Wed Jun 28 01:16:23 2023 +0000"
  },
  "committer": {
    "name": "Jihoon Kang",
    "email": "jihoonkang@google.com",
    "time": "Fri Oct 13 18:24:41 2023 +0000"
  },
  "message": "Add current api check as validation for from-text stub generation\n\nCurrently, there is no build action ensuring that the API text files are\nup to date, unless a user runs `m checkapi` or `m update-api`. This\nmeans that the user must run `m update-api` after making a change that\nmodifies api surface(s), so that the API text file reflects the local\nchange. This adds additional layer of action to developers, and it is\nnot guaranteed that the developer will always run `m update-api` after\nmaking an api surface-affecting changes.\n\nTo prevent such mistake, this change adds droidstub-level api check as\nvalidation for from-text stub generation. With this change, the build\nwill fail if the API text file is not up to date and the user must run\n`m update-api` when making api surface-affecting local changes.\n\nThe validation is done by adding all droidstubs modules associated with\nthe java_api_contributions passed to java_api_library via\n`api_contributions` as dependency and setting the current api timestamp\nfiles as the validations for the from-text stubs generating build rule.\n\nThe full api surface libraries will not run the validations to avoid\ncircular dependency. However, all java_sdk_library generated\njava_api_library modules will run validations, mapped to the droidstubs\nin the same api domaion.\n\nIf the user sets the environment variable `DISABLE_STUB_VALIDATION\u003dtrue`, validation\nactions are not run. Validation actions run by default.\n\nTest: m nothing --build-from-text-stub and run ninja query to verify `check_current_api.timestamp`s are listed as validation \\\n      DISABLE_STUB_VALIDATION\u003dtrue m nothing --build-from-text-stub and run ninja query to verify that validation actions are not added\nBug: 288624417\nChange-Id: I329e6438fe8f3ac30d8c6a971d57853ed6b0d150\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4380f4f5ca96fae0b065af4f543e26593a4056ff",
      "old_mode": 33188,
      "old_path": "java/core-libraries/Android.bp",
      "new_id": "8b7387a854d78378739fcac3c17f82c1088c503a",
      "new_mode": 33188,
      "new_path": "java/core-libraries/Android.bp"
    },
    {
      "type": "modify",
      "old_id": "5432ce7f5d218c52281b427c337ad99b155d27f6",
      "old_mode": 33188,
      "old_path": "java/droidstubs.go",
      "new_id": "8ab2f2acad950402a6e7c5bd671fe50f9f04e2f8",
      "new_mode": 33188,
      "new_path": "java/droidstubs.go"
    },
    {
      "type": "modify",
      "old_id": "e149b989311b37b311377c93da5e5edbc34582fc",
      "old_mode": 33188,
      "old_path": "java/droidstubs_test.go",
      "new_id": "f86e1aceff0fb9b09dda7e994390262aa9923306",
      "new_mode": 33188,
      "new_path": "java/droidstubs_test.go"
    },
    {
      "type": "modify",
      "old_id": "35fd7c2b880c71fef3617ba6412fc5df4a07c5f5",
      "old_mode": 33188,
      "old_path": "java/java.go",
      "new_id": "1cb79433ffcbbca5514bfe0fe075ee29ef171a09",
      "new_mode": 33188,
      "new_path": "java/java.go"
    },
    {
      "type": "modify",
      "old_id": "6b8b735f715811db918d357eefde5bde42a3340f",
      "old_mode": 33188,
      "old_path": "java/java_test.go",
      "new_id": "c4fc55bc4f6350ce19169a0d71246c8701ce2cc1",
      "new_mode": 33188,
      "new_path": "java/java_test.go"
    },
    {
      "type": "modify",
      "old_id": "78e31023fea2d10bcd150c6cfafb5084f3927de6",
      "old_mode": 33188,
      "old_path": "java/sdk_library.go",
      "new_id": "041aeb7865d3f8352bcbf39004589a4e780acdbc",
      "new_mode": 33188,
      "new_path": "java/sdk_library.go"
    }
  ]
}
