diff --git a/MODULE.bazel b/MODULE.bazel index 0970985..6bff8c3 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -10,6 +10,8 @@ bazel_dep(name = "rules_jvm_external", version = "5.3") bazel_dep(name = "rules_kotlin", version = "2.1.0") bazel_dep(name = "bazel_skylib", version = "1.7.1") bazel_dep(name = "platforms", version = "0.0.8") +bazel_dep(name = "bazel_worker_api", version = "0.0.4") +bazel_dep(name = "bazel_worker_java", version = "0.0.4") bazel_dep(name = "aspect_bazel_lib", version = "2.11.0", dev_dependency = True) bazel_dep(name = "buildifier_prebuilt", version = "8.0.0", dev_dependency = True) @@ -25,11 +27,9 @@ maven.install( "org.assertj:assertj-core:3.24.2", "junit:junit:4.13.2", # Worker Dependencies - # TODO(bencodes) Remove these and use the worker impl. that Bazel defines internally - "com.squareup.moshi:moshi:1.15.0", - "com.squareup.moshi:moshi-kotlin:1.15.0", - "com.squareup.okio:okio-jvm:3.6.0", - "io.reactivex.rxjava3:rxjava:3.1.8", + "com.google.protobuf:protobuf-java:4.29.0", + "com.google.protobuf:protobuf-java-util:4.29.0", + # Args Parsing "com.xenomachina:kotlin-argparser:2.0.7", # Lint Dependencies "com.android.tools.lint:lint:31.3.0-alpha09", diff --git a/maven_install.json b/maven_install.json index ba5508b..0c93e4a 100755 --- a/maven_install.json +++ b/maven_install.json @@ -1,544 +1,431 @@ { "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL", - "__INPUT_ARTIFACTS_HASH": 1227830809, - "__RESOLVED_ARTIFACTS_HASH": 440930341, + "__INPUT_ARTIFACTS_HASH": 1552138821, + "__RESOLVED_ARTIFACTS_HASH": 419430451, "artifacts": { "com.android.tools.analytics-library:protos": { "shasums": { - "jar": "21b97bf06380d775bb85e1102f39e717712fd127eb5513a3eca72530961f61d2", - "sources": "f90fe3d5abb3d059cbd41f555fc05b8c5782a5d4bd8b10a4b10336e313ab9f83" + "jar": "21b97bf06380d775bb85e1102f39e717712fd127eb5513a3eca72530961f61d2" }, "version": "31.3.0-alpha09" }, "com.android.tools.analytics-library:shared": { "shasums": { - "jar": "ae0989cd623920b402b6bd3907b7255c13df5ca8acd1446da521679a52b79701", - "sources": "2a9f6f3ed822de577d524267040be8ebe36e275fb492bdb9ac75e0f118e7b7b3" + "jar": "ae0989cd623920b402b6bd3907b7255c13df5ca8acd1446da521679a52b79701" }, "version": "31.3.0-alpha09" }, "com.android.tools.analytics-library:tracker": { "shasums": { - "jar": "ae5a6fde1ae13cabb92a4fe90286af9e0f01fd25f73c45ff2f458a5f8ea51565", - "sources": "710fef9b25a8da50cd931cc50f8da30a3b88a8eee3cf750d9a5ab06486c1e36b" + "jar": "ae5a6fde1ae13cabb92a4fe90286af9e0f01fd25f73c45ff2f458a5f8ea51565" }, "version": "31.3.0-alpha09" }, "com.android.tools.build:aapt2-proto": { "shasums": { - "jar": "a14400d0df3765e0d6f2f136f851fd08f18a6e2b0ceb1f32522df8371d2c1305", - "sources": "0a74655a1d176bff2e2255f4ac16152ca330f2b1b56f8a716fcc6920e3d2131e" + "jar": "a14400d0df3765e0d6f2f136f851fd08f18a6e2b0ceb1f32522df8371d2c1305" }, "version": "8.3.0-alpha09-10880808" }, "com.android.tools.build:builder-model": { "shasums": { - "jar": "2a957e5d9891273aee1b5602fb656840ea504bb317ed2003b12547402be8edd9", - "sources": "da23e569ac4334d52177a80f760a012bba9cd6b8f0f1d272b5a574f0684595b0" + "jar": "2a957e5d9891273aee1b5602fb656840ea504bb317ed2003b12547402be8edd9" }, "version": "8.3.0-alpha09" }, "com.android.tools.build:manifest-merger": { "shasums": { - "jar": "8df73f4690a6bf1b324f1f5a68146cbd9558225fecbb43a5588acfbab3a66a0f", - "sources": "9d7b1045aee2f033de4705e557f80ab54fe480dc284d77203a49172f29b43f19" + "jar": "8df73f4690a6bf1b324f1f5a68146cbd9558225fecbb43a5588acfbab3a66a0f" }, "version": "31.3.0-alpha09" }, "com.android.tools.ddms:ddmlib": { "shasums": { - "jar": "ef0f1ea9bbf453537f3b781fa2b3c40e235797758ce8d8e2363565ef276a4e99", - "sources": "e49590c9a76693a6443d35e1ad903991e29c2b56c1648efd224a99c7b88622d1" + "jar": "ef0f1ea9bbf453537f3b781fa2b3c40e235797758ce8d8e2363565ef276a4e99" }, "version": "31.3.0-alpha09" }, "com.android.tools.external.com-intellij:intellij-core": { "shasums": { - "jar": "159e8275113bb9432e6ca937f3798fbaf071e790295a909d7c4ebd6b90f4e692", - "sources": "89544507cc209decfcd4df70006ac6a8ca96973876badf82f28ae5d847e92fa8" + "jar": "159e8275113bb9432e6ca937f3798fbaf071e790295a909d7c4ebd6b90f4e692" }, "version": "31.3.0-alpha09" }, "com.android.tools.external.com-intellij:kotlin-compiler": { "shasums": { - "jar": "a36d1397296679ecb909369802eb99bbde47f4ccb3b087601ca4d7c032edd794", - "sources": "aa36e70c26cc1599d15667c44b9c09e962204727e46117facc2ca21fe4dea72c" + "jar": "a36d1397296679ecb909369802eb99bbde47f4ccb3b087601ca4d7c032edd794" }, "version": "31.3.0-alpha09" }, "com.android.tools.external.org-jetbrains:uast": { "shasums": { - "jar": "9ad499cb766d5568cc30e7a8ce19c58b559d6db234a4ecb46e9743b61a5a63ea", - "sources": "4ac9ca3143b6c6f4a91ec96b11e3cad86f49ffad433259d9afccaf9ac574336b" + "jar": "9ad499cb766d5568cc30e7a8ce19c58b559d6db234a4ecb46e9743b61a5a63ea" }, "version": "31.3.0-alpha09" }, "com.android.tools.layoutlib:layoutlib-api": { "shasums": { - "jar": "45d764875651cf57f08539b75e27b865aec54a8f65013a84f1b832015f925399", - "sources": "7d5780010af4e084fdc7f6b4f99bc991c66ba97ef7a1a6d79f777ab9b2151a19" + "jar": "45d764875651cf57f08539b75e27b865aec54a8f65013a84f1b832015f925399" }, "version": "31.3.0-alpha09" }, "com.android.tools.lint:lint": { "shasums": { - "jar": "b45ed67fb0167c0042d27340b8dd2aae35eafc75a263e2c9d6fb320ef0d6fb89", - "sources": "99d1bd21580a84d165889a66ac3d4d1e41bd41c8f88c65933eb8fde31d86e5dd" + "jar": "b45ed67fb0167c0042d27340b8dd2aae35eafc75a263e2c9d6fb320ef0d6fb89" }, "version": "31.3.0-alpha09" }, "com.android.tools.lint:lint-api": { "shasums": { - "jar": "e4656df660b43f99377f335138697e5a1ddc92fa44575393d22941bbf333d794", - "sources": "07cfa4533875c2b25de13ea337bf01b7eb48e2f420d2662a69a8793d632f942a" + "jar": "e4656df660b43f99377f335138697e5a1ddc92fa44575393d22941bbf333d794" }, "version": "31.3.0-alpha09" }, "com.android.tools.lint:lint-checks": { "shasums": { - "jar": "455a5b70b448df6379ab7fddcea003282a98d086f0488803ba14e75a98ac9cd4", - "sources": "491728e796a27f330bac6a09dfac96abee6d6ef5cd71ef47e1cd49a00f077137" + "jar": "455a5b70b448df6379ab7fddcea003282a98d086f0488803ba14e75a98ac9cd4" }, "version": "31.3.0-alpha09" }, "com.android.tools.lint:lint-model": { "shasums": { - "jar": "c00977aa6f9393a7777ce69792c42df490abd74916dadce971c5f19b9108b430", - "sources": "6452518da2c7f36b609386b5391bd969e154564648f8efd5eb57a59375c67fa2" + "jar": "c00977aa6f9393a7777ce69792c42df490abd74916dadce971c5f19b9108b430" }, "version": "31.3.0-alpha09" }, "com.android.tools:annotations": { "shasums": { - "jar": "ee3bfd9cdb5012bdb61520f8654a785577e9bb337e5939c5c6149a446684ee16", - "sources": "05b37dacc5d19df2caf9f9e72f752834bb0079325ade38f7a991acce49205000" + "jar": "ee3bfd9cdb5012bdb61520f8654a785577e9bb337e5939c5c6149a446684ee16" }, "version": "31.3.0-alpha09" }, "com.android.tools:common": { "shasums": { - "jar": "36ec03dafbde315e6d5f044feb8dd6b69d457379ce5fad9a8fe410dbe8437d4c", - "sources": "2f94f971c109089b840322195e764ca09176d7e2214a5058d4b16e9bf76e0542" + "jar": "36ec03dafbde315e6d5f044feb8dd6b69d457379ce5fad9a8fe410dbe8437d4c" }, "version": "31.3.0-alpha09" }, "com.android.tools:dvlib": { "shasums": { - "jar": "0cb57c126ed95657ae1e0974af092b401a52b76d5683f7ccbe1f8f21af06794e", - "sources": "a606cd9c24ebd26aa5243bbcc1b6d8d8ec0877b84c1e635bf4a584f715104219" + "jar": "0cb57c126ed95657ae1e0974af092b401a52b76d5683f7ccbe1f8f21af06794e" }, "version": "31.3.0-alpha09" }, "com.android.tools:play-sdk-proto": { "shasums": { - "jar": "27b6310f28e46a4bb11b8809c5ddf0221795b5e6461c12bdf3efa945d62830a6", - "sources": "72d3f1b9a96de879a52f606f6fe1a42611c069fb4b39a5dc24c355eae736837d" + "jar": "27b6310f28e46a4bb11b8809c5ddf0221795b5e6461c12bdf3efa945d62830a6" }, "version": "31.3.0-alpha09" }, "com.android.tools:repository": { "shasums": { - "jar": "0f1778a98a79fb6f3a8fa5116b7f16092960bf49509802656c1117c75cc7875c", - "sources": "6feb347d2d7e994bac2cef46408ad4a83b5e2a4651763a8b2050e12bcbe32af8" + "jar": "0f1778a98a79fb6f3a8fa5116b7f16092960bf49509802656c1117c75cc7875c" }, "version": "31.3.0-alpha09" }, "com.android.tools:sdk-common": { "shasums": { - "jar": "0c19a1422fbd38d2ac8fe3de34ab542b7790d8f4331d7432d4e15b39ada680b7", - "sources": "b8e77596a64597e65aad0387acf5051b762315970b937b67be511cb6c4e99ddc" + "jar": "0c19a1422fbd38d2ac8fe3de34ab542b7790d8f4331d7432d4e15b39ada680b7" }, "version": "31.3.0-alpha09" }, "com.android.tools:sdklib": { "shasums": { - "jar": "86f727068b1ad988cbc87d1cbff921740de6832073995326ca723d219697cc59", - "sources": "f7176fb20ecaa6aab55d69c4564ef7b97d73c3a06d77517a7b23db3a8f345bc0" + "jar": "86f727068b1ad988cbc87d1cbff921740de6832073995326ca723d219697cc59" }, "version": "31.3.0-alpha09" }, "com.google.code.findbugs:jsr305": { "shasums": { - "jar": "766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7", - "sources": "1c9e85e272d0708c6a591dc74828c71603053b48cc75ae83cce56912a2aa063b" + "jar": "766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7" }, "version": "3.0.2" }, "com.google.code.gson:gson": { "shasums": { - "jar": "0cdd163ce3598a20fc04eee71b140b24f6f2a3b35f0a499dbbdd9852e83fbfaf", - "sources": "984c3636c3911185469a2df991da1bb325de391b9215088ce6c26476bdd61f99" + "jar": "4241c14a7727c34feea6507ec801318a3d4a90f070e4525681079fb94ee4c593" }, - "version": "2.10" + "version": "2.10.1" }, "com.google.errorprone:error_prone_annotations": { "shasums": { - "jar": "721cb91842b46fa056847d104d5225c8b8e1e8b62263b993051e1e5a0137b7ec", - "sources": "31a8f1bd791fb22c606af95049062a3c8252ce4b1b17555d00dc609e6371101d" + "jar": "9e6814cb71816988a4fd1b07a993a8f21bb7058d522c162b1de849e19bea54ae" }, - "version": "2.11.0" + "version": "2.18.0" }, "com.google.guava:failureaccess": { "shasums": { - "jar": "a171ee4c734dd2da837e4b16be9df4661afab72a41adaf31eb84dfdaf936ca26", - "sources": "092346eebbb1657b51aa7485a246bf602bb464cc0b0e2e1c7e7201fadce1e98f" + "jar": "a171ee4c734dd2da837e4b16be9df4661afab72a41adaf31eb84dfdaf936ca26" }, "version": "1.0.1" }, "com.google.guava:guava": { "shasums": { - "jar": "a42edc9cab792e39fe39bb94f3fca655ed157ff87a8af78e1d6ba5b07c4a00ab", - "sources": "8ab1853cdaf936ec88be80c17302b7c20abafbd4f54d4fb54d7011c529e3a44a" + "jar": "12429ff9ac33b7afd8b1a5071179757cf4d3c47f0f4099bc0384e644ecbf82dd" }, - "version": "31.1-jre" + "version": "32.0.1-android" }, "com.google.guava:listenablefuture": { "shasums": { - "jar": "b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99", - "sources": null + "jar": "b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99" }, "version": "9999.0-empty-to-avoid-conflict-with-guava" }, "com.google.j2objc:j2objc-annotations": { "shasums": { - "jar": "21af30c92267bd6122c0e0b4d20cccb6641a37eaf956c6540ec471d584e64a7b", - "sources": "ba4df669fec153fa4cd0ef8d02c6d3ef0702b7ac4cabe080facf3b6e490bb972" + "jar": "f02a95fa1a5e95edb3ed859fd0fb7df709d121a35290eff8b74dce2ab7f4d6ed" }, - "version": "1.3" + "version": "2.8" }, "com.google.jimfs:jimfs": { "shasums": { - "jar": "c4828e28d7c0a930af9387510b3bada7daa5c04d7c25a75c7b8b081f1c257ddd", - "sources": "adebb53450d2313d6927db5155c9be85336109e8f8c0af106ec2a30bc37e64ce" + "jar": "c4828e28d7c0a930af9387510b3bada7daa5c04d7c25a75c7b8b081f1c257ddd" }, "version": "1.1" }, "com.google.protobuf:protobuf-java": { "shasums": { - "jar": "6a9a2dff91dcf71f85be71ae971f6164b5a631dcd34bff08f0618535ca44ad02", - "sources": "98118edf28c74f173b25d8fce03f86ff95d61009df0c66324333573ec842f5d3" - }, - "version": "3.19.6" - }, - "com.squareup.moshi:moshi": { - "shasums": { - "jar": "350d48c34df4a8ef4f1475aa65ef0e54c4d8302a71efc9f6c09d0e98fd4c63c6", - "sources": "d658332c2b2b57f94d6c26bb747e5dbb65a2d5b47cc3e0a15036977fe832996e" + "jar": "16901851ebe5e89fe88aaad3c26866373695bc2e30627bb8932847e2f5fc2e76" }, - "version": "1.15.0" + "version": "4.29.0" }, - "com.squareup.moshi:moshi-kotlin": { + "com.google.protobuf:protobuf-java-util": { "shasums": { - "jar": "874029dcba5a558a57c86cbe91a6f9ea59dfbc2a17ee4bc41e2e5b9a106f0a5f", - "sources": "5b40a79012daa9b3bb0c8f9c61483aa4b01dbec8d7841db66e90e7fead9eb6af" + "jar": "1413fa2e13eecd323462884e13114ef655571c853cb4aac6a3e50a0d887c596e" }, - "version": "1.15.0" - }, - "com.squareup.okio:okio": { - "shasums": { - "jar": "a27f091d34aa452e37227e2cfa85809f29012a8ef2501a9b5a125a978e4fcbc1", - "sources": "4f255d11829d7e1949be042efa70f933650a7d929e68d594c1608f97884a0535" - }, - "version": "2.10.0" - }, - "com.squareup.okio:okio-jvm": { - "shasums": { - "jar": "67543f0736fc422ae927ed0e504b98bc5e269fda0d3500579337cb713da28412", - "sources": "870a42a7b468af8fd24d67b7b62e5861aab398c56f15a80b10642e7001564e2f" - }, - "version": "3.6.0" + "version": "4.29.0" }, "com.sun.activation:javax.activation": { "shasums": { - "jar": "993302b16cd7056f21e779cc577d175a810bb4900ef73cd8fbf2b50f928ba9ce", - "sources": "7e5aed0cc354684f1c96a1d24513c95f0971541b9ed03bf90a782ba189571022" + "jar": "993302b16cd7056f21e779cc577d175a810bb4900ef73cd8fbf2b50f928ba9ce" }, "version": "1.2.0" }, "com.sun.istack:istack-commons-runtime": { "shasums": { - "jar": "4ffabb06be454a05e4398e20c77fa2b6308d4b88dfbef7ca30a76b5b7d5505ef", - "sources": "4874ce5789c8684debd0099c8fa4ec8e00545626af4c9890760f0cb6fdf6d4db" + "jar": "4ffabb06be454a05e4398e20c77fa2b6308d4b88dfbef7ca30a76b5b7d5505ef" }, "version": "3.0.8" }, "com.sun.xml.fastinfoset:FastInfoset": { "shasums": { - "jar": "056f3a1e144409f21ed16afc26805f58e9a21f3fce1543c42d400719d250c511", - "sources": "b648209797a327140d6fa4ecf78a276f613ec92c5d9ccd6e7a51ff71976b84b0" + "jar": "056f3a1e144409f21ed16afc26805f58e9a21f3fce1543c42d400719d250c511" }, "version": "1.2.16" }, "com.xenomachina:kotlin-argparser": { "shasums": { - "jar": "ff0312ea7c14fe5ece8c4e617fa855a408f936fb453c3c5be3d7d57e7a143753", - "sources": "0e5d7f58074c34bda16725405f60a00b3cf4ad80af967cef1230e5e98db325c1" + "jar": "ff0312ea7c14fe5ece8c4e617fa855a408f936fb453c3c5be3d7d57e7a143753" }, "version": "2.0.7" }, "com.xenomachina:xenocom": { "shasums": { - "jar": "c6242652b9e82d7ce4e811c3cf7602582fb8e8dc9193b3cb7f3475e020aa68d1", - "sources": "fc10113c701cc9c2bbd80c6cb7e156aa8ae9273bd3de07665b2e45958935eebc" + "jar": "c6242652b9e82d7ce4e811c3cf7602582fb8e8dc9193b3cb7f3475e020aa68d1" }, "version": "0.0.7" }, "commons-codec:commons-codec": { "shasums": { - "jar": "4241dfa94e711d435f29a4604a3e2de5c4aa3c165e23bd066be6fc1fc4309569", - "sources": "dfae68268ce86f1a18fc45b99317c13d6c9d252f001d37961e79a51076808986" + "jar": "4241dfa94e711d435f29a4604a3e2de5c4aa3c165e23bd066be6fc1fc4309569" }, "version": "1.10" }, "commons-io:commons-io": { "shasums": { - "jar": "671eaa39688dac2ffaa4645b3c9980ae2d0ea2471e4ae6a5da199cd15ae23666", - "sources": "1c7bece2e87ac49b24f09ec3c5ceb51560edd7a259889fceef96dda9c046a1b3" + "jar": "671eaa39688dac2ffaa4645b3c9980ae2d0ea2471e4ae6a5da199cd15ae23666" }, "version": "2.13.0" }, "commons-logging:commons-logging": { "shasums": { - "jar": "daddea1ea0be0f56978ab3006b8ac92834afeefbd9b7e4e6316fca57df0fa636", - "sources": "44347acfe5860461728e9cb33251e97345be36f8a0dfd5c5130c172559455f41" + "jar": "daddea1ea0be0f56978ab3006b8ac92834afeefbd9b7e4e6316fca57df0fa636" }, "version": "1.2" }, - "io.reactivex.rxjava3:rxjava": { - "shasums": { - "jar": "6890becbd4646347928746a4421cc559fca9f34d06ef2a7a947bd7adf7473246", - "sources": "288b3dc26dccc5ac6c3e221872ffe2f9b94179cdd85aac519b10e5b151586757" - }, - "version": "3.1.8" - }, "jakarta.activation:jakarta.activation-api": { "shasums": { - "jar": "8b0a0f52fa8b05c5431921a063ed866efaa41dadf2e3a7ee3e1961f2b0d9645b", - "sources": "e9638b764202c0def1b4d54bd37a984c681b2ed46a548ae94ef3f7e4a4b58a31" + "jar": "8b0a0f52fa8b05c5431921a063ed866efaa41dadf2e3a7ee3e1961f2b0d9645b" }, "version": "1.2.1" }, "jakarta.xml.bind:jakarta.xml.bind-api": { "shasums": { - "jar": "69156304079bdeed9fc0ae3b39389f19b3cc4ba4443bc80508995394ead742ea", - "sources": "61ceb3ed35ecf99f1803eac9c4b8f12103c7531952beae38ba53cc727f405532" + "jar": "69156304079bdeed9fc0ae3b39389f19b3cc4ba4443bc80508995394ead742ea" }, "version": "2.3.2" }, "javax.inject:javax.inject": { "shasums": { - "jar": "91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff", - "sources": "c4b87ee2911c139c3daf498a781967f1eb2e75bc1a8529a2e7b328a15d0e433e" + "jar": "91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff" }, "version": "1" }, "junit:junit": { "shasums": { - "jar": "8e495b634469d64fb8acfa3495a065cbacc8a0fff55ce1e31007be4c16dc57d3", - "sources": "34181df6482d40ea4c046b063cb53c7ffae94bdf1b1d62695bdf3adf9dea7e3a" + "jar": "8e495b634469d64fb8acfa3495a065cbacc8a0fff55ce1e31007be4c16dc57d3" }, "version": "4.13.2" }, "net.bytebuddy:byte-buddy": { "shasums": { - "jar": "f6f45c2237a7f132c16745ad2a52c4cdde58028b11ee80b09f0d422f4930d685", - "sources": "433d43715127afc437dd5278d2249a39c22b93908a83f9174503f4ac27f25d87" + "jar": "f6f45c2237a7f132c16745ad2a52c4cdde58028b11ee80b09f0d422f4930d685" }, "version": "1.12.21" }, "net.java.dev.jna:jna": { "shasums": { - "jar": "5557e235a8aa2f9766d5dc609d67948f2a8832c2d796cea9ef1d6cbe0b3b7eaf", - "sources": "3bb0536c6bfe8931afa898a5022af628f936b09a8437552429a2f9977d254c46" + "jar": "5557e235a8aa2f9766d5dc609d67948f2a8832c2d796cea9ef1d6cbe0b3b7eaf" }, "version": "5.6.0" }, "net.java.dev.jna:jna-platform": { "shasums": { - "jar": "9ecea8bf2b1b39963939d18b70464eef60c508fed8820f9dcaba0c35518eabf7", - "sources": "ec090292829f0974710c1890634a58b55d3285feecad8ac6121515a7e27891fe" + "jar": "9ecea8bf2b1b39963939d18b70464eef60c508fed8820f9dcaba0c35518eabf7" }, "version": "5.6.0" }, "net.sf.kxml:kxml2": { "shasums": { - "jar": "f264dd9f79a1fde10ce5ecc53221eff24be4c9331c830b7d52f2f08a7b633de2", - "sources": "85495366666158b58961e8911ced0f6f3bc92f1ebee865518b493fdb90760250" + "jar": "f264dd9f79a1fde10ce5ecc53221eff24be4c9331c830b7d52f2f08a7b633de2" }, "version": "2.3.0" }, "org.apache.commons:commons-compress": { "shasums": { - "jar": "6aecfd5459728a595601cfa07258d131972ffc39b492eb48bdd596577a2f244a", - "sources": "f64973e7c00455e819bcf8b74dda6e91b3e09557135b11b3603c2ba7a0e5479b" + "jar": "6aecfd5459728a595601cfa07258d131972ffc39b492eb48bdd596577a2f244a" }, "version": "1.21" }, "org.apache.httpcomponents:httpclient": { "shasums": { - "jar": "c03f813195e7a80e3608d0ddd8da80b21696a4c92a6a2298865bf149071551c7", - "sources": "6a8076d9a98a5be9f1a055011166f9055b0aee2de133699db3ccf20377533e58" + "jar": "c03f813195e7a80e3608d0ddd8da80b21696a4c92a6a2298865bf149071551c7" }, "version": "4.5.6" }, "org.apache.httpcomponents:httpcore": { "shasums": { - "jar": "6c9b3dd142a09dc468e23ad39aad6f75a0f2b85125104469f026e52a474e464f", - "sources": "705f8cf3671093b6c1db16bbf6971a7ef400e3819784f1af53e5bc3e67b5a9a0" + "jar": "6c9b3dd142a09dc468e23ad39aad6f75a0f2b85125104469f026e52a474e464f" }, "version": "4.4.16" }, "org.apache.httpcomponents:httpmime": { "shasums": { - "jar": "0b2b1102c18d3c7e05a77214b9b7501a6f6056174ae5604e0e256776eda7553e", - "sources": "3054d6f3160cdc1a4a60cf2a199f5acd2f3b209aa3e82e2f69e7028741847622" + "jar": "0b2b1102c18d3c7e05a77214b9b7501a6f6056174ae5604e0e256776eda7553e" }, "version": "4.5.6" }, "org.assertj:assertj-core": { "shasums": { - "jar": "df3d0b348f1fe806bdddcb10fa4ae63c6679e9888d4bc7055f09848517976aa3", - "sources": "67cbf29f82539b16e985a073937b19373443af000983986d05a5962ff9108fa7" + "jar": "df3d0b348f1fe806bdddcb10fa4ae63c6679e9888d4bc7055f09848517976aa3" }, "version": "3.24.2" }, "org.bouncycastle:bcpkix-jdk15on": { "shasums": { - "jar": "efbca754880ce3922ca47a43c1f0b72c45731450a0ef193b9db33bf4bb38ce5f", - "sources": "927a8f1900d834ead8b5fc7394763c6fea101b4358810f700458d54b10254c69" + "jar": "efbca754880ce3922ca47a43c1f0b72c45731450a0ef193b9db33bf4bb38ce5f" }, "version": "1.67" }, "org.bouncycastle:bcprov-jdk15on": { "shasums": { - "jar": "fa0041a36f9f20af3c6b8dbf6eb49a969e2c9cc029049d61acc526ba3247b3ef", - "sources": "8426860edbb2cacc187764206e070a94ab805c8f1a991034962d1ae8e203d0f5" + "jar": "fa0041a36f9f20af3c6b8dbf6eb49a969e2c9cc029049d61acc526ba3247b3ef" }, "version": "1.67" }, "org.checkerframework:checker-qual": { "shasums": { - "jar": "ff10785ac2a357ec5de9c293cb982a2cbb605c0309ea4cc1cb9b9bc6dbe7f3cb", - "sources": "fd99a45195ed893803624d1030387056a96601013f5e61ccabd79abb4ddfa876" + "jar": "e316255bbfcd9fe50d165314b85abb2b33cb2a66a93c491db648e498a82c2de1" }, - "version": "3.12.0" + "version": "3.33.0" }, "org.glassfish.jaxb:jaxb-runtime": { "shasums": { - "jar": "e6e0a1e89fb6ff786279e6a0082d5cef52dc2ebe67053d041800737652b4fd1b", - "sources": "b85c2e314e6565e7dc4fb7e00ec8688c1c0fe9c9f7275125fb8dee43898f3743" + "jar": "e6e0a1e89fb6ff786279e6a0082d5cef52dc2ebe67053d041800737652b4fd1b" }, "version": "2.3.2" }, "org.glassfish.jaxb:txw2": { "shasums": { - "jar": "4a6a9f483388d461b81aa9a28c685b8b74c0597993bf1884b04eddbca95f48fe", - "sources": "a5ae8ac7886df60992e4039c75b7095cf04d1bea3a81f77f72e2c652f8f57a56" + "jar": "4a6a9f483388d461b81aa9a28c685b8b74c0597993bf1884b04eddbca95f48fe" }, "version": "2.3.2" }, "org.hamcrest:hamcrest-core": { "shasums": { - "jar": "66fdef91e9739348df7a096aa384a5685f4e875584cce89386a7a47251c4d8e9", - "sources": "e223d2d8fbafd66057a8848cc94222d63c3cedd652cc48eddc0ab5c39c0f84df" + "jar": "66fdef91e9739348df7a096aa384a5685f4e875584cce89386a7a47251c4d8e9" }, "version": "1.3" }, "org.jetbrains.intellij.deps:trove4j": { "shasums": { - "jar": "c5fd725bffab51846bf3c77db1383c60aaaebfe1b7fe2f00d23fe1b7df0a439d", - "sources": "2e0174e80b989eb5deafcfb77407c908a0abe1f67a80306f98aeca63246e5481" + "jar": "c5fd725bffab51846bf3c77db1383c60aaaebfe1b7fe2f00d23fe1b7df0a439d" }, "version": "1.0.20200330" }, "org.jetbrains.kotlin:kotlin-reflect": { "shasums": { - "jar": "333269a37bb3c26e6016ec86fbccb55005cb7365157ef5cf3faa7ebe2bea2510", - "sources": "a97bb6693d786467019487fe16dbcb12535bfc24c973420e1fa57c0b5017059b" + "jar": "333269a37bb3c26e6016ec86fbccb55005cb7365157ef5cf3faa7ebe2bea2510" }, "version": "1.9.20-RC" }, "org.jetbrains.kotlin:kotlin-stdlib": { "shasums": { - "jar": "36403fd76b3e923ddc739238dbbbbc864293ab440b2266e48d94bb189aad5247", - "sources": "81be2691baf65bd17e48f10944a0ef92c2ae7a196949e4cadb70f8dbea56151d" + "jar": "36403fd76b3e923ddc739238dbbbbc864293ab440b2266e48d94bb189aad5247" }, "version": "1.9.20-RC" }, - "org.jetbrains.kotlin:kotlin-stdlib-common": { - "shasums": { - "jar": "cde3341ba18a2ba262b0b7cf6c55b20c90e8d434e42c9a13e6a3f770db965a88", - "sources": "63f2b6dfd58e3e1c82a4b37a2e1743996ca182bf44dc2aadd264b8fb95fddcd3" - }, - "version": "1.9.10" - }, "org.jetbrains.kotlin:kotlin-stdlib-jdk7": { "shasums": { - "jar": "10faed74893d4119e9549c0c47a1931f551d3415dd95095e6a99455a3173d013", - "sources": "2534c8908432e06de73177509903d405b55f423dd4c2f747e16b92a2162611e6" + "jar": "10faed74893d4119e9549c0c47a1931f551d3415dd95095e6a99455a3173d013" }, "version": "1.9.20-RC" }, "org.jetbrains.kotlin:kotlin-stdlib-jdk8": { "shasums": { - "jar": "33da138558a064fb369a2f5888944f04b210422548c11d85966257e2a2510916", - "sources": "3cb6895054a0985bba591c165503fe4dd63a215af53263b67a071ccdc242bf6e" + "jar": "33da138558a064fb369a2f5888944f04b210422548c11d85966257e2a2510916" }, "version": "1.9.20-RC" }, "org.jetbrains:annotations": { "shasums": { - "jar": "ace2a10dc8e2d5fd34925ecac03e4988b2c0f851650c94b8cef49ba1bd111478", - "sources": "42a5e144b8e81d50d6913d1007b695e62e614705268d8cf9f13dbdc478c2c68e" + "jar": "ace2a10dc8e2d5fd34925ecac03e4988b2c0f851650c94b8cef49ba1bd111478" }, "version": "13.0" }, "org.jvnet.staxex:stax-ex": { "shasums": { - "jar": "20522549056e9e50aa35ef0b445a2e47a53d06be0b0a9467d704e2483ffb049a", - "sources": "1333d591414aa494425e49fae1f3cb8aec6b58148956353ef1d0b53fac49129c" + "jar": "20522549056e9e50aa35ef0b445a2e47a53d06be0b0a9467d704e2483ffb049a" }, "version": "1.8.1" }, "org.ow2.asm:asm": { "shasums": { - "jar": "1263369b59e29c943918de11d6d6152e2ec6085ce63e5710516f8c67d368e4bc", - "sources": "5ceb3d0b41a8eb8b416f28778b27c0e290143b6dc29d887b1cf40e2c0727f096" + "jar": "1263369b59e29c943918de11d6d6152e2ec6085ce63e5710516f8c67d368e4bc" }, "version": "9.3" }, "org.ow2.asm:asm-analysis": { "shasums": { - "jar": "37fd5392bb2cf4c15f202ffefd46d0e92bb34ff848c549f30d426a60d6b29495", - "sources": "e293ebc94d7c5c3604b11de1a3d92166edeed801500a921ae16e500faae491fd" + "jar": "37fd5392bb2cf4c15f202ffefd46d0e92bb34ff848c549f30d426a60d6b29495" }, "version": "9.3" }, "org.ow2.asm:asm-tree": { "shasums": { - "jar": "ae629c2609f39681ef8d140a42a23800464a94f2d23e36d8f25cd10d5e4caff4", - "sources": "cee7d78eb5190f052d6214e1fff4b3c36cca23ef0a21837fa2316c75f90da021" + "jar": "ae629c2609f39681ef8d140a42a23800464a94f2d23e36d8f25cd10d5e4caff4" }, "version": "9.3" }, - "org.reactivestreams:reactive-streams": { - "shasums": { - "jar": "f75ca597789b3dac58f61857b9ac2e1034a68fa672db35055a8fb4509e325f28", - "sources": "5a7a36ae9536698c434ebe119feb374d721210fee68eb821a37ef3859b64b708" - }, - "version": "1.0.4" - }, "xerces:xercesImpl": { "shasums": { - "jar": "6fc991829af1708d15aea50c66f0beadcd2cfeb6968e0b2f55c1b0909883fe16", - "sources": "3c531edfc074e3e0885e5d4a777a9e7317e108028be50ef6e893a5a9cf3e12c2" + "jar": "6fc991829af1708d15aea50c66f0beadcd2cfeb6968e0b2f55c1b0909883fe16" }, "version": "2.12.2" }, "xml-apis:xml-apis": { "shasums": { - "jar": "a840968176645684bb01aed376e067ab39614885f9eee44abe35a5f20ebe7fad", - "sources": "5db8b94589e334283e01075458cfae920995e37ab997cb3b475fd0667b3158b2" + "jar": "a840968176645684bb01aed376e067ab39614885f9eee44abe35a5f20ebe7fad" }, "version": "1.4.01" } @@ -720,22 +607,13 @@ "com.google.jimfs:jimfs": [ "com.google.guava:guava" ], - "com.squareup.moshi:moshi": [ - "com.squareup.okio:okio", - "org.jetbrains.kotlin:kotlin-stdlib-jdk8" - ], - "com.squareup.moshi:moshi-kotlin": [ - "com.squareup.moshi:moshi", - "org.jetbrains.kotlin:kotlin-reflect", - "org.jetbrains.kotlin:kotlin-stdlib-jdk8" - ], - "com.squareup.okio:okio": [ - "org.jetbrains.kotlin:kotlin-stdlib", - "org.jetbrains.kotlin:kotlin-stdlib-common" - ], - "com.squareup.okio:okio-jvm": [ - "org.jetbrains.kotlin:kotlin-stdlib-common", - "org.jetbrains.kotlin:kotlin-stdlib-jdk8" + "com.google.protobuf:protobuf-java-util": [ + "com.google.code.findbugs:jsr305", + "com.google.code.gson:gson", + "com.google.errorprone:error_prone_annotations", + "com.google.guava:guava", + "com.google.j2objc:j2objc-annotations", + "com.google.protobuf:protobuf-java" ], "com.sun.istack:istack-commons-runtime": [ "jakarta.activation:jakarta.activation-api" @@ -747,9 +625,6 @@ "com.xenomachina:xenocom": [ "org.jetbrains.kotlin:kotlin-stdlib" ], - "io.reactivex.rxjava3:rxjava": [ - "org.reactivestreams:reactive-streams" - ], "jakarta.xml.bind:jakarta.xml.bind-api": [ "jakarta.activation:jakarta.activation-api" ], @@ -808,9 +683,6 @@ "xml-apis:xml-apis" ] }, - "skipped": [ - "com.google.guava:listenablefuture:jar:sources" - ], "packages": { "com.android.tools.analytics-library:protos": [ "com.android.tools.build.gradle.internal.profile", @@ -1465,9 +1337,6 @@ "org.jetbrains.xxh3", "org.picocontainer" ], - "com.android.tools.external.com-intellij:intellij-core:jar:sources": [ - "io.opentelemetry.sdk.internal" - ], "com.android.tools.external.com-intellij:kotlin-compiler": [ "", "com.google.gwt.dev.js", @@ -2411,21 +2280,8 @@ "com.google.protobuf", "com.google.protobuf.compiler" ], - "com.squareup.moshi:moshi": [ - "com.squareup.moshi", - "com.squareup.moshi.internal" - ], - "com.squareup.moshi:moshi-kotlin": [ - "com.squareup.moshi", - "com.squareup.moshi.kotlin.reflect" - ], - "com.squareup.okio:okio": [ - "okio", - "okio.internal" - ], - "com.squareup.okio:okio-jvm": [ - "okio", - "okio.internal" + "com.google.protobuf:protobuf-java-util": [ + "com.google.protobuf.util" ], "com.sun.activation:javax.activation": [ "com.sun.activation.registries", @@ -2492,40 +2348,6 @@ "org.apache.commons.logging", "org.apache.commons.logging.impl" ], - "io.reactivex.rxjava3:rxjava": [ - "io.reactivex.rxjava3.annotations", - "io.reactivex.rxjava3.core", - "io.reactivex.rxjava3.disposables", - "io.reactivex.rxjava3.exceptions", - "io.reactivex.rxjava3.flowables", - "io.reactivex.rxjava3.functions", - "io.reactivex.rxjava3.internal.disposables", - "io.reactivex.rxjava3.internal.functions", - "io.reactivex.rxjava3.internal.fuseable", - "io.reactivex.rxjava3.internal.jdk8", - "io.reactivex.rxjava3.internal.observers", - "io.reactivex.rxjava3.internal.operators.completable", - "io.reactivex.rxjava3.internal.operators.flowable", - "io.reactivex.rxjava3.internal.operators.maybe", - "io.reactivex.rxjava3.internal.operators.mixed", - "io.reactivex.rxjava3.internal.operators.observable", - "io.reactivex.rxjava3.internal.operators.parallel", - "io.reactivex.rxjava3.internal.operators.single", - "io.reactivex.rxjava3.internal.queue", - "io.reactivex.rxjava3.internal.schedulers", - "io.reactivex.rxjava3.internal.subscribers", - "io.reactivex.rxjava3.internal.subscriptions", - "io.reactivex.rxjava3.internal.util", - "io.reactivex.rxjava3.observables", - "io.reactivex.rxjava3.observers", - "io.reactivex.rxjava3.operators", - "io.reactivex.rxjava3.parallel", - "io.reactivex.rxjava3.plugins", - "io.reactivex.rxjava3.processors", - "io.reactivex.rxjava3.schedulers", - "io.reactivex.rxjava3.subjects", - "io.reactivex.rxjava3.subscribers" - ], "jakarta.activation:jakarta.activation-api": [ "javax.activation" ], @@ -2614,9 +2436,6 @@ "net.bytebuddy.utility.privilege", "net.bytebuddy.utility.visitor" ], - "net.bytebuddy:byte-buddy:jar:sources": [ - "net.bytebuddy.build" - ], "net.java.dev.jna:jna": [ "com.sun.jna", "com.sun.jna.internal", @@ -2983,6 +2802,7 @@ "org.checkerframework.checker.initialization.qual", "org.checkerframework.checker.interning.qual", "org.checkerframework.checker.lock.qual", + "org.checkerframework.checker.mustcall.qual", "org.checkerframework.checker.nullness.qual", "org.checkerframework.checker.optional.qual", "org.checkerframework.checker.propkey.qual", @@ -3170,9 +2990,6 @@ "org.ow2.asm:asm-tree": [ "org.objectweb.asm.tree" ], - "org.reactivestreams:reactive-streams": [ - "org.reactivestreams" - ], "xerces:xercesImpl": [ "org.apache.html.dom", "org.apache.wml", @@ -3250,314 +3067,299 @@ "repositories": { "https://maven.google.com/": [ "com.android.tools.analytics-library:protos", - "com.android.tools.analytics-library:protos:jar:sources", "com.android.tools.analytics-library:shared", - "com.android.tools.analytics-library:shared:jar:sources", "com.android.tools.analytics-library:tracker", - "com.android.tools.analytics-library:tracker:jar:sources", "com.android.tools.build:aapt2-proto", - "com.android.tools.build:aapt2-proto:jar:sources", "com.android.tools.build:builder-model", - "com.android.tools.build:builder-model:jar:sources", "com.android.tools.build:manifest-merger", - "com.android.tools.build:manifest-merger:jar:sources", "com.android.tools.ddms:ddmlib", - "com.android.tools.ddms:ddmlib:jar:sources", "com.android.tools.external.com-intellij:intellij-core", - "com.android.tools.external.com-intellij:intellij-core:jar:sources", "com.android.tools.external.com-intellij:kotlin-compiler", - "com.android.tools.external.com-intellij:kotlin-compiler:jar:sources", "com.android.tools.external.org-jetbrains:uast", - "com.android.tools.external.org-jetbrains:uast:jar:sources", "com.android.tools.layoutlib:layoutlib-api", - "com.android.tools.layoutlib:layoutlib-api:jar:sources", "com.android.tools.lint:lint", "com.android.tools.lint:lint-api", - "com.android.tools.lint:lint-api:jar:sources", "com.android.tools.lint:lint-checks", - "com.android.tools.lint:lint-checks:jar:sources", "com.android.tools.lint:lint-model", - "com.android.tools.lint:lint-model:jar:sources", - "com.android.tools.lint:lint:jar:sources", "com.android.tools:annotations", - "com.android.tools:annotations:jar:sources", "com.android.tools:common", - "com.android.tools:common:jar:sources", "com.android.tools:dvlib", - "com.android.tools:dvlib:jar:sources", "com.android.tools:play-sdk-proto", - "com.android.tools:play-sdk-proto:jar:sources", "com.android.tools:repository", - "com.android.tools:repository:jar:sources", "com.android.tools:sdk-common", - "com.android.tools:sdk-common:jar:sources", "com.android.tools:sdklib", - "com.android.tools:sdklib:jar:sources", "com.google.code.findbugs:jsr305", - "com.google.code.findbugs:jsr305:jar:sources", "com.google.code.gson:gson", - "com.google.code.gson:gson:jar:sources", "com.google.errorprone:error_prone_annotations", - "com.google.errorprone:error_prone_annotations:jar:sources", "com.google.guava:failureaccess", - "com.google.guava:failureaccess:jar:sources", "com.google.guava:guava", - "com.google.guava:guava:jar:sources", "com.google.guava:listenablefuture", "com.google.j2objc:j2objc-annotations", - "com.google.j2objc:j2objc-annotations:jar:sources", "com.google.jimfs:jimfs", - "com.google.jimfs:jimfs:jar:sources", "com.google.protobuf:protobuf-java", - "com.google.protobuf:protobuf-java:jar:sources", - "com.squareup.moshi:moshi", - "com.squareup.moshi:moshi-kotlin", - "com.squareup.moshi:moshi-kotlin:jar:sources", - "com.squareup.moshi:moshi:jar:sources", - "com.squareup.okio:okio", - "com.squareup.okio:okio-jvm", - "com.squareup.okio:okio-jvm:jar:sources", - "com.squareup.okio:okio:jar:sources", + "com.google.protobuf:protobuf-java-util", "com.sun.activation:javax.activation", - "com.sun.activation:javax.activation:jar:sources", "com.sun.istack:istack-commons-runtime", - "com.sun.istack:istack-commons-runtime:jar:sources", "com.sun.xml.fastinfoset:FastInfoset", - "com.sun.xml.fastinfoset:FastInfoset:jar:sources", "com.xenomachina:kotlin-argparser", - "com.xenomachina:kotlin-argparser:jar:sources", "com.xenomachina:xenocom", - "com.xenomachina:xenocom:jar:sources", "commons-codec:commons-codec", - "commons-codec:commons-codec:jar:sources", "commons-io:commons-io", - "commons-io:commons-io:jar:sources", "commons-logging:commons-logging", - "commons-logging:commons-logging:jar:sources", - "io.reactivex.rxjava3:rxjava", - "io.reactivex.rxjava3:rxjava:jar:sources", "jakarta.activation:jakarta.activation-api", - "jakarta.activation:jakarta.activation-api:jar:sources", "jakarta.xml.bind:jakarta.xml.bind-api", - "jakarta.xml.bind:jakarta.xml.bind-api:jar:sources", "javax.inject:javax.inject", - "javax.inject:javax.inject:jar:sources", "junit:junit", - "junit:junit:jar:sources", "net.bytebuddy:byte-buddy", - "net.bytebuddy:byte-buddy:jar:sources", "net.java.dev.jna:jna", "net.java.dev.jna:jna-platform", - "net.java.dev.jna:jna-platform:jar:sources", - "net.java.dev.jna:jna:jar:sources", "net.sf.kxml:kxml2", - "net.sf.kxml:kxml2:jar:sources", "org.apache.commons:commons-compress", - "org.apache.commons:commons-compress:jar:sources", "org.apache.httpcomponents:httpclient", - "org.apache.httpcomponents:httpclient:jar:sources", "org.apache.httpcomponents:httpcore", - "org.apache.httpcomponents:httpcore:jar:sources", "org.apache.httpcomponents:httpmime", - "org.apache.httpcomponents:httpmime:jar:sources", "org.assertj:assertj-core", - "org.assertj:assertj-core:jar:sources", "org.bouncycastle:bcpkix-jdk15on", - "org.bouncycastle:bcpkix-jdk15on:jar:sources", "org.bouncycastle:bcprov-jdk15on", - "org.bouncycastle:bcprov-jdk15on:jar:sources", "org.checkerframework:checker-qual", - "org.checkerframework:checker-qual:jar:sources", "org.glassfish.jaxb:jaxb-runtime", - "org.glassfish.jaxb:jaxb-runtime:jar:sources", "org.glassfish.jaxb:txw2", - "org.glassfish.jaxb:txw2:jar:sources", "org.hamcrest:hamcrest-core", - "org.hamcrest:hamcrest-core:jar:sources", "org.jetbrains.intellij.deps:trove4j", - "org.jetbrains.intellij.deps:trove4j:jar:sources", "org.jetbrains.kotlin:kotlin-reflect", - "org.jetbrains.kotlin:kotlin-reflect:jar:sources", "org.jetbrains.kotlin:kotlin-stdlib", - "org.jetbrains.kotlin:kotlin-stdlib-common", - "org.jetbrains.kotlin:kotlin-stdlib-common:jar:sources", "org.jetbrains.kotlin:kotlin-stdlib-jdk7", - "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:sources", "org.jetbrains.kotlin:kotlin-stdlib-jdk8", - "org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:sources", - "org.jetbrains.kotlin:kotlin-stdlib:jar:sources", "org.jetbrains:annotations", - "org.jetbrains:annotations:jar:sources", "org.jvnet.staxex:stax-ex", - "org.jvnet.staxex:stax-ex:jar:sources", "org.ow2.asm:asm", "org.ow2.asm:asm-analysis", - "org.ow2.asm:asm-analysis:jar:sources", "org.ow2.asm:asm-tree", - "org.ow2.asm:asm-tree:jar:sources", - "org.ow2.asm:asm:jar:sources", - "org.reactivestreams:reactive-streams", - "org.reactivestreams:reactive-streams:jar:sources", "xerces:xercesImpl", - "xerces:xercesImpl:jar:sources", - "xml-apis:xml-apis", - "xml-apis:xml-apis:jar:sources" + "xml-apis:xml-apis" ], "https://repo1.maven.org/maven2/": [ "com.android.tools.analytics-library:protos", - "com.android.tools.analytics-library:protos:jar:sources", "com.android.tools.analytics-library:shared", - "com.android.tools.analytics-library:shared:jar:sources", "com.android.tools.analytics-library:tracker", - "com.android.tools.analytics-library:tracker:jar:sources", "com.android.tools.build:aapt2-proto", - "com.android.tools.build:aapt2-proto:jar:sources", "com.android.tools.build:builder-model", - "com.android.tools.build:builder-model:jar:sources", "com.android.tools.build:manifest-merger", - "com.android.tools.build:manifest-merger:jar:sources", "com.android.tools.ddms:ddmlib", - "com.android.tools.ddms:ddmlib:jar:sources", "com.android.tools.external.com-intellij:intellij-core", - "com.android.tools.external.com-intellij:intellij-core:jar:sources", "com.android.tools.external.com-intellij:kotlin-compiler", - "com.android.tools.external.com-intellij:kotlin-compiler:jar:sources", "com.android.tools.external.org-jetbrains:uast", - "com.android.tools.external.org-jetbrains:uast:jar:sources", "com.android.tools.layoutlib:layoutlib-api", - "com.android.tools.layoutlib:layoutlib-api:jar:sources", "com.android.tools.lint:lint", "com.android.tools.lint:lint-api", - "com.android.tools.lint:lint-api:jar:sources", "com.android.tools.lint:lint-checks", - "com.android.tools.lint:lint-checks:jar:sources", "com.android.tools.lint:lint-model", - "com.android.tools.lint:lint-model:jar:sources", - "com.android.tools.lint:lint:jar:sources", "com.android.tools:annotations", - "com.android.tools:annotations:jar:sources", "com.android.tools:common", - "com.android.tools:common:jar:sources", "com.android.tools:dvlib", - "com.android.tools:dvlib:jar:sources", "com.android.tools:play-sdk-proto", - "com.android.tools:play-sdk-proto:jar:sources", "com.android.tools:repository", - "com.android.tools:repository:jar:sources", "com.android.tools:sdk-common", - "com.android.tools:sdk-common:jar:sources", "com.android.tools:sdklib", - "com.android.tools:sdklib:jar:sources", "com.google.code.findbugs:jsr305", - "com.google.code.findbugs:jsr305:jar:sources", "com.google.code.gson:gson", - "com.google.code.gson:gson:jar:sources", "com.google.errorprone:error_prone_annotations", - "com.google.errorprone:error_prone_annotations:jar:sources", "com.google.guava:failureaccess", - "com.google.guava:failureaccess:jar:sources", "com.google.guava:guava", - "com.google.guava:guava:jar:sources", "com.google.guava:listenablefuture", "com.google.j2objc:j2objc-annotations", - "com.google.j2objc:j2objc-annotations:jar:sources", "com.google.jimfs:jimfs", - "com.google.jimfs:jimfs:jar:sources", "com.google.protobuf:protobuf-java", - "com.google.protobuf:protobuf-java:jar:sources", - "com.squareup.moshi:moshi", - "com.squareup.moshi:moshi-kotlin", - "com.squareup.moshi:moshi-kotlin:jar:sources", - "com.squareup.moshi:moshi:jar:sources", - "com.squareup.okio:okio", - "com.squareup.okio:okio-jvm", - "com.squareup.okio:okio-jvm:jar:sources", - "com.squareup.okio:okio:jar:sources", + "com.google.protobuf:protobuf-java-util", "com.sun.activation:javax.activation", - "com.sun.activation:javax.activation:jar:sources", "com.sun.istack:istack-commons-runtime", - "com.sun.istack:istack-commons-runtime:jar:sources", "com.sun.xml.fastinfoset:FastInfoset", - "com.sun.xml.fastinfoset:FastInfoset:jar:sources", "com.xenomachina:kotlin-argparser", - "com.xenomachina:kotlin-argparser:jar:sources", "com.xenomachina:xenocom", - "com.xenomachina:xenocom:jar:sources", "commons-codec:commons-codec", - "commons-codec:commons-codec:jar:sources", "commons-io:commons-io", - "commons-io:commons-io:jar:sources", "commons-logging:commons-logging", - "commons-logging:commons-logging:jar:sources", - "io.reactivex.rxjava3:rxjava", - "io.reactivex.rxjava3:rxjava:jar:sources", "jakarta.activation:jakarta.activation-api", - "jakarta.activation:jakarta.activation-api:jar:sources", "jakarta.xml.bind:jakarta.xml.bind-api", - "jakarta.xml.bind:jakarta.xml.bind-api:jar:sources", "javax.inject:javax.inject", - "javax.inject:javax.inject:jar:sources", "junit:junit", - "junit:junit:jar:sources", "net.bytebuddy:byte-buddy", - "net.bytebuddy:byte-buddy:jar:sources", "net.java.dev.jna:jna", "net.java.dev.jna:jna-platform", - "net.java.dev.jna:jna-platform:jar:sources", - "net.java.dev.jna:jna:jar:sources", "net.sf.kxml:kxml2", - "net.sf.kxml:kxml2:jar:sources", "org.apache.commons:commons-compress", - "org.apache.commons:commons-compress:jar:sources", "org.apache.httpcomponents:httpclient", - "org.apache.httpcomponents:httpclient:jar:sources", "org.apache.httpcomponents:httpcore", - "org.apache.httpcomponents:httpcore:jar:sources", "org.apache.httpcomponents:httpmime", - "org.apache.httpcomponents:httpmime:jar:sources", "org.assertj:assertj-core", - "org.assertj:assertj-core:jar:sources", "org.bouncycastle:bcpkix-jdk15on", - "org.bouncycastle:bcpkix-jdk15on:jar:sources", "org.bouncycastle:bcprov-jdk15on", - "org.bouncycastle:bcprov-jdk15on:jar:sources", "org.checkerframework:checker-qual", - "org.checkerframework:checker-qual:jar:sources", "org.glassfish.jaxb:jaxb-runtime", - "org.glassfish.jaxb:jaxb-runtime:jar:sources", "org.glassfish.jaxb:txw2", - "org.glassfish.jaxb:txw2:jar:sources", "org.hamcrest:hamcrest-core", - "org.hamcrest:hamcrest-core:jar:sources", "org.jetbrains.intellij.deps:trove4j", - "org.jetbrains.intellij.deps:trove4j:jar:sources", "org.jetbrains.kotlin:kotlin-reflect", - "org.jetbrains.kotlin:kotlin-reflect:jar:sources", "org.jetbrains.kotlin:kotlin-stdlib", - "org.jetbrains.kotlin:kotlin-stdlib-common", - "org.jetbrains.kotlin:kotlin-stdlib-common:jar:sources", "org.jetbrains.kotlin:kotlin-stdlib-jdk7", - "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:sources", "org.jetbrains.kotlin:kotlin-stdlib-jdk8", - "org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:sources", - "org.jetbrains.kotlin:kotlin-stdlib:jar:sources", "org.jetbrains:annotations", - "org.jetbrains:annotations:jar:sources", "org.jvnet.staxex:stax-ex", - "org.jvnet.staxex:stax-ex:jar:sources", "org.ow2.asm:asm", "org.ow2.asm:asm-analysis", - "org.ow2.asm:asm-analysis:jar:sources", "org.ow2.asm:asm-tree", - "org.ow2.asm:asm-tree:jar:sources", - "org.ow2.asm:asm:jar:sources", - "org.reactivestreams:reactive-streams", - "org.reactivestreams:reactive-streams:jar:sources", "xerces:xercesImpl", - "xerces:xercesImpl:jar:sources", - "xml-apis:xml-apis", - "xml-apis:xml-apis:jar:sources" + "xml-apis:xml-apis" ] }, + "services": { + "com.android.tools.external.com-intellij:intellij-core": { + "com.intellij.platform.jps.model.resolver.JpsDependencyResolverConfigurationService": [ + "com.intellij.platform.jps.model.impl.resolver.JpsDependencyResolverConfigurationServiceImpl" + ], + "javax.xml.stream.XMLEventFactory": [ + "com.fasterxml.aalto.stax.EventFactoryImpl" + ], + "javax.xml.stream.XMLInputFactory": [ + "com.fasterxml.aalto.stax.InputFactoryImpl" + ], + "javax.xml.stream.XMLOutputFactory": [ + "com.fasterxml.aalto.stax.OutputFactoryImpl" + ], + "org.jetbrains.jps.model.JpsElementFactory": [ + "org.jetbrains.jps.model.impl.JpsElementFactoryImpl" + ], + "org.jetbrains.jps.model.JpsEncodingConfigurationService": [ + "org.jetbrains.jps.model.impl.JpsEncodingConfigurationServiceImpl" + ], + "org.jetbrains.jps.model.artifact.JpsArtifactService": [ + "org.jetbrains.jps.model.artifact.impl.JpsArtifactServiceImpl" + ], + "org.jetbrains.jps.model.artifact.elements.JpsPackagingElementFactory": [ + "org.jetbrains.jps.model.artifact.impl.elements.JpsPackagingElementFactoryImpl" + ], + "org.jetbrains.jps.model.ex.JpsExElementFactory": [ + "org.jetbrains.jps.model.impl.JpsExElementFactoryImpl" + ], + "org.jetbrains.jps.model.fileTypes.FileNameMatcherFactory": [ + "org.jetbrains.jps.model.fileTypes.impl.FileNameMatcherFactoryImpl" + ], + "org.jetbrains.jps.model.jarRepository.JpsRemoteRepositoryService": [ + "org.jetbrains.jps.model.jarRepository.impl.JpsRemoteRepositoryServiceImpl" + ], + "org.jetbrains.jps.model.java.JdkVersionDetector": [ + "org.jetbrains.jps.model.java.impl.JdkVersionDetectorImpl" + ], + "org.jetbrains.jps.model.java.JpsJavaExtensionService": [ + "org.jetbrains.jps.model.java.impl.JpsJavaExtensionServiceImpl" + ], + "org.jetbrains.jps.model.serialization.JpsModelSerializerExtension": [ + "com.intellij.platform.jps.model.serialization.resolver.JpsDependencyResolverConfigurationSerializerExtension", + "org.jetbrains.jps.model.serialization.JpsEncodingModelSerializerExtension", + "org.jetbrains.jps.model.serialization.jarRepository.JpsRemoteRepositoriesModelSerializerExtension", + "org.jetbrains.jps.model.serialization.java.JpsJavaModelSerializerExtension" + ], + "org.jetbrains.jps.model.serialization.JpsSerializationManager": [ + "org.jetbrains.jps.model.serialization.impl.JpsSerializationManagerImpl" + ], + "org.jetbrains.jps.service.JpsServiceManager": [ + "org.jetbrains.jps.service.impl.JpsServiceManagerImpl" + ], + "org.jetbrains.jps.service.SharedThreadPool": [ + "org.jetbrains.jps.service.impl.SharedThreadPoolImpl" + ], + "reactor.blockhound.integration.BlockHoundIntegration": [ + "kotlinx.coroutines.debug.CoroutinesBlockHoundIntegration" + ] + }, + "com.android.tools.external.com-intellij:kotlin-compiler": { + "javax.annotation.processing.Processor": [ + "javaslang.match.PatternsProcessor" + ], + "org.jetbrains.kotlin.builtins.BuiltInsLoader": [ + "org.jetbrains.kotlin.serialization.deserialization.builtins.BuiltInsLoaderImpl" + ], + "org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor": [ + "org.jetbrains.kotlin.scripting.compiler.plugin.ScriptingCommandLineProcessor" + ], + "org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar": [ + "org.jetbrains.kotlin.scripting.compiler.plugin.ScriptingK2CompilerPluginRegistrar" + ], + "org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar": [ + "org.jetbrains.kotlin.scripting.compiler.plugin.ScriptingCompilerConfigurationComponentRegistrar" + ], + "org.jetbrains.kotlin.resolve.ExternalOverridabilityCondition": [ + "org.jetbrains.kotlin.load.java.ErasedOverridabilityCondition", + "org.jetbrains.kotlin.load.java.FieldOverridabilityCondition", + "org.jetbrains.kotlin.load.java.JavaIncompatibilityRulesOverridabilityCondition" + ], + "org.jetbrains.kotlin.resolve.jvm.jvmSignature.KotlinToJvmSignatureMapper": [ + "org.jetbrains.kotlin.codegen.signature.KotlinToJvmSignatureMapperImpl" + ], + "org.jetbrains.kotlin.util.ModuleVisibilityHelper": [ + "org.jetbrains.kotlin.cli.common.ModuleVisibilityHelperImpl" + ], + "org.jline.terminal.spi.JansiSupport": [ + "org.jline.terminal.impl.jansi.JansiSupportImpl" + ], + "org.jline.terminal.spi.JnaSupport": [ + "org.jline.terminal.impl.jna.JnaSupportImpl" + ] + }, + "com.google.jimfs:jimfs": { + "java.nio.file.spi.FileSystemProvider": [ + "com.google.common.jimfs.SystemJimfsFileSystemProvider" + ] + }, + "net.sf.kxml:kxml2": { + "org.xmlpull.v1.XmlPullParserFactory": [ + "org.kxml2.io.KXmlParser,org.kxml2.io.KXmlSerializer" + ] + }, + "org.bouncycastle:bcprov-jdk15on": { + "java.security.Provider": [ + "org.bouncycastle.jce.provider.BouncyCastleProvider", + "org.bouncycastle.pqc.jcajce.provider.BouncyCastlePQCProvider" + ] + }, + "org.glassfish.jaxb:jaxb-runtime": { + "javax.xml.bind.JAXBContext": [ + "com.sun.xml.bind.v2.ContextFactory" + ] + }, + "org.jetbrains.kotlin:kotlin-reflect": { + "kotlin.reflect.jvm.internal.impl.builtins.BuiltInsLoader": [ + "kotlin.reflect.jvm.internal.impl.serialization.deserialization.builtins.BuiltInsLoaderImpl" + ], + "kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition": [ + "kotlin.reflect.jvm.internal.impl.load.java.ErasedOverridabilityCondition", + "kotlin.reflect.jvm.internal.impl.load.java.FieldOverridabilityCondition", + "kotlin.reflect.jvm.internal.impl.load.java.JavaIncompatibilityRulesOverridabilityCondition" + ] + }, + "xerces:xercesImpl": { + "javax.xml.datatype.DatatypeFactory": [ + "org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl" + ], + "javax.xml.parsers.DocumentBuilderFactory": [ + "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl" + ], + "javax.xml.parsers.SAXParserFactory": [ + "org.apache.xerces.jaxp.SAXParserFactoryImpl" + ], + "javax.xml.stream.XMLEventFactory": [ + "org.apache.xerces.stax.XMLEventFactoryImpl" + ], + "javax.xml.validation.SchemaFactory": [ + "org.apache.xerces.jaxp.validation.XMLSchemaFactory" + ], + "org.w3c.dom.DOMImplementationSourceList": [ + "org.apache.xerces.dom.DOMXSImplementationSourceImpl" + ], + "org.xml.sax.driver": [ + "org.apache.xerces.parsers.SAXParser" + ] + } + }, "version": "2" } diff --git a/rules/impl.bzl b/rules/impl.bzl index d4011f5..80dbdbf 100644 --- a/rules/impl.bzl +++ b/rules/impl.bzl @@ -143,7 +143,6 @@ def _run_android_lint( execution_requirements = { "supports-workers": "1", "supports-multiplex-workers": "1", - "requires-worker-protocol": "json", }, env = { # https://googlesamples.github.io/android-custom-lint-rules/usage/variables.md.html diff --git a/src/worker/BUILD b/src/worker/BUILD index 340bb2d..350f515 100644 --- a/src/worker/BUILD +++ b/src/worker/BUILD @@ -7,11 +7,9 @@ kt_jvm_library( srcs = glob(["*.kt"]), visibility = ["//visibility:public"], deps = [ - "@rules_android_lint_deps//:com_squareup_moshi_moshi", - "@rules_android_lint_deps//:com_squareup_moshi_moshi_kotlin", - "@rules_android_lint_deps//:com_squareup_okio_okio_jvm", - "@rules_android_lint_deps//:io_reactivex_rxjava3_rxjava", - "@rules_android_lint_deps//:org_reactivestreams_reactive_streams", + "@bazel_worker_java//:worker_protocol_java_proto", + "@bazel_worker_java//src/main/java/com/google/devtools/build/lib/worker:work_request_handlers", + "@rules_android_lint_deps//:com_google_protobuf_protobuf_java", ], ) diff --git a/src/worker/PersistentWorker.kt b/src/worker/PersistentWorker.kt index 9681426..daaed37 100644 --- a/src/worker/PersistentWorker.kt +++ b/src/worker/PersistentWorker.kt @@ -1,125 +1,37 @@ package com.rules.android.lint.worker -import io.reactivex.rxjava3.core.BackpressureStrategy -import io.reactivex.rxjava3.core.Flowable -import io.reactivex.rxjava3.core.Scheduler -import io.reactivex.rxjava3.schedulers.Schedulers -import java.io.BufferedOutputStream -import java.io.ByteArrayOutputStream +import com.google.devtools.build.lib.worker.ProtoWorkerMessageProcessor +import com.google.devtools.build.lib.worker.WorkRequestHandler import java.io.IOException import java.io.PrintStream +import java.time.Duration internal class PersistentWorker( - /** - * WorkerIO instance wrapping the standard output streams - */ - private val workerIO: WorkerIO, - /** - * Rxjava Scheduler to execute work requests on. - */ - private val scheduler: Scheduler, - /** - * Instance of CpuTimeBasedGcScheduler that will run periodically - */ - private val persistentWorkerCpuTimeBasedGcScheduler: PersistentWorkerCpuTimeBasedGcScheduler, - /** - * Instance of CpuTimeBasedGcScheduler that will run periodically - */ - private val workRequestProcessor: Worker.WorkerMessageProcessor, - /** - * Instance of CpuTimeBasedGcScheduler that will run periodically - */ private val workerWorkRequestCallback: Worker.WorkRequestCallback, ) : Worker { - constructor( - workerMessageProcessor: Worker.WorkRequestCallback, - ) : this( - workerIO = WorkerIO(), - scheduler = Schedulers.io(), - persistentWorkerCpuTimeBasedGcScheduler = PersistentWorkerCpuTimeBasedGcScheduler(), - workRequestProcessor = - WorkerJsonMessageProcessor( - System.`in`, - System.out, - ), - workerWorkRequestCallback = workerMessageProcessor, - ) - - /** - * Initiate the worker and begin processing work requests - */ override fun processRequests(): Int { - return workerIO.use { io -> - // Start by redirecting the system streams so that nothing - // corrupts the streams that the worker uses - io.redirectSystemStreams() + val realStdErr: PrintStream = System.err - // Process requests as they come in using RxJava - Flowable - .create( - { emitter -> - while (!emitter.isCancelled) { - try { - val request: WorkRequest = workRequestProcessor.readWorkRequest() - emitter.onNext(request) - } catch (e: IOException) { - emitter.onError(e) - } - } - }, - BackpressureStrategy.BUFFER, - ).subscribeOn(scheduler) - .parallel() - .runOn(scheduler) - // Execute the work and map the result to a work response - .map { request -> return@map this.respondToRequest(request) } - // Run the garbage collector periodically so that we are a good responsible worker - .doOnNext { persistentWorkerCpuTimeBasedGcScheduler.maybePerformGc() } - .doOnError { it.printStackTrace() } - .sequential() - .observeOn(scheduler) - .blockingSubscribe { response -> - workRequestProcessor.writeWorkResponse(response) - } - return@use 0 + try { + val workerHandler: WorkRequestHandler = + WorkRequestHandler + .WorkRequestHandlerBuilder( + WorkRequestHandler.WorkRequestCallback { request, pw -> + return@WorkRequestCallback workerWorkRequestCallback.processWorkRequest( + request.argumentsList.toList(), + System.err, + ) + }, + realStdErr, + ProtoWorkerMessageProcessor(System.`in`, System.out), + ).setCpuUsageBeforeGc(Duration.ofSeconds(10)) + .build() + workerHandler.processRequests() + } catch (e: IOException) { + e.printStackTrace(realStdErr) + return 1 } - } - private fun respondToRequest(request: WorkRequest): WorkResponse { - ByteArrayOutputStream().use { baos -> - // Create a print stream that the execution can write logs to - val printStream = PrintStream(BufferedOutputStream(ByteArrayOutputStream())) - var exitCode: Int - try { - // Sanity check the work request arguments - val arguments = - requireNotNull(request.arguments) { - "Request with id ${request.requestId} " + - "does not have arguments!" - } - require(arguments.isNotEmpty()) { - "Request with id ${request.requestId} " + - "does not have arguments!" - } - exitCode = workerWorkRequestCallback.processWorkRequest(arguments, printStream) - } catch (e: Exception) { - e.printStackTrace(printStream) - exitCode = 1 - } finally { - printStream.flush() - } - - val output = - arrayOf(baos.toString()) - .asSequence() - .map { it.trim() } - .filter { it.isNotEmpty() } - .joinToString("\n") - return WorkResponse( - exitCode = exitCode, - output = output, - requestId = request.requestId, - ) - } + return 0 } } diff --git a/src/worker/PersistentWorkerCpuTimeBasedGcScheduler.kt b/src/worker/PersistentWorkerCpuTimeBasedGcScheduler.kt deleted file mode 100644 index 6f28987..0000000 --- a/src/worker/PersistentWorkerCpuTimeBasedGcScheduler.kt +++ /dev/null @@ -1,41 +0,0 @@ -package com.rules.android.lint.worker - -import com.sun.management.OperatingSystemMXBean -import java.lang.management.ManagementFactory -import java.time.Duration -import java.util.concurrent.atomic.AtomicReference - -internal class PersistentWorkerCpuTimeBasedGcScheduler( - /** - * After this much CPU time has elapsed, we may force a GC run. Set to [Duration.ZERO] to - * disable. - */ - private val cpuUsageBeforeGc: Duration = Duration.ofSeconds(10), -) { - private val cpuTime: Duration - get() = if (!cpuUsageBeforeGc.isZero) Duration.ofNanos(bean.processCpuTime) else Duration.ZERO - - /** The total process CPU time at the last GC run (or from the start of the worker). */ - private val cpuTimeAtLastGc: AtomicReference = AtomicReference(cpuTime) - - /** Call occasionally to perform a GC if enough CPU time has been used. */ - fun maybePerformGc() { - if (!cpuUsageBeforeGc.isZero) { - val currentCpuTime = cpuTime - val lastCpuTime = cpuTimeAtLastGc.get() - // Do GC when enough CPU time has been used, but only if nobody else beat us to it. - if (currentCpuTime.minus(lastCpuTime) > cpuUsageBeforeGc && - cpuTimeAtLastGc.compareAndSet(lastCpuTime, currentCpuTime) - ) { - System.gc() - // Avoid counting GC CPU time against CPU time before next GC. - cpuTimeAtLastGc.compareAndSet(currentCpuTime, cpuTime) - } - } - } - - companion object { - /** Used to get the CPU time used by this process. */ - private val bean = ManagementFactory.getOperatingSystemMXBean() as OperatingSystemMXBean - } -} diff --git a/src/worker/WorkRequest.kt b/src/worker/WorkRequest.kt deleted file mode 100644 index 4abc54e..0000000 --- a/src/worker/WorkRequest.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.rules.android.lint.worker - -import com.squareup.moshi.Json - -data class WorkRequest( - /** - * Request ID associated with the work request - */ - @Json(name = "requestId") - val requestId: Int = 0, - /** - * The work request arguments - */ - @Json(name = "arguments") - val arguments: List, -) diff --git a/src/worker/WorkResponse.kt b/src/worker/WorkResponse.kt deleted file mode 100644 index 6c9045f..0000000 --- a/src/worker/WorkResponse.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.rules.android.lint.worker - -import com.squareup.moshi.Json - -data class WorkResponse( - /** - * The request ID for the work request - */ - @Json(name = "requestId") - val requestId: Int, - /** - * Exit status for the work request - */ - @Json(name = "exitCode") - val exitCode: Int, - /** - * Standard output that was collected during the work request - */ - @Json(name = "output") - val output: String, -) diff --git a/src/worker/Worker.kt b/src/worker/Worker.kt index ca81694..9f32adf 100644 --- a/src/worker/Worker.kt +++ b/src/worker/Worker.kt @@ -1,6 +1,5 @@ package com.rules.android.lint.worker -import java.io.IOException import java.io.PrintStream interface Worker { @@ -16,14 +15,6 @@ interface Worker { ): Int } - interface WorkerMessageProcessor { - @Throws(IOException::class) - fun readWorkRequest(): WorkRequest - - @Throws(IOException::class) - fun writeWorkResponse(workResponse: WorkResponse) - } - companion object { /** * Creates the appropriate worker instance using the provided worker arguments. diff --git a/src/worker/WorkerIO.kt b/src/worker/WorkerIO.kt deleted file mode 100644 index df4f4dc..0000000 --- a/src/worker/WorkerIO.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.rules.android.lint.worker - -import java.io.InputStream -import java.io.PrintStream - -internal class WorkerIO( - val input: InputStream = System.`in`, - val output: PrintStream = System.out, - val err: PrintStream = System.err, -) : AutoCloseable { - fun redirectSystemStreams(): WorkerIO { - System.setOut(err) - return this - } - - override fun close() { - System.setOut(output) - } -} diff --git a/src/worker/WorkerJsonMessageProcessor.kt b/src/worker/WorkerJsonMessageProcessor.kt deleted file mode 100644 index b6e881c..0000000 --- a/src/worker/WorkerJsonMessageProcessor.kt +++ /dev/null @@ -1,38 +0,0 @@ -package com.rules.android.lint.worker - -import com.squareup.moshi.JsonAdapter -import com.squareup.moshi.Moshi -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory -import okio.BufferedSink -import okio.BufferedSource -import okio.buffer -import okio.sink -import okio.source -import java.io.InputStream -import java.io.OutputStream - -class WorkerJsonMessageProcessor( - inputStream: InputStream, - outputStream: OutputStream, -) : Worker.WorkerMessageProcessor { - // Moshi JSON type adapters - private val moshi = Moshi.Builder().add(KotlinJsonAdapterFactory()).build() - private val workRequestAdapter: JsonAdapter = moshi.adapter(WorkRequest::class.java) - private val workResponseAdapter: JsonAdapter = - moshi.adapter(WorkResponse::class.java) - - // Streams to read and write on - private val bufferedInputStream: BufferedSource = inputStream.source().buffer() - private val bufferedOutputStream: BufferedSink = outputStream.sink().buffer() - - override fun readWorkRequest(): WorkRequest { - val workRequest = workRequestAdapter.fromJson(bufferedInputStream) - requireNotNull(workRequest) { "Error reading next work request!" } - return workRequest - } - - override fun writeWorkResponse(workResponse: WorkResponse) { - workResponseAdapter.toJson(bufferedOutputStream, workResponse) - bufferedOutputStream.flush() - } -} diff --git a/tests/src/worker/BUILD b/tests/src/worker/BUILD index b280cb5..d1dc8db 100644 --- a/tests/src/worker/BUILD +++ b/tests/src/worker/BUILD @@ -1,46 +1,43 @@ load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@rules_kotlin//kotlin:lint.bzl", "ktlint_fix", "ktlint_test") load("//rules:defs.bzl", "android_lint_test") kt_jvm_test( - name = "WorkerIOTest", - srcs = ["WorkerIOTest.kt"], + name = "WorkerTest", + srcs = ["WorkerTest.kt"], associates = ["//src/worker"], - test_class = "com.rules.android.lint.worker.WorkerIOTest", + test_class = "com.rules.android.lint.worker.WorkerTest", deps = [ "@rules_android_lint_deps//:junit_junit", "@rules_android_lint_deps//:org_assertj_assertj_core", ], ) -kt_jvm_test( - name = "WorkerJsonMessageProcessorTest", - srcs = ["WorkerJsonMessageProcessorTest.kt"], - associates = ["//src/worker"], - test_class = "com.rules.android.lint.worker.WorkerJsonMessageProcessorTest", - deps = [ - "@rules_android_lint_deps//:junit_junit", - "@rules_android_lint_deps//:org_assertj_assertj_core", - ], +android_lint_test( + name = "WorkerTest_lint_test", + srcs = ["WorkerTest.kt"], + lib = ":WorkerTest", + visibility = ["//visibility:private"], ) -android_lint_test( - name = "WorkerIOTest_lint_test", - srcs = ["WorkerIOTest.kt"], - lib = ":WorkerIOTest", +ktlint_test( + name = "tests_ktlint_test", + srcs = glob(["*.kt"]), + config = "//:editorconfig", visibility = ["//visibility:private"], ) -android_lint_test( - name = "WorkerJsonMessageProcessorTest_lint_test", - srcs = ["WorkerJsonMessageProcessorTest.kt"], - lib = ":WorkerJsonMessageProcessorTest", +ktlint_fix( + name = "tests_ktlint_fix", + srcs = glob(["*.kt"]), + config = "//:editorconfig", visibility = ["//visibility:private"], ) test_suite( name = "tests", tests = [ - ":WorkerIOTest", - ":WorkerJsonMessageProcessorTest", + ":WorkerTest", + ":tests_ktlint_test", ], ) diff --git a/tests/src/worker/WorkerIOTest.kt b/tests/src/worker/WorkerIOTest.kt deleted file mode 100644 index a5e86a1..0000000 --- a/tests/src/worker/WorkerIOTest.kt +++ /dev/null @@ -1,97 +0,0 @@ -package com.rules.android.lint.worker - -import org.assertj.core.api.Assertions.assertThat -import org.junit.Test -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 -import java.io.ByteArrayInputStream -import java.io.ByteArrayOutputStream -import java.io.PrintStream -import java.nio.charset.StandardCharsets - -@RunWith(JUnit4::class) -class WorkerIOTest { - - @Test - @Throws(Exception::class) - fun testWorkerIO_doesWrapSystemStreams() { - // Save the original streams - val originalInputStream = System.`in` - val originalOutputStream = System.out - val originalErrorStream = System.err - - // Swap in the test streams to assert against - val byteArrayInputStream = ByteArrayInputStream(ByteArray(0)) - val outputBuffer = PrintStream(ByteArrayOutputStream(), true) - val errorBuffer = PrintStream(ByteArrayOutputStream(), true) - System.setIn(byteArrayInputStream) - System.setOut(outputBuffer) - System.setErr(errorBuffer) - - try { - WorkerIO().use { io -> - // Redirect the system streams - io.redirectSystemStreams() - - // Assert that the WorkerIO returns the correct wrapped streams and the System instance - // has been swapped out with the wrapped one. System.in should be untouched. - assertThat(System.`in`).isSameAs(byteArrayInputStream) - - assertThat(io.output).isSameAs(outputBuffer) - assertThat(System.out).isSameAs(errorBuffer) - - assertThat(io.err).isSameAs(errorBuffer) - assertThat(System.err).isSameAs(errorBuffer) - } - } finally { - // Swap back in the original streams - System.setIn(originalInputStream) - System.setOut(originalOutputStream) - System.setErr(originalErrorStream) - - outputBuffer.close() - errorBuffer.close() - byteArrayInputStream.close() - } - } - - @Test - @Throws(Exception::class) - fun testWorkerIO_doesWriteSystemOutToSystemError() { - // Save the original streams - val originalInputStream = System.`in` - val originalOutputStream = System.out - val originalErrorStream = System.err - - // Swap in the test streams to assert against - val byteArrayInputStream = ByteArrayInputStream(ByteArray(0)) - val byteArrayOutputStream = ByteArrayOutputStream() - val outputBuffer = PrintStream(byteArrayOutputStream, true) - System.setIn(byteArrayInputStream) - System.setOut(outputBuffer) - System.setErr(outputBuffer) - try { - WorkerIO().use { io -> - // Redirect the system streams - io.redirectSystemStreams() - var captured = String(byteArrayOutputStream.toByteArray(), StandardCharsets.UTF_8) - assertThat(captured).isEmpty() - - // Assert that the standard out/error stream redirect to our own streams - println("This is a standard out message!") - System.err.println("This is a standard error message!") - captured = String(byteArrayOutputStream.toByteArray(), StandardCharsets.UTF_8) - byteArrayOutputStream.reset() - assertThat(captured) - .isEqualTo("This is a standard out message!\nThis is a standard error message!\n") - } - } finally { - // Swap back in the original streams - System.setIn(originalInputStream) - System.setOut(originalOutputStream) - System.setErr(originalErrorStream) - outputBuffer.close() - byteArrayInputStream.close() - } - } -} diff --git a/tests/src/worker/WorkerJsonMessageProcessorTest.kt b/tests/src/worker/WorkerJsonMessageProcessorTest.kt deleted file mode 100644 index 170dc97..0000000 --- a/tests/src/worker/WorkerJsonMessageProcessorTest.kt +++ /dev/null @@ -1,65 +0,0 @@ -package com.rules.android.lint.worker - -import okio.Buffer -import org.assertj.core.api.Assertions.assertThat -import org.assertj.core.api.Assertions.fail -import org.junit.After -import org.junit.Test - - -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4::class) -class WorkerJsonMessageProcessorTest { - - private val jsonBuffer = Buffer() - private val processor = WorkerJsonMessageProcessor( - inputStream = jsonBuffer.inputStream(), - outputStream = jsonBuffer.outputStream(), - ) - - @After - fun reset() { - jsonBuffer.close() - } - - @Test - fun doesEncodeWorkResponseJsonCorrectly() { - processor.writeWorkResponse(WorkResponse(requestId = 110, exitCode = 100, output = "foo")) - - val json = jsonBuffer.readString(Charsets.UTF_8) - assertThat(json).isEqualTo("{\"requestId\":110,\"exitCode\":100,\"output\":\"foo\"}") - } - - @Test - fun doesParseWorkRequestJsonCorrectly() { - jsonBuffer.writeString("{\"requestId\": 100, \"arguments\": [\"foo\"]}", Charsets.UTF_8) - - val workRequest = processor.readWorkRequest() - assertThat(workRequest).isNotNull - assertThat(workRequest.requestId).isEqualTo(100) - assertThat(workRequest.arguments).containsExactly("foo") - } - - @Test - fun doesDefaultRequestIDToZeroWhenNotPresent() { - jsonBuffer.writeString("{\"arguments\": []}", Charsets.UTF_8) - - val workRequest = processor.readWorkRequest() - assertThat(workRequest).isNotNull - assertThat(workRequest.requestId).isEqualTo(0) - } - - @Test - fun doesCrashWhenArgumentsNotPresent() { - jsonBuffer.writeString("{\"requestId\": 100}", Charsets.UTF_8) - - try { - processor.readWorkRequest() - fail("readNextWorkRequest is expected to fail when arguments not provided!") - } catch (e: Exception) { - assertThat(e).hasMessage("Required value 'arguments' missing at \$") - } - } -} diff --git a/tests/src/worker/WorkerTest.kt b/tests/src/worker/WorkerTest.kt new file mode 100644 index 0000000..d904754 --- /dev/null +++ b/tests/src/worker/WorkerTest.kt @@ -0,0 +1,44 @@ +package com.rules.android.lint.worker + +import org.assertj.core.api.Assertions.assertThat +import org.junit.Test +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 +import java.io.PrintStream + +@RunWith(JUnit4::class) +class WorkerTest { + @Test + fun `does return persistent worker when persistent worker flags are passed`() { + val worker = Worker.fromArgs(arrayOf("--persistent_worker"), NO_OP_CALLBACK) + assertThat(worker).isInstanceOf(PersistentWorker::class.java) + } + + @Test + fun `does return invocation worker when persistent worker flags are not passed`() { + val worker = Worker.fromArgs(emptyArray(), NO_OP_CALLBACK) + assertThat(worker).isInstanceOf(InvocationWorker::class.java) + } + + @Test + fun `does invocation worker return expected exit code`() { + val worker = Worker.fromArgs(arrayOf(""), stubWorkRequestCallback({ 100 })) + val exitCode = worker.processRequests() + assertThat(exitCode).isEqualTo(100) + } + + companion object { + fun stubWorkRequestCallback(callback: () -> Int): Worker.WorkRequestCallback = + object : Worker.WorkRequestCallback { + override fun processWorkRequest( + args: List, + printStream: PrintStream, + ): Int = callback() + } + + private val NO_OP_CALLBACK = + stubWorkRequestCallback( + callback = { TODO("NO-OP!") }, + ) + } +}