[
  {
    "path": ".buildscript/deploy_snapshot.sh",
    "content": "#!/bin/bash\n#\n# Deploy a jar, source jar, and javadoc jar to Sonatype's snapshot repo.\n#\n# Adapted from https://coderwall.com/p/9b_lfq and\n# http://benlimmer.com/2013/12/26/automatically-publish-javadoc-to-gh-pages-with-travis-ci/\n\nSLUG=\"uber/stylist\"\nJDK=\"oraclejdk8\"\nBRANCH=\"master\"\n\nset -e\n\nif [ \"$TRAVIS_REPO_SLUG\" != \"$SLUG\" ]; then\n  echo \"Skipping snapshot deployment: wrong repository. Expected '$SLUG' but was '$TRAVIS_REPO_SLUG'.\"\nelif [ \"$TRAVIS_JDK_VERSION\" != \"$JDK\" ]; then\n  echo \"Skipping snapshot deployment: wrong JDK. Expected '$JDK' but was '$TRAVIS_JDK_VERSION'.\"\nelif [ \"$TRAVIS_PULL_REQUEST\" != \"false\" ]; then\n  echo \"Skipping snapshot deployment: was pull request.\"\nelif [ \"$TRAVIS_BRANCH\" != \"$BRANCH\" ]; then\n  echo \"Skipping snapshot deployment: wrong branch. Expected '$BRANCH' but was '$TRAVIS_BRANCH'.\"\nelse\n  echo \"Deploying snapshot...\"\n  ./gradlew clean uploadArchives -Dorg.gradle.parallel=false\n  echo \"Snapshot deployed!\"\nfi\n"
  },
  {
    "path": ".editorconfig",
    "content": "[*.{kt,kts}]\n# possible values: number (e.g. 2), \"unset\" (makes ktlint ignore indentation completely)\nindent_size=2\ncontinuation_indent_size=4\ninsert_final_newline=true\n# possible values: number (e.g. 120) (package name, imports & comments are ignored), \"off\"\nmax_line_length=off\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE.md",
    "content": "Thanks for using Stylist. Before you create an issue, please consider the following points:\n\n  - [ ] If you think you found a bug, please include a code sample that reproduces the problem. A test case that reproduces the issue is preferred. A stack trace alone is ok but may not contain enough context for us to address the issue.\n\n  - [ ] Please include the library version number, including the minor and patch version, in the issue text.\n"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "content": "Thank you for contributing to Stylist. Before pressing the \"Create Pull Request\" button, please provide the following:\n\n  - [ ] A description about what and why you are contributing, even if it's trivial.\n\n  - [ ] The issue number(s) or PR number(s) in the description if you are contributing in response to those.\n\n  - [ ] If applicable, unit tests.\n"
  },
  {
    "path": ".gitignore",
    "content": "###OSX###\n\n.DS_Store\n.AppleDouble\n.LSOverride\n\n# Icon must ends with two \\r.\nIcon\n\n\n# Thumbnails\n._*\n\n# Files that might appear on external disk\n.Spotlight-V100\n.Trashes\n\n\n###Linux###\n\n*~\n\n# KDE directory preferences\n.directory\n\n\n###Android###\n\n# Built application files\n*.apk\n*.ap_\n\n# Files for ART and Dalvik VM\n*.dex\n\n# Java class files\n*.class\n\n# Generated files\nbin/\ngen/\n\n# Gradle files\n.gradle/\n.gradletasknamecache\nbuild/\n\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Proguard folder generated by Eclipse\nproguard/\n\n# Lint\nlint-report.html\nlint-report_files/\nlint_result.txt\n\n# Mobile Tools for Java (J2ME)\n.mtj.tmp/\n\n# Package Files #\n*.war\n*.ear\n\n# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml\nhs_err_pid*\n\n\n###IntelliJ###\n\n*.iml\n*.ipr\n*.iws\n.idea/\n\n\n###Eclipse###\n\n*.pydevproject\n.metadata\ntmp/\n*.tmp\n*.bak\n*.swp\n*~.nib\n.settings/\n.loadpath\n\n# External tool builders\n.externalToolBuilders/\n\n# Locally stored \"Eclipse launch configurations\"\n*.launch\n\n# CDT-specific\n.cproject\n\n# PDT-specific\n.buildpath\n\n# sbteclipse plugin\n.target\n\n# TeXlipse plugin\n.texlipse\n\n# kotlin\nannotations/\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: android\n\nandroid:\n  components:\n    - tools\n    - platform-tools\n    - build-tools-28.0.3\n    - android-28\n    - extra-android-m2repository\n\njdk:\n  - oraclejdk8\n\nscript:\n  - ./gradlew assembleDebug test check\n\nafter_success:\n  - .buildscript/deploy_snapshot.sh\n\nenv:\n  global:\n    - secure: UiOM+Qr3ghDO6QyWmXcPpBmbuBe80OqLBM6+g7r+elbWjLgcsvaS4tsOuPJnvX+SSzgrUnMJLruzw0w7JXDGCtDsxR/ygN5+C/YkjVjEA0qyCDaTnJQVh9tYVwBy4zbaSaRFMVAxleBQwR1OjMetLMMTsOR8q7YpUt1I6AJzcQGUscobbEOks7TiWUNX21kDzjWbyV5sC/xPx52uAi4SVJJosExlnRz8THGBSTl7COMxE4yw5XksDw/BYDi8A8y21GP0tqgo8wdE3NTpfdMylhkOMwL5cYBAjxudAWn8XtfG54pRYjyFjdgQpKNcDM2JLUE7IjQ+DrC2DvjMKaATWHmohGOZZmb4gYCONoLZyR4UsnMObvKFpooc8401wHxPZ3Yk4vFNMJH1Nik/KsCnV0PITPVrEn135XVsjdwkR8Ntl7f2DVqOHfJrJhEtU+QnSQhAOK5+S/TAGPVlbRhDKpLxfnMZh61tqgfZFBqWFsDtmuq4B8A/FmffFzPstzMWv+/sp6xAXgVfK+UvSBGifm3RgayXpO4qDi7nt38w2lyhQVtgrXLtZVqBKGzvRJRIAQgoe8MJprbU2z90xKPj8smkOMkIGAsdbSEgyC3QrrJMWGKv1rFfpZT7AhyVRsZlb4FAEKEInE0MCRudMWRdI8S+X+rqbRXaQQvwCkd/DXA=\n    - secure: Fo9GFxUsipCp5n4KuOK8ap6NTEV9Vt8a8dqUi+/ZgQQcFeNEUhg79h88DnVxTUZTVfB4VNWz5L2uOdhNIcBn3UCkW+I56obDc4VC85QJoZCOyagTQueLLExcklLdxyTMK2577d8P9bVsqLX7oNfnGI7y/6Z2Vh5u/kNfOOR6GkeFuP9ptX34TrCv0JDBrwuBgCPz+/daDiFFEpNDjGahWjSIZ8rs91gh4QGIWZk1tq3czP+3Biuj6Urk78RFO+UM9QlXk0Ayl6brodjGCjlRzjITzkKWaD7o+mw1EDRimkgTT0HwiiSEJJgQhxPwyIL4M4r7cKLUmx86FEgVtLY/tOcylNwYWEsotW4NIeiWZDG4kOFZQjoBhsvzGgS23r9aUQi03eYjDQ2SDTurH/DSe2IEm6BVaDDBOIA88FoU040TbiSf59OwSic1S+UlMRGUxmG/r69g+RVG6CZMUxTI2ypHtpAK3Sv2oR7GNcIOeAciwDCuNATBy60x13zyWnXI0mbmFBe7o0YqqwCO4ANxCX9agNdQ7E5IqdHZv7TF7DZfVo2skmyM4DI1oRN82icCDdw1QmdIfw2okq4D5c2Deuc0gRnZU/iXIUgKenkxcnjd0BeUUHe4eioR4ihCSHqwkIyI/zWYIaekRQ8Lz3w+ov2XKK1zCqeMcN+9OcroWkc=\n\nbranches:\n  except:\n    - gh-pages\n\nnotifications:\n  email: false\n\ncache:\n  directories:\n    - $HOME/.gradle\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "Changelog\n=========\n\nVersion 0.0.2\n-------------\n\n_2018-12-03_\n\n* **Breaking change:** Project migrated to [AndroidX](https://developer.android.com/jetpack/androidx/). See the [class and package mappings](https://developer.android.com/jetpack/androidx/migrate) for help migrating\n* **Breaking change:** `com.commit451.uresourcespoet.StyleItem` moved to `com.uber.stylist.api.StyleItem`\n\nVersion 0.0.1\n-------------\n\n_2018-08-22_\n\n* Initial release\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment include:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at mobile-open-source@uber.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\n\n[homepage]: http://contributor-covenant.org\n[version]: http://contributor-covenant.org/version/1/4/\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "Contributing to Uber's Android Template\n=======================\n\nUber welcomes contributions of all kinds and sizes. This includes everything from from simple bug reports to large features.\n\nWorkflow\n--------\n\nWe love GitHub issues!\n\nFor small feature requests, an issue first proposing it for discussion or demo implementation in a PR suffice.\n\nFor big features, please open an issue so that we can agree on the direction, and hopefully avoid investing a lot of time on a feature that might need reworking.\n\nSmall pull requests for things like typos, bug fixes, etc are always welcome.\n\nDOs and DON'Ts\n--------------\n\n* DO follow our [coding style](https://github.com/uber/java-code-styles) \n* DO include tests when adding new features. When fixing bugs, start with adding a test that highlights how the current behavior is broken.\n* DO keep the discussions focused. When a new or related topic comes up it's often better to create new issue than to side track the discussion.\n\n* DON'T submit PRs that alter licensing related files or headers. If you believe there's a problem with them, file an issue and we'll be happy to discuss it.\n\nGuiding Principles\n------------------\n\n* We allow anyone to participate in our projects. Tasks can be carried out by anyone that demonstrates the capability to complete them\n* Always be respectful of one another. Assume the best in others and act with empathy at all times\n* Collaborate closely with individuals maintaining the project or experienced users. Getting ideas out in the open and seeing a proposal before it's a pull request helps reduce redundancy and ensures we're all connected to the decision making process\n"
  },
  {
    "path": "LICENSE.txt",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "# Stylist [![Build Status](https://travis-ci.org/uber/stylist.svg?branch=master)](https://travis-ci.org/uber/stylist)\n\nAs Android apps grow, providing common styling across app themes becomes challenging. Typically, this results in copy-pasting style items across themes, monolithic themes, or complicated inheritance trees. Stylist is a highly-extensible platform for creating and maintaining an app’s base set of Android XML themes.\n\n## Overview\n\nStylist is a Gradle plugin written in Kotlin that generates a base set of Android XML themes. Stylist-generated themes are created using a stencil and trait system. Each theme is declared with a single stencil, which is comprised of sets of logically-grouped style items. All of this comes together to create an easily maintainable system of stencils and traits.\n\n*ThemeStencils*: A 1:1 ratio of `ThemeStencil`s to corresponding generated themes. Each `ThemeStencil` declares a theme name and parent theme plus any extra `StyleItemGroup`s that should be included in addition to the globally applicable set.\n\n*StyleItemGroups*: Each `StyleItemGroup` can be declared by multiple `ThemeStencil`s and generate otherwise duplicated style items across all themes that include them. Common examples include default app colors, font sizes, and common dimension values. They are a logical groupings of custom theme attributes that get included in each theme that declares the group.\n\n## Usage\n\nA simple `ThemeStencilProvider` that defines text sizes in Dark and Light themes would look like:\n\n```kotlin\n@AutoService(ThemeStencilProvider::class)\nclass SampleThemeStencilProvider : ThemeStencilProvider {\n\n  private val textSizes = StyleItemGroup(\n      StyleItem(\"textSizeSmall\", \"12dp\"),\n      StyleItem(\"textSizeMedium\",\"16dp\"),\n      StyleItem(\"textSizeLarge\", \"20dp\")\n  )\n\n  override fun stencils() = linkedSetOf(\n      ThemeStencil(\"Theme.Sample.Dark\", \"Theme.AppCompat\"),\n      ThemeStencil(\"Theme.Sample.Light\", \"Theme.AppCompat.Light\")\n  )\n\n  override fun globalStyleItemGroups() = linkedSetOf(\n      textSizes\n  )\n}\n```\n\nLeaving you with a generated themes XML resource file like this:\n\n```xml\n<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<resources>\n  <style name=\"Theme.Sample.Dark\" parent=\"Theme.AppCompat\">\n    <item name=\"textSizeSmall\">12dp</item>\n    <item name=\"textSizeMedium\">16dp</item>\n    <item name=\"textSizeLarge\">20dp</item>\n  </style>\n  <style name=\"Theme.Sample.Light\" parent=\"Theme.AppCompat.Light\">\n    <item name=\"textSizeSmall\">12dp</item>\n    <item name=\"textSizeMedium\">16dp</item>\n    <item name=\"textSizeLarge\">20dp</item>\n  </style>\n</resources>\n```\n\nThis may look like a lot of boilerplate for simple style item shared by two themes, but it scales quite well when you want to have many custom color, dimension, and other style items on _numerous_ app themes and custom theme attributes.\n\n## Download\n\nStylist [![Maven Central](https://img.shields.io/maven-central/v/com.uber.stylist/stylist.svg)](https://mvnrepository.com/artifact/com.uber.stylist/stylist)\n```gradle\nclasspath 'com.uber.stylist:stylist:0.0.2'\n```\n\nStylist Core [![Maven Central](https://img.shields.io/maven-central/v/com.uber.stylist/stylist-core.svg)](https://mvnrepository.com/artifact/com.uber.stylist/stylist-core)\n```gradle\nclasspath 'com.uber.stylist:stylist-core:0.0.2'\n```\n\nStylist API [![Maven Central](https://img.shields.io/maven-central/v/com.uber.stylist/stylist-api.svg)](https://mvnrepository.com/artifact/com.uber.stylist/stylist-api)\n```gradle\nclasspath 'com.uber.stylist:stylist-api:0.0.2'\n```\n\n## License\n\n```\nCopyright (C) 2018 Uber Technologies\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n"
  },
  {
    "path": "RELEASING.md",
    "content": "Releasing\n=========\n\n 1. Change the version in `gradle.properties` to a non-SNAPSHOT version.\n 2. Update the `CHANGELOG.md` for the impending release.\n 3. Update the `README.md` with the new version.\n 4. `git commit -am \"Prepare for release X.Y.Z\"` (where X.Y.Z is the new version)\n 5. `git tag -a X.Y.Z -m \"Version X.Y.Z\"` (where X.Y.Z is the new version)\n 6. `./gradlew clean uploadArchives -Dorg.gradle.parallel=false`\n 7. Update the `gradle.properties` to the next SNAPSHOT version.\n 8. `git commit -am \"Prepare next development version\"`\n 9. `git push && git push --tags`\n 10. Visit [Sonatype Nexus](https://oss.sonatype.org/) and promote the artifact.\n"
  },
  {
    "path": "build.gradle",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nbuildscript {\n    apply from: project.file('gradle/dependencies.gradle')\n\n    repositories {\n        google()\n        jcenter()\n        maven { url deps.build.gradlePluginsUrl }\n    }\n\n    dependencies {\n        classpath deps.build.androidPlugin\n        classpath deps.kotlin.gradlePlugin\n    }\n}\n\napply from: project.file('gradle/dependencies.gradle')\nsubprojects {\n    buildscript {\n        repositories {\n            google()\n            jcenter()\n        }\n    }\n\n    repositories {\n        google()\n        jcenter()\n        maven { url deps.build.gradlePluginsUrl }\n    }\n\n    apply plugin: 'checkstyle'\n\n    checkstyle { -> rootProject\n        configFile rootProject.file('config/checkstyle/checkstyle.xml')\n    }\n}\n\ntask wrapper(type: Wrapper) {\n    gradleVersion = '4.7'\n    distributionUrl = \"https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip\"\n}\n\ntask clean(type: Delete) {\n    rootProject.allprojects {\n        delete it.buildDir\n    }\n}\n\napply from: 'gradle/dependencies.gradle'\napply from: 'gradle/checkstyle.gradle'\n"
  },
  {
    "path": "buildSrc/build.gradle",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nbuildscript {\n    apply from: project.rootProject.file(\"../gradle/dependencies.gradle\")\n\n    repositories {\n        google()\n        jcenter()\n        maven { url deps.build.gradlePluginsUrl }\n    }\n\n    dependencies {\n        classpath deps.build.androidPlugin\n        classpath deps.kotlin.gradlePlugin\n    }\n}\n\napply from: project.rootProject.file(\"../gradle/dependencies.gradle\")\nrepositories {\n    google()\n    jcenter()\n}\n\nsubprojects { subproject ->\n    if (subproject.buildFile.exists()) {\n        apply from: project.rootProject.file(\"../gradle/dependencies.gradle\")\n        repositories {\n            google()\n            jcenter()\n        }\n\n        rootProject.dependencies {\n            runtime project(path)\n        }\n    }\n    subproject.afterEvaluate {\n        // Disable useless tasks in buildSrc\n        if (subproject.plugins.hasPlugin(\"kotlin\")) {\n            subproject.tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {\n                kotlinOptions.suppressWarnings = true\n            }\n        }\n\n        subproject.tasks.findAll {\n            it.name.toLowerCase().contains(\"test\") ||\n                it.name.toLowerCase().contains(\"lint\") ||\n                it.name.toLowerCase().contains(\"checkstyle\") }.each {\n            it.enabled = false\n        }\n    }\n}\n"
  },
  {
    "path": "buildSrc/settings.gradle",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// These are not needed if consuming the Stylist plugin from Maven Central instead of the local copy from this repo\ninclude ':stylist'\ninclude ':stylist-api'\ninclude ':stylist-core'\n\ninclude ':sample:providers'\n"
  },
  {
    "path": "config/checkstyle/checkstyle-suppressions.xml",
    "content": "<?xml version=\"1.0\"?>\n\n<!--\n  ~ Copyright (c) 2018. Uber Technologies\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~    http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<!DOCTYPE suppressions PUBLIC\n    \"-//Puppy Crawl//DTD Suppressions 1.1//EN\"\n    \"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd\">\n\n<suppressions>\n    <suppress checks=\"JavadocType\" files=\"[\\\\/]test[\\\\/]\" />\n    <suppress checks=\"JavadocMethod\" files=\"[\\\\/]test[\\\\/]\" />\n</suppressions>\n"
  },
  {
    "path": "config/checkstyle/checkstyle-test.xml",
    "content": "<?xml version=\"1.0\"?>\n<!--\n  ~ Copyright (c) 2018. Uber Technologies\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~    http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<!DOCTYPE module PUBLIC\n    \"-//Puppy Crawl//DTD Check Configuration 1.2//EN\"\n    \"http://www.puppycrawl.com/dtds/configuration_1_2.dtd\">\n\n<module name=\"Checker\">\n    <property name=\"charset\" value=\"UTF-8\"/>\n\n    <!-- Javadoc Comments                                          -->\n    <!-- See http://checkstyle.sourceforge.net/config_javadoc.html -->\n    <!--module name=\"JavadocPackage\"/-->\n\n\n    <!-- Miscellaneous                                          -->\n    <!-- See http://checkstyle.sourceforge.net/config_misc.html -->\n    <module name=\"NewlineAtEndOfFile\"/>\n    <!--module name=\"Translation\"/-->\n    <!--module name=\"UniqueProperties\"/-->\n\n\n    <!-- Size Violations                                         -->\n    <!-- See http://checkstyle.sourceforge.net/config_sizes.html -->\n    <module name=\"FileLength\">\n        <property name=\"max\" value=\"5500\"/>\n    </module>\n\n\n    <!-- Whitespace                                          -->\n    <!-- See http://checkstyle.sf.net/config_whitespace.html -->\n    <module name=\"FileTabCharacter\">\n        <property name=\"eachLine\" value=\"true\"/>\n    </module>\n\n\n    <!-- Tree Walker                                                  -->\n    <!-- See http://checkstyle.sourceforge.net/config.html#TreeWalker -->\n    <module name=\"TreeWalker\">\n\n        <!-- Annotations                                                  -->\n        <!-- See http://checkstyle.sourceforge.net/config_annotation.html -->\n        <!--module name=\"AnnotationUseStyle\"/-->\n        <!--module name=\"MissingDeprecated\"/-->\n        <module name=\"MissingOverride\"/>\n        <module name=\"PackageAnnotation\"/>\n        <!--module name=\"SuppressWarnings\"/-->\n        <!--module name=\"SuppressWarningsHolder\"/-->\n        <module name=\"AnnotationLocation\">\n            <property name=\"tokens\" value=\"CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF\"/>\n            <property name=\"allowSamelineMultipleAnnotations\" value=\"false\"/>\n            <property name=\"allowSamelineSingleParameterlessAnnotation\" value=\"false\"/>\n            <property name=\"allowSamelineParameterizedAnnotation\" value=\"false\"/>\n        </module>\n        <module name=\"AnnotationLocation\">\n            <property name=\"tokens\" value=\"VARIABLE_DEF\"/>\n            <property name=\"allowSamelineMultipleAnnotations\" value=\"true\"/>\n            <property name=\"allowSamelineSingleParameterlessAnnotation\" value=\"true\"/>\n            <property name=\"allowSamelineParameterizedAnnotation\" value=\"true\"/>\n        </module>\n\n\n        <!-- Blocks Checks                                            -->\n        <!-- See http://checkstyle.sourceforge.net/config_blocks.html -->\n        <module name=\"EmptyBlock\">\n            <property name=\"tokens\" value=\"LITERAL_WHILE,LITERAL_TRY,LITERAL_FINALLY,LITERAL_DO,LITERAL_IF,LITERAL_ELSE,LITERAL_FOR,INSTANCE_INIT,STATIC_INIT,LITERAL_SWITCH\"/>\n        </module>\n        <!--module name=\"EmptyCatchBlock\"/-->\n        <module name=\"LeftCurly\">\n            <property name=\"maxLineLength\" value=\"120\"/>\n        </module>\n        <module name=\"NeedBraces\"/>\n        <module name=\"RightCurly\"/>\n        <module name=\"AvoidNestedBlocks\"/>\n\n\n        <!-- Class Design                                             -->\n        <!-- See http://checkstyle.sourceforge.net/config_design.html -->\n        <!--module name=\"VisibilityModifier\"/-->\n        <!--module name=\"FinalClass\"/-->\n        <module name=\"InterfaceIsType\"/>\n        <module name=\"HideUtilityClassConstructor\"/>\n        <!--module name=\"DesignForExtension\"/-->\n        <!--module name=\"MutableException\"/-->\n        <!--module name=\"ThrowsCount\"/-->\n        <module name=\"InnerTypeLast\"/>\n        <module name=\"OneTopLevelClass\"/>\n\n\n        <!-- Coding                                                   -->\n        <!-- See http://checkstyle.sourceforge.net/config_coding.html -->\n        <!--module name=\"ArrayTrailingComma\"/-->\n        <!--module name=\"AvoidInlineConditionals\"/-->\n        <module name=\"CovariantEquals\"/>\n        <module name=\"EmptyStatement\"/>\n        <!--module name=\"EqualsAvoidNull\"/-->\n        <module name=\"EqualsHashCode\"/>\n        <!--module name=\"FinalLocalVariable\"/-->\n        <!--module name=\"HiddenField\"/-->\n        <module name=\"IllegalInstantiation\"/>\n        <!--module name=\"IllegalToken\"/-->\n        <!--module name=\"IllegalTokenText\"/-->\n        <module name=\"InnerAssignment\"/>\n        <!--module name=\"MagicNumber\"/-->\n        <!--module name=\"MissingSwitchDefault\"/-->\n        <!--module name=\"ModifiedControlVariable\"/-->\n        <module name=\"SimplifyBooleanExpression\"/>\n        <module name=\"SimplifyBooleanReturn\"/>\n        <module name=\"StringLiteralEquality\"/>\n        <!--module name=\"NestedForDepth\"/-->\n        <!--module name=\"NestedIfDepth\"/-->\n        <!--module name=\"NestedTryDepth\"/-->\n        <module name=\"NoClone\"/>\n        <module name=\"NoFinalizer\"/>\n        <module name=\"SuperClone\"/>\n        <!--module name=\"SuperFinalize\"/-->\n        <!--module name=\"IllegalCatch\"/-->\n        <!--module name=\"IllegalThrows\"/-->\n        <module name=\"PackageDeclaration\"/>\n        <!--module name=\"ReturnCount\"/-->\n        <!--module name=\"IllegalType\"/-->\n        <module name=\"DeclarationOrder\"/>\n        <!--module name=\"ParameterAssignment\"/-->\n        <!--module name=\"ExplicitInitialization\"/-->\n        <module name=\"DefaultComesLast\"/>\n        <!--module name=\"MissingCtor\"/-->\n        <module name=\"FallThrough\"/>\n        <!--module name=\"MultipleStringLiterals\"/-->\n        <module name=\"MultipleVariableDeclarations\"/>\n        <!--module name=\"RequireThis\"/-->\n        <!--module name=\"UnnecessaryParentheses\"/-->\n        <module name=\"OneStatementPerLine\"/>\n        <!--module name=\"VariableDeclarationUsageDistance\"/-->\n        <!--module name=\"OverloadMethodsDeclarationOrder\"/-->\n\n\n        <!-- Headers                                                  -->\n        <!-- See http://checkstyle.sourceforge.net/config_header.html -->\n        <!--module name=\"Header\"/-->\n        <!--module name=\"RegexpHeader\"/-->\n\n\n        <!-- Imports                                                   -->\n        <!-- See http://checkstyle.sourceforge.net/config_imports.html -->\n        <module name=\"AvoidStarImport\"/>\n        <!--module name=\"AvoidStaticImport\"/-->\n        <module name=\"IllegalImport\"/>\n        <module name=\"RedundantImport\"/>\n        <module name=\"UnusedImports\">\n            <property name=\"processJavadoc\" value=\"true\"/>\n        </module>\n        <!--module name=\"ImportOrder\"/-->\n        <!--module name=\"ImportControl\"/-->\n        <!--module name=\"CustomImportOrder\"/-->\n\n\n        <!-- Javadoc Comments                                          -->\n        <!-- See http://checkstyle.sourceforge.net/config_javadoc.html -->\n        <!--module name=\"JavadocType\"/-->\n        <!--module name=\"JavadocMethod\">\n            <property name=\"scope\" value=\"public\"/>\n        </module-->\n        <!--module name=\"JavadocVariable\"/-->\n        <!--module name=\"JavadocStyle\"/-->\n        <!--module name=\"WriteTag\"/-->\n        <!--module name=\"NonEmptyAtclauseDescription\"/-->\n        <!--module name=\"JavadocTagContinuationIndentation\"/-->\n        <!--module name=\"SummaryJavadoc\"/-->\n        <!--module name=\"AtclauseOrder\"/-->\n        <!--module name=\"JavadocParagraph\"/-->\n        <!--module name=\"SingleLineJavadoc\"/-->\n\n\n        <!-- Metrics                                               -->\n        <!-- http://checkstyle.sourceforge.net/config_metrics.html -->\n        <!--module name=\"BooleanExpressionComplexity\"/-->\n        <!--module name=\"ClassDataAbstractionCoupling\"/-->\n        <!--module name=\"ClassFanOutComplexity\"/-->\n        <!--module name=\"CyclomaticComplexity\"/-->\n        <!--module name=\"NPathComplexity\"/-->\n        <!--module name=\"JavaNCSS\"/-->\n\n\n        <!-- Miscellaneous                                          -->\n        <!-- See http://checkstyle.sourceforge.net/config_misc.html -->\n        <module name=\"TodoComment\">\n            <property name=\"format\" value=\"\\bTODO\\b.*\"/>\n        </module>\n        <module name=\"TodoComment\">\n            <property name=\"format\" value=\"\\btodo\\b.*\"/>\n        </module>\n        <module name=\"TodoComment\">\n            <property name=\"format\" value=\"\\bFIXME\\b.*\"/>\n        </module>\n        <module name=\"TodoComment\">\n            <property name=\"format\" value=\"\\bfixme\\b.*\"/>\n        </module>\n        <!--module name=\"CommentsIndentation\"/-->\n        <!--module name=\"UncommentedMain\"/-->\n        <module name=\"UpperEll\"/>\n        <module name=\"ArrayTypeStyle\"/>\n        <!--module name=\"FinalParameters\"/-->\n        <!--module name=\"DescendantToken\"/-->\n        <module name=\"Indentation\">\n            <property name=\"lineWrappingIndentation\" value=\"0\"/>\n            <property name=\"arrayInitIndent\" value=\"8\"/>\n        </module>\n        <module name=\"TrailingComment\"/>\n        <module name=\"OuterTypeFilename\"/>\n        <!--module name=\"UniqueProperties\"/-->\n        <!--module name=\"AvoidEscapedUnicodeCharacters\"/-->\n\n\n        <!-- Modifiers                                                  -->\n        <!-- See http://checkstyle.sourceforge.net/config_modifier.html -->\n        <module name=\"ModifierOrder\"/>\n        <module name=\"RedundantModifier\">\n            <property name=\"severity\" value=\"ignore\"/>\n        </module>\n\n\n        <!-- Naming Conventions                                       -->\n        <!-- See http://checkstyle.sourceforge.net/config_naming.html -->\n        <!--module name=\"AbstractClassName\"/-->\n        <module name=\"ClassTypeParameterName\"/>\n        <module name=\"ConstantName\"/>\n        <module name=\"LocalFinalVariableName\"/>\n        <module name=\"LocalVariableName\"/>\n        <module name=\"MemberName\">\n            <property name=\"applyToPublic\" value=\"true\"/>\n            <property name=\"applyToPackage\" value=\"true\"/>\n            <property name=\"applyToProtected\" value=\"false\"/>\n            <property name=\"applyToPrivate\" value=\"false\"/>\n            <property name=\"format\" value=\"^[a-z][a-zA-Z0-9]*$\"/>\n        </module>\n        <module name=\"MethodName\">\n            <property name=\"format\" value=\"^[a-z_][a-zA-Z0-9_]*$\"/>\n        </module>\n        <module name=\"MethodTypeParameterName\"/>\n        <module name=\"InterfaceTypeParameterName\"/>\n        <module name=\"PackageName\"/>\n        <module name=\"ParameterName\"/>\n        <!--module name=\"StaticVariableName\"/-->\n        <module name=\"TypeName\"/>\n        <!--module name=\"AbbreviationAsWordInName\"/-->\n\n\n        <!-- Regexp                                               -->\n        <!-- http://checkstyle.sourceforge.net/config_regexp.html -->\n        <!--module name=\"Regexp\"/-->\n        <!--module name=\"RegexpSingleLineJava\"-->\n\n\n        <!-- Size Violations                                         -->\n        <!-- See http://checkstyle.sourceforge.net/config_sizes.html -->\n        <!--module name=\"ExecutableStatementCount\"/-->\n        <module name=\"LineLength\">\n            <property name=\"max\" value=\"120\"/>\n            <property name=\"ignorePattern\" value=\"^(package|import) .+?;$\"/>\n        </module>\n        <!--module name=\"MethodLength\"/-->\n        <!--module name=\"AnonInnerLength\"/-->\n        <!--module name=\"ParameterNumber\"/-->\n        <!--module name=\"OuterTypeNumber\"/-->\n        <!--module name=\"MethodCount\"/-->\n\n\n        <!-- Whitespace                                                   -->\n        <!-- See http://checkstyle.sourceforge.net/config_whitespace.html -->\n        <module name=\"GenericWhitespace\"/>\n        <module name=\"EmptyForInitializerPad\"/>\n        <module name=\"EmptyForIteratorPad\"/>\n        <module name=\"MethodParamPad\"/>\n        <module name=\"NoWhitespaceAfter\">\n            <property name=\"tokens\" value=\"BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS\"/>\n        </module>\n        <module name=\"NoWhitespaceBefore\"/>\n        <module name=\"OperatorWrap\"/>\n        <module name=\"ParenPad\"/>\n        <module name=\"TypecastParenPad\"/>\n        <module name=\"WhitespaceAfter\"/>\n        <module name=\"WhitespaceAround\"/>\n        <module name=\"NoLineWrap\"/>\n        <!--module name=\"EmptyLineSeparator\"/-->\n        <!--module name=\"SeparatorWrap\"/-->\n    </module>\n\n\n    <!-- Regexp                                               -->\n    <!-- http://checkstyle.sourceforge.net/config_regexp.html -->\n    <module name=\"RegexpSingleline\">\n        <property name=\"format\" value=\"\\s+$\"/>\n        <property name=\"message\" value=\"Line has trailing spaces.\"/>\n    </module>\n    <module name=\"RegexpMultiline\">\n        <property name=\"format\" value=\"\\n\\n\\n\"/>\n        <property name=\"message\" value=\"Double blank lines.\"/>\n    </module>\n\n    <module name=\"SuppressionFilter\">\n        <property name=\"file\" value=\"config/checkstyle/checkstyle-suppressions.xml\"/>\n    </module>\n</module>\n"
  },
  {
    "path": "config/checkstyle/checkstyle.xml",
    "content": "<?xml version=\"1.0\"?>\n<!--\n  ~ Copyright (c) 2018. Uber Technologies\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~    http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<!DOCTYPE module PUBLIC\n    \"-//Puppy Crawl//DTD Check Configuration 1.2//EN\"\n    \"http://www.puppycrawl.com/dtds/configuration_1_2.dtd\">\n\n<module name=\"Checker\">\n    <property name=\"charset\" value=\"UTF-8\"/>\n\n    <!-- Javadoc Comments                                          -->\n    <!-- See http://checkstyle.sourceforge.net/config_javadoc.html -->\n    <!--module name=\"JavadocPackage\"/-->\n\n\n    <!-- Miscellaneous                                          -->\n    <!-- See http://checkstyle.sourceforge.net/config_misc.html -->\n    <module name=\"NewlineAtEndOfFile\"/>\n    <!--module name=\"Translation\"/-->\n    <!--module name=\"UniqueProperties\"/-->\n\n\n    <!-- Size Violations                                         -->\n    <!-- See http://checkstyle.sourceforge.net/config_sizes.html -->\n    <module name=\"FileLength\">\n        <property name=\"max\" value=\"1500\"/>\n    </module>\n\n\n    <!-- Whitespace                                          -->\n    <!-- See http://checkstyle.sf.net/config_whitespace.html -->\n    <module name=\"FileTabCharacter\">\n        <property name=\"eachLine\" value=\"true\"/>\n    </module>\n\n\n    <!-- Tree Walker                                                  -->\n    <!-- See http://checkstyle.sourceforge.net/config.html#TreeWalker -->\n    <module name=\"TreeWalker\">\n\n        <!-- Annotations                                                  -->\n        <!-- See http://checkstyle.sourceforge.net/config_annotation.html -->\n        <!--module name=\"AnnotationUseStyle\"/-->\n        <!--module name=\"MissingDeprecated\"/-->\n        <module name=\"MissingOverride\"/>\n        <module name=\"PackageAnnotation\"/>\n        <!--module name=\"SuppressWarnings\"/-->\n        <!--module name=\"SuppressWarningsHolder\"/-->\n        <module name=\"AnnotationLocation\">\n            <property name=\"tokens\" value=\"CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF\"/>\n            <property name=\"allowSamelineMultipleAnnotations\" value=\"false\"/>\n            <property name=\"allowSamelineSingleParameterlessAnnotation\" value=\"false\"/>\n            <property name=\"allowSamelineParameterizedAnnotation\" value=\"false\"/>\n        </module>\n        <module name=\"AnnotationLocation\">\n            <property name=\"tokens\" value=\"VARIABLE_DEF\"/>\n            <property name=\"allowSamelineMultipleAnnotations\" value=\"true\"/>\n            <property name=\"allowSamelineSingleParameterlessAnnotation\" value=\"true\"/>\n            <property name=\"allowSamelineParameterizedAnnotation\" value=\"true\"/>\n        </module>\n\n\n        <!-- Blocks Checks                                            -->\n        <!-- See http://checkstyle.sourceforge.net/config_blocks.html -->\n        <module name=\"EmptyBlock\">\n            <property name=\"tokens\" value=\"LITERAL_WHILE,LITERAL_TRY,LITERAL_FINALLY,LITERAL_DO,LITERAL_IF,LITERAL_ELSE,LITERAL_FOR,INSTANCE_INIT,STATIC_INIT,LITERAL_SWITCH\"/>\n        </module>\n        <!--module name=\"EmptyCatchBlock\"/-->\n        <module name=\"LeftCurly\">\n            <property name=\"maxLineLength\" value=\"120\"/>\n        </module>\n        <module name=\"NeedBraces\"/>\n        <module name=\"RightCurly\"/>\n        <module name=\"AvoidNestedBlocks\"/>\n\n\n        <!-- Class Design                                             -->\n        <!-- See http://checkstyle.sourceforge.net/config_design.html -->\n        <!--module name=\"VisibilityModifier\"/-->\n        <!--module name=\"FinalClass\"/-->\n        <module name=\"InterfaceIsType\"/>\n        <module name=\"HideUtilityClassConstructor\"/>\n        <!--module name=\"DesignForExtension\"/-->\n        <!--module name=\"MutableException\"/-->\n        <!--module name=\"ThrowsCount\"/-->\n        <module name=\"InnerTypeLast\"/>\n        <module name=\"OneTopLevelClass\"/>\n\n\n        <!-- Coding                                                   -->\n        <!-- See http://checkstyle.sourceforge.net/config_coding.html -->\n        <!--module name=\"ArrayTrailingComma\"/-->\n        <!--module name=\"AvoidInlineConditionals\"/-->\n        <module name=\"CovariantEquals\"/>\n        <module name=\"EmptyStatement\"/>\n        <!--module name=\"EqualsAvoidNull\"/-->\n        <module name=\"EqualsHashCode\"/>\n        <!--module name=\"FinalLocalVariable\"/-->\n        <!--module name=\"HiddenField\"/-->\n        <module name=\"IllegalInstantiation\"/>\n        <!--module name=\"IllegalToken\"/-->\n        <!--module name=\"IllegalTokenText\"/-->\n        <module name=\"InnerAssignment\"/>\n        <!--module name=\"MagicNumber\"/-->\n        <!--module name=\"MissingSwitchDefault\"/-->\n        <!--module name=\"ModifiedControlVariable\"/-->\n        <module name=\"SimplifyBooleanExpression\"/>\n        <module name=\"SimplifyBooleanReturn\"/>\n        <module name=\"StringLiteralEquality\"/>\n        <!--module name=\"NestedForDepth\"/-->\n        <!--module name=\"NestedIfDepth\"/-->\n        <!--module name=\"NestedTryDepth\"/-->\n        <module name=\"NoClone\"/>\n        <module name=\"NoFinalizer\"/>\n        <module name=\"SuperClone\"/>\n        <!--module name=\"SuperFinalize\"/-->\n        <!--module name=\"IllegalCatch\"/-->\n        <!--module name=\"IllegalThrows\"/-->\n        <module name=\"PackageDeclaration\"/>\n        <!--module name=\"ReturnCount\"/-->\n        <!--module name=\"IllegalType\"/-->\n        <module name=\"DeclarationOrder\"/>\n        <!--module name=\"ParameterAssignment\"/-->\n        <!--module name=\"ExplicitInitialization\"/-->\n        <module name=\"DefaultComesLast\"/>\n        <!--module name=\"MissingCtor\"/-->\n        <module name=\"FallThrough\"/>\n        <!--module name=\"MultipleStringLiterals\"/-->\n        <module name=\"MultipleVariableDeclarations\"/>\n        <!--module name=\"RequireThis\"/-->\n        <!--module name=\"UnnecessaryParentheses\"/-->\n        <module name=\"OneStatementPerLine\"/>\n        <!--module name=\"VariableDeclarationUsageDistance\"/-->\n        <module name=\"OverloadMethodsDeclarationOrder\"/>\n\n\n        <!-- Headers                                                  -->\n        <!-- See http://checkstyle.sourceforge.net/config_header.html -->\n        <!--module name=\"Header\"/-->\n        <!--module name=\"RegexpHeader\"/-->\n\n\n        <!-- Imports                                                   -->\n        <!-- See http://checkstyle.sourceforge.net/config_imports.html -->\n        <module name=\"AvoidStarImport\"/>\n        <!--module name=\"AvoidStaticImport\"/-->\n        <module name=\"IllegalImport\"/>\n        <module name=\"RedundantImport\"/>\n        <module name=\"UnusedImports\">\n            <property name=\"processJavadoc\" value=\"true\"/>\n        </module>\n        <!--module name=\"ImportOrder\"/-->\n        <!--module name=\"ImportControl\"/-->\n        <!--module name=\"CustomImportOrder\"/-->\n\n\n        <!-- Javadoc Comments                                          -->\n        <!-- See http://checkstyle.sourceforge.net/config_javadoc.html -->\n        <module name=\"JavadocType\">\n            <property name=\"scope\" value=\"public\"/>\n        </module>\n        <module name=\"JavadocMethod\">\n            <property name=\"scope\" value=\"public\"/>\n            <property name=\"tokens\" value=\"METHOD_DEF\" /> <!-- Constructors don't always need Javadoc -->\n        </module>\n        <!--module name=\"JavadocVariable\"/-->\n        <!--module name=\"JavadocStyle\"/-->\n        <!--module name=\"WriteTag\"/-->\n        <!--module name=\"NonEmptyAtclauseDescription\"/-->\n        <!--module name=\"JavadocTagContinuationIndentation\"/-->\n        <!--module name=\"SummaryJavadoc\"/-->\n        <!--module name=\"AtclauseOrder\"/-->\n        <!--module name=\"JavadocParagraph\"/-->\n        <!--module name=\"SingleLineJavadoc\"/-->\n\n\n        <!-- Metrics                                               -->\n        <!-- http://checkstyle.sourceforge.net/config_metrics.html -->\n        <!--module name=\"BooleanExpressionComplexity\"/-->\n        <!--module name=\"ClassDataAbstractionCoupling\"/-->\n        <!--module name=\"ClassFanOutComplexity\"/-->\n        <!--module name=\"CyclomaticComplexity\"/-->\n        <!--module name=\"NPathComplexity\"/-->\n        <!--module name=\"JavaNCSS\"/-->\n\n\n        <!-- Miscellaneous                                          -->\n        <!-- See http://checkstyle.sourceforge.net/config_misc.html -->\n        <module name=\"TodoComment\">\n            <property name=\"format\" value=\"\\bTODO\\b.*\"/>\n        </module>\n        <module name=\"TodoComment\">\n            <property name=\"format\" value=\"\\btodo\\b.*\"/>\n        </module>\n        <module name=\"TodoComment\">\n            <property name=\"format\" value=\"\\bFIXME\\b.*\"/>\n        </module>\n        <module name=\"TodoComment\">\n            <property name=\"format\" value=\"\\bfixme\\b.*\"/>\n        </module>\n        <!--module name=\"CommentsIndentation\"/-->\n        <!--module name=\"UncommentedMain\"/-->\n        <module name=\"UpperEll\"/>\n        <module name=\"ArrayTypeStyle\"/>\n        <!--module name=\"FinalParameters\"/-->\n        <!--module name=\"DescendantToken\"/-->\n        <module name=\"Indentation\">\n            <property name=\"basicOffset\" value=\"2\"/>\n            <property name=\"caseIndent\" value=\"2\"/>\n        </module>\n        <module name=\"TrailingComment\"/>\n        <module name=\"OuterTypeFilename\"/>\n        <!--module name=\"UniqueProperties\"/-->\n        <!--module name=\"AvoidEscapedUnicodeCharacters\"/-->\n\n\n        <!-- Modifiers                                                  -->\n        <!-- See http://checkstyle.sourceforge.net/config_modifier.html -->\n        <module name=\"ModifierOrder\"/>\n        <module name=\"RedundantModifier\">\n            <property name=\"severity\" value=\"ignore\"/>\n        </module>\n\n\n        <!-- Naming Conventions                                       -->\n        <!-- See http://checkstyle.sourceforge.net/config_naming.html -->\n        <!--module name=\"AbstractClassName\"/-->\n        <module name=\"ClassTypeParameterName\">\n            <property name=\"format\" value=\"([A-Z][a-z]*T)|[A-Z]\"/>\n        </module>\n        <module name=\"ConstantName\"/>\n        <module name=\"LocalFinalVariableName\"/>\n        <module name=\"LocalVariableName\"/>\n        <module name=\"MemberName\">\n            <property name=\"applyToPublic\" value=\"true\"/>\n            <property name=\"applyToPackage\" value=\"true\"/>\n            <property name=\"applyToProtected\" value=\"false\"/>\n            <property name=\"applyToPrivate\" value=\"false\"/>\n            <property name=\"format\" value=\"^[a-z][a-zA-Z0-9]*$\"/>\n        </module>\n        <module name=\"MethodName\"/>\n        <module name=\"MethodTypeParameterName\">\n            <property name=\"format\" value=\"([A-Z][a-z]*T)|[A-Z]\"/>\n        </module>\n        <module name=\"InterfaceTypeParameterName\">\n            <property name=\"format\" value=\"([A-Z][a-z]*T)|[A-Z]\"/>\n        </module>\n        <module name=\"PackageName\"/>\n        <module name=\"ParameterName\"/>\n        <module name=\"StaticVariableName\"/>\n        <module name=\"TypeName\"/>\n        <!--module name=\"AbbreviationAsWordInName\"/-->\n\n\n        <!-- Regexp                                               -->\n        <!-- http://checkstyle.sourceforge.net/config_regexp.html -->\n        <!--module name=\"Regexp\"/-->\n        <!--module name=\"RegexpSingleLineJava\"-->\n\n\n        <!-- Size Violations                                         -->\n        <!-- See http://checkstyle.sourceforge.net/config_sizes.html -->\n        <!--module name=\"ExecutableStatementCount\"/-->\n        <module name=\"LineLength\">\n            <property name=\"max\" value=\"120\"/>\n            <property name=\"ignorePattern\" value=\"^(package|import) .+?;$\"/>\n        </module>\n        <module name=\"MethodLength\">\n            <property name=\"max\" value=\"250\"/>\n        </module>\n        <!--module name=\"AnonInnerLength\"/-->\n        <!--module name=\"ParameterNumber\"/-->\n        <!--module name=\"OuterTypeNumber\"/-->\n        <!--module name=\"MethodCount\"/-->\n\n\n        <!-- Whitespace                                                   -->\n        <!-- See http://checkstyle.sourceforge.net/config_whitespace.html -->\n        <module name=\"GenericWhitespace\"/>\n        <module name=\"EmptyForInitializerPad\"/>\n        <module name=\"EmptyForIteratorPad\"/>\n        <module name=\"MethodParamPad\"/>\n        <module name=\"NoWhitespaceAfter\">\n            <property name=\"tokens\" value=\"BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS\"/>\n        </module>\n        <module name=\"NoWhitespaceBefore\"/>\n        <module name=\"OperatorWrap\"/>\n        <module name=\"ParenPad\"/>\n        <module name=\"TypecastParenPad\"/>\n        <module name=\"WhitespaceAfter\"/>\n        <module name=\"WhitespaceAround\"/>\n        <module name=\"NoLineWrap\"/>\n        <!--module name=\"EmptyLineSeparator\"/-->\n        <!--module name=\"SeparatorWrap\"/-->\n    </module>\n\n\n    <!-- Regexp                                               -->\n    <!-- http://checkstyle.sourceforge.net/config_regexp.html -->\n    <module name=\"RegexpSingleline\">\n        <property name=\"format\" value=\"\\s+$\"/>\n        <property name=\"message\" value=\"Line has trailing spaces.\"/>\n    </module>\n\n    <module name=\"RegexpMultiline\">\n        <property name=\"format\" value=\"\\n\\n\\n\"/>\n        <property name=\"message\" value=\"Double blank lines.\"/>\n    </module>\n\n    <module name=\"SuppressionFilter\">\n        <property name=\"file\" value=\"config/checkstyle/checkstyle-suppressions.xml\"/>\n    </module>\n</module>\n"
  },
  {
    "path": "config/lint/lint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n  ~ Copyright (c) 2018. Uber Technologies\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~    http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n<lint>\n    <issue id=\"AppCompatCustomView\" severity=\"ignore\" />\n    <issue id=\"GoogleAppIndexingWarning\" severity=\"ignore\" />\n    <issue id=\"GradleCompatible\" severity=\"ignore\" />\n    <issue id=\"IconLauncherFormat\" severity=\"ignore\" />\n</lint>\n"
  },
  {
    "path": "gradle/checkstyle.gradle",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nsubprojects {\n    buildscript {\n        repositories {\n            jcenter()\n        }\n    }\n\n    repositories {\n        jcenter()\n        maven {\n            url 'https://maven.google.com'\n        }\n    }\n\n    apply plugin: 'checkstyle'\n\n    afterEvaluate {\n        def checkstyleConfig = rootProject.file('config/checkstyle/checkstyle.xml')\n        if (project.getPlugins().hasPlugin('com.android.application') ||\n                project.getPlugins().hasPlugin('com.android.library')) {\n\n            task checkstyleMain(type: Checkstyle) {\n                ignoreFailures = false\n                showViolations = true\n                source 'src/main', 'src/release'\n                include '**/*.java'\n                exclude '**/gen/**'\n                exclude '**/R.java'\n                exclude '**/BuildConfig.java'\n                reports {\n                    xml.destination \"$project.buildDir/reports/checkstyle/main.xml\"\n                }\n                classpath = files()\n                configFile = checkstyleConfig\n            }\n\n            task checkstyleTest(type: Checkstyle){\n                ignoreFailures = false\n                showViolations = true\n                source 'src/test', 'src/androidTest'\n                include '**/*.java'\n                exclude '**/gen/**'\n                exclude '**/R.java'\n                exclude '**/BuildConfig.java'\n                reports {\n                    xml.destination \"$project.buildDir/reports/checkstyle/test.xml\"\n                }\n                classpath = files()\n                configFile = checkstyleConfig\n            }\n\n            task checkstyle(dependsOn:['checkstyleMain', 'checkstyleTest']){\n                description 'Runs Checkstyle inspection against Android sourcesets.'\n                group = 'Code Quality'\n            }\n\n            project.tasks.getByName(\"check\").dependsOn \"checkstyle\"\n        } else {\n            checkstyle {\n                ignoreFailures = false\n                showViolations = true\n                configFile checkstyleConfig\n            }                    \n        }\n\n        tasks.withType(Checkstyle) {\n                configProperties = ['proj.module.dir'      : projectDir.absolutePath,\n                          'checkstyle.cache.file': './build/cache/checkstyle-cache']\n            }\n    }\n}\n"
  },
  {
    "path": "gradle/dependencies.gradle",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\ndef versions = [\n    kotlin    : \"1.3.10\"\n]\n\ndef androidx = [\n    annotations      : \"androidx.annotation:annotation:1.0.0\",\n    appcompat        : \"androidx.appcompat:appcompat:1.0.0\",\n    constraintLayout : \"androidx.constraintlayout:constraintlayout:1.1.2\"\n]\n\ndef apt = [\n    autoService : \"com.google.auto.service:auto-service:1.0-rc4\"\n]\n\ndef build = [\n    androidPlugin       : \"com.android.tools.build:gradle:3.2.1\",\n    buildToolsVersion   : \"28.0.3\",\n    compileSdkVersion   : 28,\n    ci: 'true' == System.getenv('CI'),\n    googleJavaFormatter : \"com.google.googlejavaformat:google-java-format:1.4\",\n    gradleAptPlugin     : \"net.ltgt.gradle:gradle-apt-plugin:0.18\",\n    gradlePluginsUrl    : \"https://plugins.gradle.org/m2/\",\n    minSdkVersion       : 19,\n    targetSdkVersion    : 28\n]\n\ndef external = [\n    resourcesPoet : \"com.commit451:resourcespoet:2.1.0\"\n]\n\ndef kotlin = [\n    gradlePlugin : \"org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}\",\n    stdLibJdk7   : \"org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}\",\n    stdLibJdk8   : \"org.jetbrains.kotlin:kotlin-stdlib-jdk8:${versions.kotlin}\"\n]\n\ndef test = [\n    junit          : 'junit:junit:4.12',\n    truth          : \"com.google.truth:truth:0.40\"\n]\n\next.deps = [\n    \"androidx\"  : androidx,\n    \"apt\"       : apt,\n    \"build\"     : build,\n    \"external\"  : external,\n    \"kotlin\"    : kotlin,\n    \"test\"      : test,\n    \"versions\"  : versions\n]\n\n"
  },
  {
    "path": "gradle/gradle-mvn-push.gradle",
    "content": "/*\n * Copyright (C) Chris Banes\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\napply plugin: 'maven'\napply plugin: 'signing'\n\nversion = VERSION_NAME\ngroup = GROUP\n\ndef isReleaseBuild() {\n  return VERSION_NAME.contains(\"SNAPSHOT\") == false\n}\n\ndef getReleaseRepositoryUrl() {\n  return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL\n          : \"https://oss.sonatype.org/service/local/staging/deploy/maven2/\"\n}\n\ndef getSnapshotRepositoryUrl() {\n  return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL\n          : \"https://oss.sonatype.org/content/repositories/snapshots/\"\n}\n\ndef getRepositoryUsername() {\n  return hasProperty('SONATYPE_NEXUS_USERNAME') ? SONATYPE_NEXUS_USERNAME : \"\"\n}\n\ndef getRepositoryPassword() {\n  return hasProperty('SONATYPE_NEXUS_PASSWORD') ? SONATYPE_NEXUS_PASSWORD : \"\"\n}\n\nafterEvaluate { project ->\n  uploadArchives {\n    repositories {\n      mavenDeployer {\n        beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }\n\n        pom.groupId = GROUP\n        pom.artifactId = POM_ARTIFACT_ID\n        pom.version = VERSION_NAME\n\n        repository(url: getReleaseRepositoryUrl()) {\n          authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())\n        }\n        snapshotRepository(url: getSnapshotRepositoryUrl()) {\n          authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())\n        }\n\n        pom.project {\n          name POM_NAME\n          packaging POM_PACKAGING\n          description POM_DESCRIPTION\n          url POM_URL\n\n          scm {\n            url POM_SCM_URL\n            connection POM_SCM_CONNECTION\n            developerConnection POM_SCM_DEV_CONNECTION\n          }\n\n          licenses {\n            license {\n              name POM_LICENCE_NAME\n              url POM_LICENCE_URL\n              distribution POM_LICENCE_DIST\n            }\n          }\n\n          developers {\n            developer {\n              id POM_DEVELOPER_ID\n              name POM_DEVELOPER_NAME\n            }\n          }\n        }\n      }\n    }\n  }\n\n  signing {\n    required { isReleaseBuild() && gradle.taskGraph.hasTask(\"uploadArchives\") }\n    sign configurations.archives\n  }\n\n  if (project.getPlugins().hasPlugin('com.android.application') ||\n          project.getPlugins().hasPlugin('com.android.library')) {\n    task install(type: Upload, dependsOn: assemble) {\n      repositories.mavenInstaller {\n        configuration = configurations.archives\n\n        pom.groupId = GROUP\n        pom.artifactId = POM_ARTIFACT_ID\n        pom.version = VERSION_NAME\n\n        pom.project {\n          name POM_NAME\n          packaging POM_PACKAGING\n          description POM_DESCRIPTION\n          url POM_URL\n\n          scm {\n            url POM_SCM_URL\n            connection POM_SCM_CONNECTION\n            developerConnection POM_SCM_DEV_CONNECTION\n          }\n\n          licenses {\n            license {\n              name POM_LICENCE_NAME\n              url POM_LICENCE_URL\n              distribution POM_LICENCE_DIST\n            }\n          }\n\n          developers {\n            developer {\n              id POM_DEVELOPER_ID\n              name POM_DEVELOPER_NAME\n            }\n          }\n        }\n      }\n    }\n\n    task androidJavadocs(type: Javadoc) {\n      if (!project.plugins.hasPlugin('kotlin-android')) {\n        source = android.sourceSets.main.java.srcDirs\n      }\n      classpath += project.files(android.getBootClasspath().join(File.pathSeparator))\n      exclude '**/internal/*'\n\n      if (JavaVersion.current().isJava8Compatible()) {\n        options.addStringOption('Xdoclint:none', '-quiet')\n      }\n    }\n\n    task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {\n      classifier = 'javadoc'\n      from androidJavadocs.destinationDir\n    }\n\n    task androidSourcesJar(type: Jar) {\n      classifier = 'sources'\n      from android.sourceSets.main.java.sourceFiles\n    }\n  } else {\n    install {\n      repositories.mavenInstaller {\n        pom.groupId = GROUP\n        pom.artifactId = POM_ARTIFACT_ID\n        pom.version = VERSION_NAME\n\n        pom.project {\n          name POM_NAME\n          packaging POM_PACKAGING\n          description POM_DESCRIPTION\n          url POM_URL\n\n          scm {\n            url POM_SCM_URL\n            connection POM_SCM_CONNECTION\n            developerConnection POM_SCM_DEV_CONNECTION\n          }\n\n          licenses {\n            license {\n              name POM_LICENCE_NAME\n              url POM_LICENCE_URL\n              distribution POM_LICENCE_DIST\n            }\n          }\n\n          developers {\n            developer {\n              id POM_DEVELOPER_ID\n              name POM_DEVELOPER_NAME\n            }\n          }\n        }\n      }\n    }\n\n    task sourcesJar(type: Jar, dependsOn: classes) {\n      classifier = 'sources'\n      from sourceSets.main.allSource\n    }\n\n    task javadocJar(type: Jar, dependsOn: javadoc) {\n      classifier = 'javadoc'\n      from javadoc.destinationDir\n    }\n  }\n\n  if (JavaVersion.current().isJava8Compatible()) {\n    allprojects {\n      tasks.withType(Javadoc) {\n        options.addStringOption('Xdoclint:none', '-quiet')\n      }\n    }\n  }\n\n  artifacts {\n    if (project.getPlugins().hasPlugin('com.android.application') ||\n            project.getPlugins().hasPlugin('com.android.library')) {\n      archives androidSourcesJar\n      archives androidJavadocsJar\n    } else {\n      archives sourcesJar\n      archives javadocJar\n    }\n  }\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-4.7-all.zip\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "gradle.properties",
    "content": "#\n# Copyright (c) 2018. Uber Technologies\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n\nGROUP=com.uber.stylist\nVERSION_NAME=0.0.3-SNAPSHOT\nPOM_DESCRIPTION=A Gradle plugin that generates a base set of XML themes\nPOM_URL=https://github.com/uber/stylist/\nPOM_SCM_URL=https://github.com/uber/stylist/\nPOM_SCM_CONNECTION=scm:git:git://github.com/uber/stylist.git\nPOM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/uber/stylist.git\nPOM_LICENCE_NAME=The Apache Software License, Version 2.0\nPOM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt\nPOM_LICENCE_DIST=repo\nPOM_DEVELOPER_ID=uber\nPOM_DEVELOPER_NAME=Uber Technologies\n\nandroid.useAndroidX=true\nandroid.enableJetifier=true\n"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env sh\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn () {\n    echo \"$*\"\n}\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\n  NONSTOP* )\n    nonstop=true\n    ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" -a \"$nonstop\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Escape application args\nsave () {\n    for i do printf %s\\\\n \"$i\" | sed \"s/'/'\\\\\\\\''/g;1s/^/'/;\\$s/\\$/' \\\\\\\\/\" ; done\n    echo \" \"\n}\nAPP_ARGS=$(save \"$@\")\n\n# Collect all arguments for the java command, following the shell quoting and substitution rules\neval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS \"\\\"-Dorg.gradle.appname=$APP_BASE_NAME\\\"\" -classpath \"\\\"$CLASSPATH\\\"\" org.gradle.wrapper.GradleWrapperMain \"$APP_ARGS\"\n\n# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong\nif [ \"$(uname)\" = \"Darwin\" ] && [ \"$HOME\" = \"$PWD\" ]; then\n  cd \"$(dirname \"$0\")\"\nfi\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "sample/app/build.gradle",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\napply plugin: 'com.android.application'\n\nandroid {\n    compileSdkVersion deps.build.compileSdkVersion\n    buildToolsVersion deps.build.buildToolsVersion\n\n    defaultConfig {\n        applicationId \"com.uber.stylist.myapplication\"\n        minSdkVersion deps.build.minSdkVersion\n        targetSdkVersion deps.build.targetSdkVersion\n        versionCode 1\n        versionName \"1.0\"\n    }\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_1_7\n        targetCompatibility JavaVersion.VERSION_1_7\n    }\n\n    // Setup a simple lint config for an android app/library.\n    lintOptions {\n        abortOnError true\n        lintConfig rootProject.file('config/lint/lint.xml')\n    }\n}\n\ndependencies {\n    implementation project(\":sample:library\")\n    implementation deps.androidx.appcompat\n    implementation deps.androidx.constraintLayout\n}\n"
  },
  {
    "path": "sample/app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  ~ Copyright (c) 2018. Uber Technologies\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~    http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.uber.stylist.myapplication\">\n\n    <application\n        android:allowBackup=\"false\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:roundIcon=\"@mipmap/ic_launcher_round\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/AppTheme\">\n        <activity android:name=\".MainActivity\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n    </application>\n\n</manifest>\n"
  },
  {
    "path": "sample/app/src/main/java/com/uber/stylist/myapplication/MainActivity.java",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.uber.stylist.myapplication;\n\nimport android.os.Bundle;\nimport androidx.appcompat.app.AppCompatActivity;\n\n/**\n * Sample activity.\n */\npublic class MainActivity extends AppCompatActivity {\n\n  @Override\n  protected void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n    setContentView(R.layout.activity_main);\n  }\n}\n"
  },
  {
    "path": "sample/app/src/main/res/drawable/divider.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  ~ Copyright (c) 2018. Uber Technologies\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~    http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n  android:shape=\"rectangle\">\n  <solid android:color=\"@android:color/transparent\" />\n  <size\n    android:width=\"1dp\"\n    android:height=\"@dimen/element_spacing\" />\n</shape>\n"
  },
  {
    "path": "sample/app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  ~ Copyright (c) 2018. Uber Technologies\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~    http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/frame\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:layout_marginLeft=\"16dp\">\n\n    <TextView\n        android:id=\"@+id/textView\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"?textSizeLarge\"\n        android:text=\"TextView\"\n        app:layout_constraintBottom_toTopOf=\"@+id/editText\"\n        app:layout_constraintTop_toTopOf=\"parent\">\n        <requestFocus/>\n    </TextView>\n\n    <EditText\n        android:id=\"@+id/editText\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:ems=\"10\"\n        android:inputType=\"textPersonName\"\n        android:hint=\"Name\"\n        app:layout_constraintBottom_toTopOf=\"@+id/button\"\n        app:layout_constraintTop_toBottomOf=\"@+id/textView\" />\n\n    <Button\n        android:id=\"@+id/button\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Button\"\n        app:layout_constraintBottom_toTopOf=\"@+id/switch1\"\n        app:layout_constraintTop_toBottomOf=\"@+id/editText\" />\n\n    <Switch\n        android:id=\"@+id/switch1\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:paddingStart=\"4dp\"\n        android:text=\"Switch\"\n        android:checked=\"true\"\n        app:layout_constraintBottom_toBottomOf=\"parent\"\n        app:layout_constraintTop_toBottomOf=\"@+id/button\" />\n\n</androidx.constraintlayout.widget.ConstraintLayout>\n"
  },
  {
    "path": "sample/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  ~ Copyright (c) 2018. Uber Technologies\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~    http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@color/ic_launcher_background\"/>\n    <foreground android:drawable=\"@mipmap/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "sample/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  ~ Copyright (c) 2018. Uber Technologies\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~    http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@color/ic_launcher_background\"/>\n    <foreground android:drawable=\"@mipmap/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "sample/app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  ~ Copyright (c) 2018. Uber Technologies\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~    http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<resources>\n    <color name=\"colorPrimary\">#3F51B5</color>\n    <color name=\"colorPrimaryDark\">#303F9F</color>\n    <color name=\"colorAccent\">#FF4081</color>\n</resources>\n"
  },
  {
    "path": "sample/app/src/main/res/values/dimens.xml",
    "content": "<!--\n  ~ Copyright (c) 2018. Uber Technologies\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~    http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<resources>\n    <!-- Default screen margins, per the Android Design guidelines. -->\n    <dimen name=\"activity_horizontal_margin\">16dp</dimen>\n    <dimen name=\"activity_vertical_margin\">16dp</dimen>\n    <dimen name=\"element_spacing\">16dp</dimen>\n</resources>\n"
  },
  {
    "path": "sample/app/src/main/res/values/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  ~ Copyright (c) 2018. Uber Technologies\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~    http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<resources>\n    <color name=\"ic_launcher_background\">#000000</color>\n</resources>"
  },
  {
    "path": "sample/app/src/main/res/values/strings.xml",
    "content": "<!--\n  ~ Copyright (c) 2018. Uber Technologies\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~    http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<resources>\n    <string name=\"app_name\">Stylist Sample</string>\n</resources>\n"
  },
  {
    "path": "sample/app/src/main/res/values/themes.xml",
    "content": "<!--\n  ~ Copyright (c) 2018. Uber Technologies\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~    http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<resources>\n    <style name=\"AppTheme\" parent=\"Theme.Sample\"/>\n    <style name=\"AppTheme.Dialog.Light\" parent=\"Theme.Sample.Light.Dialog\"/>\n</resources>\n"
  },
  {
    "path": "sample/library/build.gradle",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\napply plugin: 'com.android.library'\nif (project.rootProject.name != 'buildSrc') {\n    apply plugin: 'com.uber.stylist'\n}\n\nandroid {\n    compileSdkVersion deps.build.compileSdkVersion\n    buildToolsVersion deps.build.buildToolsVersion\n\n    defaultConfig {\n        minSdkVersion deps.build.minSdkVersion\n        targetSdkVersion deps.build.targetSdkVersion\n    }\n\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_1_7\n        targetCompatibility JavaVersion.VERSION_1_7\n    }\n\n    // Setup a simple lint config for an android app/library.\n    lintOptions {\n        abortOnError false\n        lintConfig rootProject.file('config/lint/lint.xml')\n    }\n}\n\ndependencies {\n    implementation deps.androidx.appcompat\n}\n"
  },
  {
    "path": "sample/library/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  ~ Copyright (c) 2018. Uber Technologies\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~    http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.uber.stylist.mylibrary\"/>\n"
  },
  {
    "path": "sample/library/src/main/java/com/uber/stylist/mylibrary/MyUtils.java",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.uber.stylist.mylibrary;\n\n/**\n * Sample utilities class.\n */\npublic final class MyUtils {\n\n  private MyUtils() { }\n}\n"
  },
  {
    "path": "sample/library/src/main/res/values/attrs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  ~ Copyright (c) 2018. Uber Technologies\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~    http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<resources>\n  <attr name=\"textSizeSmall\"/>\n  <attr name=\"textSizeMedium\"/>\n  <attr name=\"textSizeLarge\"/>\n\n  <attr name=\"dialogSpecificAttr1\"/>\n  <attr name=\"dialogSpecificAttr2\"/>\n</resources>\n"
  },
  {
    "path": "sample/library/src/main/res/values/strings.xml",
    "content": "<!--\n  ~ Copyright (c) 2018. Uber Technologies\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~    http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<resources>\n    <string name=\"app_name\">My Application</string>\n</resources>\n"
  },
  {
    "path": "sample/providers/build.gradle",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nbuildscript {\n    repositories {\n        maven { url deps.build.gradlePluginsUrl }\n    }\n\n    dependencies {\n        classpath deps.build.gradleAptPlugin\n    }\n}\n\napply plugin: 'net.ltgt.apt'\napply plugin: \"java-library\"\n\nsourceCompatibility = JavaVersion.VERSION_1_7\ntargetCompatibility = JavaVersion.VERSION_1_7\n\ndependencies {\n    annotationProcessor deps.apt.autoService\n    compileOnly deps.apt.autoService\n\n    implementation deps.androidx.annotations\n    implementation project(\":stylist-api\")\n}\n"
  },
  {
    "path": "sample/providers/src/main/java/com/uber/stylist/myproviders/SampleThemeStencilProvider.java",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.uber.stylist.myproviders;\n\nimport androidx.annotation.NonNull;\n\nimport com.google.auto.service.AutoService;\nimport com.uber.stylist.api.StyleItem;\nimport com.uber.stylist.api.StyleItemGroup;\nimport com.uber.stylist.api.ThemeStencil;\nimport com.uber.stylist.api.ThemeStencilProvider;\n\nimport java.util.Arrays;\nimport java.util.LinkedHashSet;\nimport java.util.Set;\n\n/**\n * Sample provider for the themes to generate.\n */\n@AutoService(ThemeStencilProvider.class)\npublic class SampleThemeStencilProvider implements ThemeStencilProvider {\n\n  private StyleItemGroup basicAppColors = new StyleItemGroup(\n      new StyleItem(\"colorPrimary\", \"@color/colorPrimary\"),\n      new StyleItem(\"colorPrimaryDark\", \"@color/colorPrimaryDark\"),\n      new StyleItem(\"colorAccent\", \"@color/colorAccent\")\n  );\n\n  private StyleItemGroup textSizes = new StyleItemGroup(\n      new StyleItem(\"textSizeSmall\", \"12dp\"),\n      new StyleItem(\"textSizeMedium\", \"16dp\"),\n      new StyleItem(\"textSizeLarge\", \"20dp\")\n  );\n\n  private StyleItemGroup dialogAttrs = new StyleItemGroup(\n      new StyleItem(\"dialogSpecificAttr1\", \"foo\"),\n      new StyleItem(\"dialogSpecificAttr2\", \"bar\")\n  );\n\n  /**\n   *\n   * @return a set of theme stencils\n   */\n  @NonNull\n  @Override\n  public Set<ThemeStencil> stencils() {\n    return new LinkedHashSet<>(Arrays.asList(\n        new ThemeStencil(\"Theme.Sample\", \"Theme.AppCompat\"),\n        new ThemeStencil(\"Theme.Sample.Light\", \"Theme.AppCompat.Light\"),\n        new ThemeStencil(\"Theme.Sample.Dialog\", \"Theme.AppCompat.Dialog\", dialogAttrs),\n        new ThemeStencil(\"Theme.Sample.Light.Dialog\", \"Theme.AppCompat.Light.Dialog\", dialogAttrs)\n    ));\n  }\n\n  /**\n   *\n   * @return a set of StyleItemGroups\n   */\n  @NonNull\n  @Override\n  public Set<StyleItemGroup> globalStyleItemGroups() {\n    return new LinkedHashSet<>(Arrays.asList(\n        basicAppColors,\n        textSizes\n    ));\n  }\n}\n"
  },
  {
    "path": "settings.gradle",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\ninclude ':stylist'\ninclude ':stylist-api'\ninclude ':stylist-core'\ninclude ':sample:app'\ninclude ':sample:library'\ninclude ':sample:providers'\n"
  },
  {
    "path": "stylist/build.gradle",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\napply plugin: \"org.jetbrains.kotlin.jvm\"\n\nsourceCompatibility = JavaVersion.VERSION_1_8\ntargetCompatibility = JavaVersion.VERSION_1_8\n\ndependencies {\n    compileOnly gradleApi()\n\n    implementation deps.build.androidPlugin\n    implementation deps.kotlin.stdLibJdk8\n    implementation project(\":stylist-core\")\n}\n\nif (rootProject.projectDir.name != \"buildSrc\") {\n    apply from: rootProject.file('gradle/gradle-mvn-push.gradle')\n}\n"
  },
  {
    "path": "stylist/gradle.properties",
    "content": "#\n# Copyright (c) 2018. Uber Technologies\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nPOM_NAME=stylist\nPOM_ARTIFACT_ID=stylist\nPOM_PACKAGING=jar\n"
  },
  {
    "path": "stylist/src/main/kotlin/com/uber/stylist/StylistExtension.kt",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.uber.stylist\n\nimport com.uber.stylist.Stylist.DEFAULT_THEMES_XML_FILENAME\n\n/**\n * Gradle task extension that allows for customizing the behavior of Stylist.\n */\nclass StylistExtension {\n\n  /**\n   * Optional setting to control the name of the generated themes.xml file. Defaults to\n   * \"themes_stylist_generated.xml\" as defined in [Stylist.DEFAULT_THEMES_XML_FILENAME].\n   */\n  var themesXmlFilename: String = DEFAULT_THEMES_XML_FILENAME\n\n  /**\n   * Optional setting to control whether the source is formatted with Google Java Format. Defaults to true.\n   */\n  var formatSource: Boolean = true\n}\n"
  },
  {
    "path": "stylist/src/main/kotlin/com/uber/stylist/StylistPlugin.kt",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.uber.stylist\n\nimport com.android.build.gradle.AppExtension\nimport com.android.build.gradle.AppPlugin\nimport com.android.build.gradle.LibraryExtension\nimport com.android.build.gradle.LibraryPlugin\nimport com.android.build.gradle.api.BaseVariant\nimport com.uber.stylist.internal.util.resolveVariantOutputDir\nimport org.gradle.api.DomainObjectSet\nimport org.gradle.api.Plugin\nimport org.gradle.api.Project\n\n/**\n * Gradle plugin that creates and configures a [StylistTask] for Android library and app modules.\n */\nclass StylistPlugin : Plugin<Project> {\n\n  companion object {\n    private const val STYLIST = \"stylist\"\n  }\n\n  private val stylistExtension = StylistExtension()\n\n  override fun apply(project: Project) {\n    project.extensions.add(STYLIST, stylistExtension)\n    project.afterEvaluate {\n      project.plugins.all {\n        when (it) {\n          is AppPlugin -> with(project.extensions.getByType(AppExtension::class.java)) {\n            configureAndroid(project, applicationVariants)\n          }\n          is LibraryPlugin -> with(project.extensions.getByType(LibraryExtension::class.java)) {\n            configureAndroid(project, libraryVariants)\n          }\n        }\n      }\n    }\n  }\n\n  private fun <T : BaseVariant> configureAndroid(\n      project: Project,\n      variants: DomainObjectSet<T>) {\n    val generateThemes = project.task(\"generateThemes\")\n    variants.all { variant ->\n      val outputDir = resolveVariantOutputDir(project, variant, STYLIST)\n      val stylistTask = project.tasks.create(\n          \"generate${variant.name.capitalize()}Themes\", StylistTask::class.java)\n          .apply {\n            group = STYLIST\n            outputDirectory = outputDir\n            description = \"Generate ${variant.name} base themes.\"\n            themesXmlFilename = stylistExtension.themesXmlFilename\n            formatSource = stylistExtension.formatSource\n          }\n      stylistTask.outputs.dir(outputDir)\n      generateThemes.dependsOn(stylistTask)\n\n      variant.registerResGeneratingTask(stylistTask, stylistTask.outputDirectory)\n    }\n  }\n}\n"
  },
  {
    "path": "stylist/src/main/kotlin/com/uber/stylist/StylistTask.kt",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.uber.stylist\n\nimport com.uber.stylist.Stylist.DEFAULT_THEMES_XML_FILENAME\nimport org.gradle.api.DefaultTask\nimport org.gradle.api.tasks.Input\nimport org.gradle.api.tasks.TaskAction\nimport org.gradle.api.tasks.incremental.IncrementalTaskInputs\nimport java.io.File\n\n/**\n * Gradle task responsible for invoking Stylist to generate the themes.\n */\nopen class StylistTask : DefaultTask() {\n\n  @Input\n  lateinit var outputDirectory: File\n\n  @Input\n  var themesXmlFilename: String = DEFAULT_THEMES_XML_FILENAME\n\n  @Input\n  var formatSource: Boolean = true\n\n  @TaskAction\n  fun execute(inputs: IncrementalTaskInputs) {\n    Stylist.generateThemesFor(outputDirectory, themesXmlFilename, formatSource)\n  }\n}\n"
  },
  {
    "path": "stylist/src/main/kotlin/com/uber/stylist/internal/util/Util.kt",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.uber.stylist.internal.util\n\nimport com.android.build.gradle.api.BaseVariant\nimport org.gradle.api.Project\nimport java.io.File\n\ninternal fun resolveVariantOutputDir(project: Project, variant: BaseVariant, plugin: String): File = project.file(\n    \"${project.projectDir}/build/generated/res/$plugin/${variant.flavorName}/${variant.buildType.name}\".sanitize()\n)\n\ninternal fun String.sanitize(): String = replace('/', File.separatorChar)\n"
  },
  {
    "path": "stylist/src/main/resources/META-INF/gradle-plugins/com.uber.stylist.properties",
    "content": "implementation-class=com.uber.stylist.StylistPlugin\n"
  },
  {
    "path": "stylist-api/build.gradle",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\napply plugin: \"java-library\"\napply plugin: \"org.jetbrains.kotlin.jvm\"\n\nsourceCompatibility = JavaVersion.VERSION_1_8\ntargetCompatibility = JavaVersion.VERSION_1_8\n\ndependencies {\n    implementation deps.kotlin.stdLibJdk8\n}\n\nif (rootProject.projectDir.name != \"buildSrc\") {\n    apply from: rootProject.file('gradle/gradle-mvn-push.gradle')\n}\n"
  },
  {
    "path": "stylist-api/gradle.properties",
    "content": "#\n# Copyright (c) 2018. Uber Technologies\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nPOM_NAME=stylist-api\nPOM_ARTIFACT_ID=stylist-api\nPOM_PACKAGING=jar\n"
  },
  {
    "path": "stylist-api/src/main/kotlin/com/uber/stylist/api/StyleItem.kt",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.uber.stylist.api\n\n/**\n * An item within a style. The name includes the \"android\" prefix for\n * platform attributes. The value can be a theme attribute (?foo),\n * resource (@color/foo), or raw value (16dp).\n */\ndata class StyleItem(val name: String, val value: String)\n"
  },
  {
    "path": "stylist-api/src/main/kotlin/com/uber/stylist/api/StyleItemGroup.kt",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.uber.stylist.api\n\nimport com.uber.stylist.api.StyleItem\n\n/**\n * A [StyleItemGroup] defines a logically-grouped set of style items that are to be generated in an Android XML theme.\n * Each [StyleItemGroup] can be declared by multiple [ThemeStencils][ThemeStencil] and generate otherwise duplicated style items\n * across all themes that declare them.\n */\nclass StyleItemGroup(private vararg val styleItemVarArgs: StyleItem) {\n\n  /**\n   * Used to retrieve the [StyleItems][StyleItem] in this logical group.\n   *\n   * @return the collection of [StyleItems][StyleItem]\n   */\n  fun styleItems() = styleItemVarArgs.toList()\n}\n"
  },
  {
    "path": "stylist-api/src/main/kotlin/com/uber/stylist/api/ThemeStencil.kt",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.uber.stylist.api\n\nimport com.uber.stylist.api.StyleItem\n\n/**\n * The definition for an an XML theme to be generated.\n */\nclass ThemeStencil(\n    val name: String,\n    val parent: String,\n    private vararg val addedStyleItemGroups: StyleItemGroup = emptyArray()) {\n\n  private val globalStyleItemGroups = mutableSetOf<StyleItemGroup>()\n\n  /**\n   * Returns a collection of [StyleItems][StyleItem] to be included in the XML theme\n   * including those that are globally applicable.\n   *\n   * @return the collection of [StyleItems][StyleItem]\n   */\n  fun styleItems(): List<StyleItem> = (globalStyleItemGroups + addedStyleItemGroups.toSet())\n      .flatMap { it.styleItems() }\n      .toList()\n\n  /**\n   * Applies the globally-applicable [StyleItemGroups][StyleItemGroup] to this [ThemeStencil].\n   *\n   * @param styleItemGroups the set of [StyleItemGroups][StyleItemGroup]\n   */\n  fun setGlobalStyleItemGroups(styleItemGroups: Set<StyleItemGroup>) {\n    globalStyleItemGroups.apply {\n      clear()\n      addAll(styleItemGroups)\n    }\n  }\n}\n"
  },
  {
    "path": "stylist-api/src/main/kotlin/com/uber/stylist/api/ThemeStencilProvider.kt",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.uber.stylist.api\n\n/**\n * This interface should be implemented in order to provide theme definitions to Stylist.\n */\ninterface ThemeStencilProvider {\n\n  /**\n   * Provide a set of [ThemeStencils][ThemeStencil] to be used during code generation.\n   *\n   * @return The set of [ThemeStencils][ThemeStencil].\n   */\n  fun stencils(): Set<ThemeStencil>\n\n  /**\n   * Provide a set of [StyleItemGroups][StyleItemGroup] that should be applied to all [ThemeStencils][ThemeStencil].\n   *\n   * @return The set of [StyleItemGroups][StyleItemGroup].\n   */\n  fun globalStyleItemGroups(): Set<StyleItemGroup>\n}\n"
  },
  {
    "path": "stylist-api/src/main/kotlin/com/uber/stylist/api/ThemeStencilService.kt",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.uber.stylist.api\n\nimport java.util.ServiceLoader\n\n/**\n * Service responsible for collecting the [ThemeStencils][ThemeStencil] to be used during code generation.\n */\nclass ThemeStencilService private constructor() {\n\n  private val serviceLoader = ServiceLoader.load(ThemeStencilProvider::class.java)\n\n  /**\n   * Gets the [ThemeStencil] implementations loaded.\n   *\n   * @return The located [ThemeStencils][ThemeStencil].\n   */\n  fun getStencils(): Set<ThemeStencil> {\n    val stencils = LinkedHashSet<ThemeStencil>()\n    serviceLoader.iterator()\n        .forEach { stencils.addAll(it.stencils()) }\n    return stencils\n  }\n\n  /**\n   * Gets the [StyleItemGroup] implementations that should be applied to every [ThemeStencil].\n   *\n   * @return The located global [StyleItemGroups][StyleItemGroup].\n   */\n  fun getGlobalStyleItemGroups(): Set<StyleItemGroup> {\n    val styleItemGroups = LinkedHashSet<StyleItemGroup>()\n    serviceLoader.iterator()\n        .forEach { styleItemGroups.addAll(it.globalStyleItemGroups()) }\n    return styleItemGroups\n  }\n\n  companion object {\n    /**\n     * Creates a new [ThemeStencilService].\n     *\n     * @return the [ThemeStencilService]\n     */\n    fun newInstance() = ThemeStencilService()\n  }\n}\n"
  },
  {
    "path": "stylist-core/build.gradle",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\napply plugin: \"java-library\"\napply plugin: \"org.jetbrains.kotlin.jvm\"\n\nsourceCompatibility = JavaVersion.VERSION_1_8\ntargetCompatibility = JavaVersion.VERSION_1_8\n\ndependencies {\n    implementation deps.androidx.annotations\n    implementation deps.external.resourcesPoet\n    implementation deps.kotlin.stdLibJdk8\n    implementation project(\":stylist-api\")\n\n    // Dont need to run tests in buildSrc\n    if (rootProject.projectDir.name != \"buildSrc\") {\n        testImplementation deps.androidx.annotations\n        testImplementation deps.test.junit\n        testImplementation deps.test.truth\n    }\n}\n\nif (rootProject.projectDir.name != \"buildSrc\") {\n    apply from: rootProject.file('gradle/gradle-mvn-push.gradle')\n}\n"
  },
  {
    "path": "stylist-core/gradle.properties",
    "content": "#\n# Copyright (c) 2018. Uber Technologies\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nPOM_NAME=stylist-core\nPOM_ARTIFACT_ID=stylist-core\nPOM_PACKAGING=jar\n"
  },
  {
    "path": "stylist-core/src/main/kotlin/com/uber/stylist/Stylist.kt",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.uber.stylist\n\nimport androidx.annotation.VisibleForTesting\nimport java.io.File\nimport com.commit451.resourcespoet.ResourcesPoet\nimport com.commit451.resourcespoet.StyleItem\nimport com.uber.stylist.api.StyleItemGroup\nimport com.uber.stylist.api.ThemeStencil\nimport com.uber.stylist.api.ThemeStencilService\n\n/**\n * This contains the core logic of the Stylist library.\n */\nobject Stylist {\n\n  const val DEFAULT_THEMES_XML_FILENAME = \"themes_stylist_generated.xml\"\n\n  /**\n   * Generate Android XML themes for the [ThemeStencils][ThemeStencil] and [StyleItemGroups][StyleItemGroup]\n   * provided by the [ThemeStencilService].\n   *\n   * @outputDir the res directory to generate the themes into\n   * @themesXmlFilename the name of the file for the generated themes\n   * @formatSource whether or not to format and indent the generated themes file\n   */\n  fun generateThemesFor(\n      outputDir: File, themesXmlFilename: String, formatSource: Boolean) {\n    val themeStencilService = ThemeStencilService.newInstance()\n    val styleItemGroups = themeStencilService.getGlobalStyleItemGroups()\n    val stencils = themeStencilService.getStencils()\n    generateThemesForStencils(stencils, styleItemGroups, outputDir, themesXmlFilename, formatSource)\n  }\n\n  /**\n   * See [Stylist.generateThemesFor]\n   */\n  @VisibleForTesting\n  internal fun generateThemesForStencils(\n      stencils: Set<ThemeStencil>,\n      styleItemGroups: Set<StyleItemGroup>,\n      outputDir: File,\n      themesXmlFileName: String,\n      formatSource: Boolean) {\n\n    val themesXmlFile = File(\"$outputDir/values/$themesXmlFileName\").apply {\n      parentFile.mkdirs()\n      createNewFile()\n    }\n\n    ResourcesPoet.create(indent = formatSource).apply {\n      stencils.forEach {\n        it.setGlobalStyleItemGroups(styleItemGroups)\n        addStyle(it.name, it.parent, it.styleItems().map { StyleItem(it.name, it.value) })\n      }\n      build(themesXmlFile)\n    }\n  }\n}\n"
  },
  {
    "path": "stylist-core/src/test/kotlin/com/uber/stylist/StylistTest.kt",
    "content": "/*\n * Copyright (c) 2018. Uber Technologies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.uber.stylist\n\nimport com.google.common.io.Files\nimport com.google.common.truth.Truth.assertThat\nimport com.uber.stylist.Stylist.DEFAULT_THEMES_XML_FILENAME\nimport com.uber.stylist.api.StyleItem\nimport com.uber.stylist.api.StyleItemGroup\nimport com.uber.stylist.api.ThemeStencil\nimport org.junit.Test\n\nclass StylistTest {\n\n  companion object {\n    private const val THEMES_NO_THEMES = \"\"\"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<resources/>\n\"\"\"\n\n    private const val THEMES_NO_STYLE_GROUPS = \"\"\"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<resources>\n    <style name=\"Theme.Test\" parent=\"Theme.AppCompat\"/>\n    <style name=\"Theme.Test.Light\" parent=\"Theme.AppCompat.Light\"/>\n    <style name=\"Theme.Test.Dialog\" parent=\"Theme.AppCompat.Dialog\"/>\n    <style name=\"Theme.Test.Light.Dialog\" parent=\"Theme.AppCompat.Light.Dialog\"/>\n</resources>\n\"\"\"\n\n    private const val THEMES_WITH_STYLE_GROUP = \"\"\"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<resources>\n    <style name=\"Theme.Test\" parent=\"Theme.AppCompat\">\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n    </style>\n    <style name=\"Theme.Test.Light\" parent=\"Theme.AppCompat.Light\">\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n    </style>\n    <style name=\"Theme.Test.Dialog\" parent=\"Theme.AppCompat.Dialog\">\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n    </style>\n    <style name=\"Theme.Test.Light.Dialog\" parent=\"Theme.AppCompat.Light.Dialog\">\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n    </style>\n</resources>\n\"\"\"\n\n    private const val THEMES_WITH_STYLE_GROUPS = \"\"\"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<resources>\n    <style name=\"Theme.Test\" parent=\"Theme.AppCompat\">\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n        <item name=\"textSizeSmall\">12dp</item>\n        <item name=\"textSizeMedium\">16dp</item>\n        <item name=\"textSizeLarge\">20dp</item>\n    </style>\n    <style name=\"Theme.Test.Light\" parent=\"Theme.AppCompat.Light\">\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n        <item name=\"textSizeSmall\">12dp</item>\n        <item name=\"textSizeMedium\">16dp</item>\n        <item name=\"textSizeLarge\">20dp</item>\n    </style>\n    <style name=\"Theme.Test.Dialog\" parent=\"Theme.AppCompat.Dialog\">\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n        <item name=\"textSizeSmall\">12dp</item>\n        <item name=\"textSizeMedium\">16dp</item>\n        <item name=\"textSizeLarge\">20dp</item>\n    </style>\n    <style name=\"Theme.Test.Light.Dialog\" parent=\"Theme.AppCompat.Light.Dialog\">\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n        <item name=\"textSizeSmall\">12dp</item>\n        <item name=\"textSizeMedium\">16dp</item>\n        <item name=\"textSizeLarge\">20dp</item>\n    </style>\n</resources>\n\"\"\"\n\n    private const val THEMES_WITH_STYLE_GROUPS_PLUS_ADDED = \"\"\"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<resources>\n    <style name=\"Theme.Test\" parent=\"Theme.AppCompat\">\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n        <item name=\"textSizeSmall\">12dp</item>\n        <item name=\"textSizeMedium\">16dp</item>\n        <item name=\"textSizeLarge\">20dp</item>\n    </style>\n    <style name=\"Theme.Test.Light\" parent=\"Theme.AppCompat.Light\">\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n        <item name=\"textSizeSmall\">12dp</item>\n        <item name=\"textSizeMedium\">16dp</item>\n        <item name=\"textSizeLarge\">20dp</item>\n    </style>\n    <style name=\"Theme.Test.Dialog\" parent=\"Theme.AppCompat.Dialog\">\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n        <item name=\"textSizeSmall\">12dp</item>\n        <item name=\"textSizeMedium\">16dp</item>\n        <item name=\"textSizeLarge\">20dp</item>\n        <item name=\"dialogSpecificAttr1\">foo</item>\n        <item name=\"dialogSpecificAttr2\">bar</item>\n    </style>\n    <style name=\"Theme.Test.Light.Dialog\" parent=\"Theme.AppCompat.Light.Dialog\">\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n        <item name=\"textSizeSmall\">12dp</item>\n        <item name=\"textSizeMedium\">16dp</item>\n        <item name=\"textSizeLarge\">20dp</item>\n        <item name=\"dialogSpecificAttr1\">foo</item>\n        <item name=\"dialogSpecificAttr2\">bar</item>\n    </style>\n</resources>\n\"\"\"\n\n    private val THEMES_UNFORMATTED = \"\"\"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<resources>\n<style name=\"Theme.Test\" parent=\"Theme.AppCompat\">\n<item name=\"colorPrimary\">@color/colorPrimary</item>\n<item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n<item name=\"colorAccent\">@color/colorAccent</item>\n</style>\n<style name=\"Theme.Test.Light\" parent=\"Theme.AppCompat.Light\">\n<item name=\"colorPrimary\">@color/colorPrimary</item>\n<item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n<item name=\"colorAccent\">@color/colorAccent</item>\n</style>\n<style name=\"Theme.Test.Dialog\" parent=\"Theme.AppCompat.Dialog\">\n<item name=\"colorPrimary\">@color/colorPrimary</item>\n<item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n<item name=\"colorAccent\">@color/colorAccent</item>\n</style>\n<style name=\"Theme.Test.Light.Dialog\" parent=\"Theme.AppCompat.Light.Dialog\">\n<item name=\"colorPrimary\">@color/colorPrimary</item>\n<item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n<item name=\"colorAccent\">@color/colorAccent</item>\n</style>\n</resources>\"\"\".split(\"\\n\").joinToString(separator = \"\")\n\n    private val basicAppColors = StyleItemGroup(\n        StyleItem(\"colorPrimary\", \"@color/colorPrimary\"),\n        StyleItem(\"colorPrimaryDark\", \"@color/colorPrimaryDark\"),\n        StyleItem(\"colorAccent\", \"@color/colorAccent\")\n    )\n\n    private val textSizes = StyleItemGroup(\n        StyleItem(\"textSizeSmall\", \"12dp\"),\n        StyleItem(\"textSizeMedium\", \"16dp\"),\n        StyleItem(\"textSizeLarge\", \"20dp\")\n    )\n\n    private val dialogAttrs = StyleItemGroup(\n        StyleItem(\"dialogSpecificAttr1\", \"foo\"),\n        StyleItem(\"dialogSpecificAttr2\", \"bar\")\n    )\n\n    val themeStencils: Set<ThemeStencil> = linkedSetOf(\n        ThemeStencil(\"Theme.Test\", \"Theme.AppCompat\"),\n        ThemeStencil(\"Theme.Test.Light\", \"Theme.AppCompat.Light\"),\n        ThemeStencil(\"Theme.Test.Dialog\", \"Theme.AppCompat.Dialog\"),\n        ThemeStencil(\"Theme.Test.Light.Dialog\", \"Theme.AppCompat.Light.Dialog\")\n    )\n\n    val themeStencilsAddedStyles: Set<ThemeStencil> = linkedSetOf(\n        ThemeStencil(\"Theme.Test\", \"Theme.AppCompat\"),\n        ThemeStencil(\"Theme.Test.Light\", \"Theme.AppCompat.Light\"),\n        ThemeStencil(\"Theme.Test.Dialog\", \"Theme.AppCompat.Dialog\", dialogAttrs),\n        ThemeStencil(\"Theme.Test.Light.Dialog\", \"Theme.AppCompat.Light.Dialog\", dialogAttrs)\n    )\n  }\n\n  @Test\n  fun testStylist_withNoThemes_shouldGenerateExpectedXml() {\n    testXml(emptySet(), emptySet(), THEMES_NO_THEMES)\n  }\n\n  @Test\n  fun testStylist_withNoStyleGroups_shouldGenerateExpectedXml() {\n    testXml(themeStencils, linkedSetOf(), THEMES_NO_STYLE_GROUPS)\n  }\n\n  @Test\n  fun testStylist_withSingleStyleGroup_shouldGenerateExpectedXml() {\n    testXml(themeStencils, linkedSetOf(basicAppColors), THEMES_WITH_STYLE_GROUP)\n  }\n\n  @Test\n  fun testStylist_withMultipleStyleGroups_shouldGenerateExpectedXml() {\n    testXml(themeStencils, linkedSetOf(basicAppColors, textSizes), THEMES_WITH_STYLE_GROUPS)\n  }\n\n  @Test\n  fun testStylist_withMultipleStyleGroupsPlusAdded_shouldGenerateExpectedXml() {\n    testXml(themeStencilsAddedStyles, linkedSetOf(basicAppColors, textSizes), THEMES_WITH_STYLE_GROUPS_PLUS_ADDED)\n  }\n\n  @Test\n  fun testStylist_withFormatFalse_shouldGenerateExpectedXml() {\n    testXml(themeStencils, linkedSetOf(basicAppColors), THEMES_UNFORMATTED, formatSource = false)\n  }\n\n  @Test\n  fun testStylist_withNonDefaultThemesXmlFilename_shouldCorrectFile() {\n    testXml(themeStencils, linkedSetOf(basicAppColors), THEMES_WITH_STYLE_GROUP, themesXmlFileName = \"generated_themes_xml_alt_filename.xml\")\n  }\n\n  private fun testXml(\n      stencils: Set<ThemeStencil>,\n      globalStyleGroups: Set<StyleItemGroup>,\n      expectedXml: String,\n      themesXmlFileName: String = DEFAULT_THEMES_XML_FILENAME,\n      formatSource: Boolean = true) {\n    val outputDir = Files.createTempDir()\n    outputDir.resolve(\"values\").apply {\n      Stylist.generateThemesForStencils(stencils, globalStyleGroups, outputDir, themesXmlFileName = themesXmlFileName, formatSource = formatSource)\n\n      val xmlFileNames = listFiles().map { it.name }.toList()\n      assertThat(xmlFileNames).containsExactly(themesXmlFileName)\n\n      val generatedThemesXml = listFiles().first().readText()\n      assertThat(generatedThemesXml).isEqualTo(expectedXml)\n    }\n    outputDir.deleteRecursively()\n  }\n}\n"
  }
]