[
  {
    "path": ".gitignore",
    "content": "# GENERATED\n*build\n.gradle\n.DS_Store\n\n# LOCAL\nlocal.properties\n\n# IDEA\n*.idea\n*.iml\n"
  },
  {
    "path": "LICENSE",
    "content": "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 2019 LOPEZ MIKHAEL\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": "CircleView\n=================\n\n<img src=\"/preview/preview.gif\" alt=\"sample\" title=\"sample\" width=\"300\" height=\"533\" align=\"right\" vspace=\"52\" />\n\n[![Platform](https://img.shields.io/badge/platform-android-green.svg)](http://developer.android.com/index.html)\n[![API](https://img.shields.io/badge/API-14%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=14)\n[![Maven Central](https://img.shields.io/maven-central/v/com.mikhaellopez/circleview.svg?label=Maven%20Central)](https://search.maven.org/artifact/com.mikhaellopez/circleview)\n[![Twitter](https://img.shields.io/badge/Twitter-@LopezMikhael-blue.svg?style=flat)](http://twitter.com/lopezmikhael)\n\nThis is an Android project allowing to realize a circular View in the simplest way possible. Finish the oval shapes of all colors in your projects.\n\n<a href=\"https://play.google.com/store/apps/details?id=com.mikhaellopez.lopspower\">\n  <img alt=\"Android app on Google Play\" src=\"https://developer.android.com/images/brand/en_app_rgb_wo_45.png\" />\n</a>\n\nUSAGE\n-----\n\nTo make a circular View add CircleView in your layout XML and add CircleView library in your project or you can also grab it via Gradle:\n\n```groovy\nimplementation 'com.mikhaellopez:circleview:1.4.1'\n```\n\nXML\n-----\n\n```xml    \n<com.mikhaellopez.circleview.CircleView\n    android:id=\"@+id/circleView\"\n    android:layout_width=\"300dp\"\n    android:layout_height=\"300dp\"\n    app:cv_border=\"true\"\n    app:cv_border_color=\"#000000\"\n    app:cv_border_width=\"8dp\"\n    app:cv_color=\"#3f51b5\"\n    app:cv_shadow=\"true\"\n    app:cv_shadow_color=\"#3f51b5\"\n    app:cv_shadow_radius=\"10\" />\n```\n\nYou must use the following properties in your XML to change your CircleView.\n\n| Properties                      | Type                                                         | Default         |\n| ------------------------------- | ------------------------------------------------------------ | --------------- |\n| `app:cv_color`                  | color                                                        | WHITE           |\n| `app:cv_color_start`            | color                                                        | cv_color        |\n| `app:cv_color_end`              | color                                                        | cv_color        |\n| `app:cv_color_direction`        | left_to_right, right_to_left, top_to_bottom or bottom_to_top | left_to_right   |\n| `app:cv_border`                 | boolean                                                      | false           |\n| `app:cv_border_width`           | dimension                                                    | 4dp             |\n| `app:cv_border_color`           | color                                                        | BLACK           |\n| `app:cv_border_color_start`     | color                                                        | cv_border_color |\n| `app:cv_border_color_end`       | color                                                        | cv_border_color |\n| `app:cv_border_color_direction` | left_to_right, right_to_left, top_to_bottom or bottom_to_top | left_to_right   |\n| `app:cv_shadow`                 | boolean                                                      | false           |\n| `app:cv_shadow_color`           | color                                                        | BLACK           |\n| `app:cv_shadow_radius`          | float                                                        | 8.0f            |\n| `app:cv_shadow_gravity`         | center, top, bottom, start or end                            | bottom          |\n\n:information_source: You can also use `android:elevation` instead of `app:cv_shadow` to have default Material Design elevation.\n\nKOTLIN\n-----\n\n<img src=\"/preview/capture.png\" alt=\"sample\" title=\"sample\" width=\"300\" height=\"533\" align=\"right\" vspace=\"200\" />\n\n```kotlin\nval circleView = findViewById<CircleView>(R.id.circleView)\ncircleView.apply {\n    // Set Color\n    circleColor = Color.WHITE\n    // or with gradient\n    circleColorStart = Color.BLACK\n    circleColorEnd = Color.RED\n    circleColorDirection = CircleView.GradientDirection.TOP_TO_BOTTOM\n    \n    // Set Border\n    borderWidth = 10f\n    borderColor = Color.BLACK\n    // or with gradient\n    borderColorStart = Color.BLACK\n    borderColorEnd = Color.RED\n    borderColorDirection = CircleView.GradientDirection.TOP_TO_BOTTOM\n    \n    // Add Shadow with default param\n    shadowEnable = true\n    // or with custom param\n    shadowRadius = 15f\n    shadowColor = Color.RED\n    shadowGravity = CircleView.ShadowGravity.CENTER\n}\n```\n\nJAVA\n-----\n\n```java\nCircleView circleView = findViewById(R.id.circleView);\n\n// Set Color\ncircleView.setCircleColor(Color.WHITE);\n// or with gradient\ncircleView.setCircleColorStart(Color.BLACK);\ncircleView.setCircleColorEnd(Color.RED);\ncircleView.setCircleColorDirection(CircleView.GradientDirection.TOP_TO_BOTTOM);\n\n// Set Border\ncircleView.setBorderWidth(10f);\ncircleView.setBorderColor(Color.BLACK);\n// or with gradient\ncircleView.setBorderColorStart(Color.BLACK);\ncircleView.setBorderColorEnd(Color.RED);\ncircleView.setBorderColorDirection(CircleView.GradientDirection.TOP_TO_BOTTOM);\n\n// Add Shadow with default param\ncircleView.setShadowEnable(true);\n// or with custom param\ncircleView.setShadowRadius(15f);\ncircleView.setShadowColor(Color.RED);\ncircleView.setShadowGravity(CircleView.ShadowGravity.CENTER);\n```\n\nSUPPORT ❤️\n-----\n\nFind this library useful? Support it by joining [**stargazers**](https://github.com/lopspower/CircleView/stargazers) for this repository ⭐️\n<br/>\nAnd [**follow me**](https://github.com/lopspower?tab=followers) for my next creations 👍\n\nLICENCE\n-----\n\nCircleView by [Lopez Mikhael](http://mikhaellopez.com/) is licensed under a [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n"
  },
  {
    "path": "build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\napply from: 'dependencies.gradle'\n\nbuildscript {\n    ext.kotlin_version = '1.7.10'\n    repositories {\n        google()\n        mavenCentral()\n        gradlePluginPortal()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:7.2.2'\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version\"\n        classpath 'com.github.ben-manes:gradle-versions-plugin:0.42.0'\n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "circleview/build.gradle",
    "content": "apply plugin: 'com.android.library'\napply plugin: 'kotlin-android'\n\napply from: rootProject.file('gradle/publish-mavencentral.gradle')\n\nandroid {\n    compileSdkVersion androidCompileSdkVersion\n    defaultConfig {\n        minSdkVersion androidMinSdkVersion\n        targetSdkVersion androidTargetSdkVersion\n        versionCode androidVersionCode\n        versionName androidVersionName\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n        }\n    }\n}\n\ndependencies {\n    implementation kotlinStdlib\n}\n"
  },
  {
    "path": "circleview/src/main/AndroidManifest.xml",
    "content": "<manifest package=\"com.mikhaellopez.circleview\" />\n"
  },
  {
    "path": "circleview/src/main/java/com/mikhaellopez/circleview/CircleView.kt",
    "content": "package com.mikhaellopez.circleview\n\nimport android.content.Context\nimport android.graphics.*\nimport android.os.Build\nimport android.util.AttributeSet\nimport android.view.View\nimport android.view.ViewOutlineProvider\nimport kotlin.math.min\n\n/**\n * Copyright (C) 2020 Mikhael LOPEZ\n * Licensed under the Apache License Version 2.0\n */\nclass CircleView(context: Context, attrs: AttributeSet? = null) : View(context, attrs) {\n\n    companion object {\n        private const val DEFAULT_BORDER_WIDTH = 4f\n        private const val DEFAULT_SHADOW_RADIUS = 8.0f\n    }\n\n    // Properties\n    private val paint: Paint = Paint().apply { isAntiAlias = true }\n    private val paintBorder: Paint = Paint().apply { isAntiAlias = true }\n    private val paintShadow: Paint = Paint().apply { isAntiAlias = true }\n    private var circleCenter = 0\n    private var heightCircle = 0\n\n    //region Attributes\n    var circleColor: Int = Color.WHITE\n        set(value) {\n            field = value\n            manageCircleColor()\n            invalidate()\n        }\n    var circleColorStart: Int? = null\n        set(value) {\n            field = value\n            manageCircleColor()\n            invalidate()\n        }\n    var circleColorEnd: Int? = null\n        set(value) {\n            field = value\n            manageCircleColor()\n            invalidate()\n        }\n    var circleColorDirection: GradientDirection = GradientDirection.LEFT_TO_RIGHT\n        set(value) {\n            field = value\n            manageCircleColor()\n            invalidate()\n        }\n    var borderWidth: Float = 0f\n        set(value) {\n            field = value\n            update()\n        }\n    var borderColor: Int = Color.BLACK\n        set(value) {\n            field = value\n            manageBorderColor()\n            invalidate()\n        }\n    var borderColorStart: Int? = null\n        set(value) {\n            field = value\n            manageBorderColor()\n            invalidate()\n        }\n    var borderColorEnd: Int? = null\n        set(value) {\n            field = value\n            manageBorderColor()\n            invalidate()\n        }\n    var borderColorDirection: GradientDirection = GradientDirection.LEFT_TO_RIGHT\n        set(value) {\n            field = value\n            manageBorderColor()\n            invalidate()\n        }\n    var shadowRadius: Float = 0f\n        set(value) {\n            field = value\n            shadowEnable = shadowRadius > 0f\n        }\n    var shadowColor = Color.BLACK\n        set(value) {\n            field = value\n            paintShadow.color = field\n            invalidate()\n        }\n    var shadowGravity = ShadowGravity.BOTTOM\n        set(value) {\n            field = value\n            invalidate()\n        }\n    var shadowEnable = false\n        set(value) {\n            field = value\n            if (field && shadowRadius == 0f)\n                shadowRadius = DEFAULT_SHADOW_RADIUS\n            update()\n        }\n    //endregion\n\n    init {\n        init(context, attrs)\n    }\n\n    private fun init(context: Context, attrs: AttributeSet?) {\n        // Load the styled attributes and set their properties\n        val attributes = context.obtainStyledAttributes(attrs, R.styleable.CircleView, 0, 0)\n\n        // Init Circle Color\n        circleColor = attributes.getColor(R.styleable.CircleView_cv_color, Color.WHITE)\n        attributes.getColor(R.styleable.CircleView_cv_color_start, 0)\n            .also { if (it != 0) circleColorStart = it }\n        attributes.getColor(R.styleable.CircleView_cv_color_end, 0)\n            .also { if (it != 0) circleColorEnd = it }\n        circleColorDirection = attributes.getInteger(\n            R.styleable.CircleView_cv_color_direction,\n            circleColorDirection.value\n        ).toGradientDirection()\n\n        // Init Border\n        if (attributes.getBoolean(R.styleable.CircleView_cv_border, false)) {\n            val defaultBorderSize = DEFAULT_BORDER_WIDTH * resources.displayMetrics.density\n            borderWidth =\n                attributes.getDimension(R.styleable.CircleView_cv_border_width, defaultBorderSize)\n            borderColor = attributes.getColor(R.styleable.CircleView_cv_border_color, borderColor)\n            attributes.getColor(R.styleable.CircleView_cv_border_color_start, 0)\n                .also { if (it != 0) borderColorStart = it }\n            attributes.getColor(R.styleable.CircleView_cv_border_color_end, 0)\n                .also { if (it != 0) borderColorEnd = it }\n            borderColorDirection = attributes.getInteger(\n                R.styleable.CircleView_cv_border_color_direction,\n                borderColorDirection.value\n            ).toGradientDirection()\n        }\n\n        // Init Shadow\n        shadowEnable = attributes.getBoolean(R.styleable.CircleView_cv_shadow, shadowEnable)\n        if (shadowEnable) {\n            shadowColor = attributes.getColor(R.styleable.CircleView_cv_shadow_color, shadowColor)\n            shadowGravity =\n                attributes.getInteger(R.styleable.CircleView_cv_shadow_gravity, shadowGravity.value)\n                    .toShadowGravity()\n            shadowRadius =\n                attributes.getFloat(R.styleable.CircleView_cv_shadow_radius, DEFAULT_SHADOW_RADIUS)\n        }\n\n        attributes.recycle()\n    }\n\n    override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {\n        super.onSizeChanged(w, h, oldw, oldh)\n        update()\n    }\n\n    //region Draw Method\n    override fun onDraw(canvas: Canvas) {\n        super.onDraw(canvas)\n\n        val circleCenterWithBorder = circleCenter + borderWidth\n        val margeWithShadowRadius = if (shadowEnable) shadowRadius * 2 else 0f\n\n        // Draw Shadow\n        if (shadowEnable) {\n            drawShadow()\n            canvas.drawCircle(\n                circleCenterWithBorder,\n                circleCenterWithBorder,\n                circleCenterWithBorder - margeWithShadowRadius,\n                paintShadow\n            )\n        }\n\n        // Draw Border\n        canvas.drawCircle(\n            circleCenterWithBorder,\n            circleCenterWithBorder,\n            circleCenterWithBorder - margeWithShadowRadius,\n            paintBorder\n        )\n        // Draw Circle background\n        canvas.drawCircle(\n            circleCenterWithBorder,\n            circleCenterWithBorder,\n            circleCenter - margeWithShadowRadius,\n            paint\n        )\n    }\n\n    private fun update() {\n        val usableWidth = width - (paddingLeft + paddingRight)\n        val usableHeight = height - (paddingTop + paddingBottom)\n        heightCircle = min(usableWidth, usableHeight)\n\n        circleCenter = (heightCircle - borderWidth * 2).toInt() / 2\n        manageCircleColor()\n        manageBorderColor()\n        manageElevation()\n        invalidate()\n    }\n\n    private fun manageCircleColor() {\n        paint.shader = createLinearGradient(\n            circleColorStart ?: circleColor,\n            circleColorEnd ?: circleColor, circleColorDirection\n        )\n    }\n\n    private fun manageBorderColor() {\n        val borderColor = if (borderWidth == 0f) circleColor else this.borderColor\n        paintBorder.shader = createLinearGradient(\n            borderColorStart ?: borderColor,\n            borderColorEnd ?: borderColor, borderColorDirection\n        )\n    }\n\n    private fun createLinearGradient(\n        startColor: Int,\n        endColor: Int,\n        gradientDirection: GradientDirection\n    ): LinearGradient {\n        var x0 = 0f\n        var y0 = 0f\n        var x1 = 0f\n        var y1 = 0f\n        when (gradientDirection) {\n            GradientDirection.LEFT_TO_RIGHT -> x1 = width.toFloat()\n            GradientDirection.RIGHT_TO_LEFT -> x0 = width.toFloat()\n            GradientDirection.TOP_TO_BOTTOM -> y1 = height.toFloat()\n            GradientDirection.BOTTOM_TO_TOP -> y0 = height.toFloat()\n        }\n        return LinearGradient(x0, y0, x1, y1, startColor, endColor, Shader.TileMode.CLAMP)\n    }\n\n    private fun manageElevation() {\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n            outlineProvider = if (!shadowEnable) object : ViewOutlineProvider() {\n                override fun getOutline(view: View?, outline: Outline?) {\n                    outline?.setOval(0, 0, heightCircle, heightCircle)\n                }\n            } else null\n        }\n    }\n\n    private fun drawShadow() {\n        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {\n            setLayerType(LAYER_TYPE_SOFTWARE, paintShadow)\n        }\n\n        var dx = 0f\n        var dy = 0f\n\n        when (shadowGravity) {\n            ShadowGravity.CENTER -> {\n                /*dx, dy = 0.0f*/\n            }\n            ShadowGravity.TOP -> dy = -shadowRadius / 2\n            ShadowGravity.BOTTOM -> dy = shadowRadius / 2\n            ShadowGravity.START -> dx = -shadowRadius / 2\n            ShadowGravity.END -> dx = shadowRadius / 2\n        }\n\n        paintShadow.setShadowLayer(shadowRadius, dx, dy, shadowColor)\n    }\n    //endregion\n\n    //region Measure Method\n    override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {\n        val usableWidth = measure(widthMeasureSpec) - (paddingLeft + paddingRight)\n        val usableHeight = measure(heightMeasureSpec) - (paddingTop + paddingBottom)\n        heightCircle = min(usableWidth, usableHeight)\n        setMeasuredDimension(heightCircle, heightCircle)\n    }\n\n    private fun measure(measureSpec: Int): Int {\n        val specMode = MeasureSpec.getMode(measureSpec)\n        val specSize = MeasureSpec.getSize(measureSpec)\n        return when (specMode) {\n            MeasureSpec.EXACTLY -> specSize // The parent has determined an exact size for the child.\n            MeasureSpec.AT_MOST -> specSize // The child can be as large as it wants up to the specified size.\n            else -> heightCircle // The parent has not imposed any constraint on the child.\n        }\n    }\n    //endregion\n\n    private fun Int.toShadowGravity(): ShadowGravity =\n        when (this) {\n            1 -> ShadowGravity.CENTER\n            2 -> ShadowGravity.TOP\n            3 -> ShadowGravity.BOTTOM\n            4 -> ShadowGravity.START\n            5 -> ShadowGravity.END\n            else -> throw IllegalArgumentException(\"This value is not supported for ShadowGravity: $this\")\n        }\n\n    private fun Int.toGradientDirection(): GradientDirection =\n        when (this) {\n            1 -> GradientDirection.LEFT_TO_RIGHT\n            2 -> GradientDirection.RIGHT_TO_LEFT\n            3 -> GradientDirection.TOP_TO_BOTTOM\n            4 -> GradientDirection.BOTTOM_TO_TOP\n            else -> throw IllegalArgumentException(\"This value is not supported for GradientDirection: $this\")\n        }\n\n    /**\n     * ShadowGravity enum class to set the gravity of the CircleView shadow\n     */\n    enum class ShadowGravity(val value: Int) {\n        CENTER(1),\n        TOP(2),\n        BOTTOM(3),\n        START(4),\n        END(5)\n    }\n\n    /**\n     * GradientDirection enum class to set the direction of the gradient color\n     */\n    enum class GradientDirection(val value: Int) {\n        LEFT_TO_RIGHT(1),\n        RIGHT_TO_LEFT(2),\n        TOP_TO_BOTTOM(3),\n        BOTTOM_TO_TOP(4)\n    }\n\n}\n"
  },
  {
    "path": "circleview/src/main/res/values/attrs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <declare-styleable name=\"CircleView\">\n        <attr name=\"cv_color\" format=\"color\" />\n        <attr name=\"cv_color_start\" format=\"color\" />\n        <attr name=\"cv_color_end\" format=\"color\" />\n        <attr name=\"cv_color_direction\">\n            <flag name=\"left_to_right\" value=\"1\" />\n            <flag name=\"right_to_left\" value=\"2\" />\n            <flag name=\"top_to_bottom\" value=\"3\" />\n            <flag name=\"bottom_to_top\" value=\"4\" />\n        </attr>\n        <attr name=\"cv_border\" format=\"boolean\" />\n        <attr name=\"cv_border_width\" format=\"dimension\" />\n        <attr name=\"cv_border_color\" format=\"color\" />\n        <attr name=\"cv_border_color_start\" format=\"color\" />\n        <attr name=\"cv_border_color_end\" format=\"color\" />\n        <attr name=\"cv_border_color_direction\">\n            <flag name=\"left_to_right\" value=\"1\" />\n            <flag name=\"right_to_left\" value=\"2\" />\n            <flag name=\"top_to_bottom\" value=\"3\" />\n            <flag name=\"bottom_to_top\" value=\"4\" />\n        </attr>\n        <attr name=\"cv_shadow\" format=\"boolean\" />\n        <attr name=\"cv_shadow_color\" format=\"color\" />\n        <attr name=\"cv_shadow_radius\" format=\"float\" />\n        <attr name=\"cv_shadow_gravity\">\n            <flag name=\"center\" value=\"1\" />\n            <flag name=\"top\" value=\"2\" />\n            <flag name=\"bottom\" value=\"3\" />\n            <flag name=\"start\" value=\"4\" />\n            <flag name=\"end\" value=\"5\" />\n        </attr>\n    </declare-styleable>\n</resources>"
  },
  {
    "path": "circleview-example/build.gradle",
    "content": "apply plugin: 'com.android.application'\napply plugin: 'kotlin-android'\napply plugin: 'com.github.ben-manes.versions'\n\nandroid {\n    compileSdkVersion androidCompileSdkVersion\n    defaultConfig {\n        applicationId \"com.mikhaellopez.circleviewsample\"\n        minSdkVersion androidMinSdkVersion\n        targetSdkVersion androidTargetSdkVersion\n        versionCode 1\n        versionName \"1.0\"\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n        }\n    }\n}\n\ndependencies {\n    implementation project(':circleview')\n    //implementation \"com.mikhaellopez:circleview:$androidVersionName\"\n\n    // KOTLIN\n    implementation kotlinStdlib\n    // ANDROID\n    implementation androidXAppCompat\n    // UI\n    implementation lobsterPicker\n\n    // DEPENDENCY CHECK STRATEGY\n    dependencyUpdates.resolutionStrategy dependencyUpdatesStrategy\n}\n"
  },
  {
    "path": "circleview-example/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    package=\"com.mikhaellopez.circleviewsample\">\n\n    <application\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/Base.Theme\"\n        tools:ignore=\"GoogleAppIndexingWarning\">\n        <activity\n            android:name=\".MainActivity\"\n            android:exported=\"true\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n    </application>\n\n</manifest>\n"
  },
  {
    "path": "circleview-example/src/main/java/com/mikhaellopez/circleviewsample/MainActivity.kt",
    "content": "package com.mikhaellopez.circleviewsample\n\nimport android.os.Bundle\nimport android.widget.SeekBar\nimport androidx.appcompat.app.AppCompatActivity\nimport com.larswerkman.lobsterpicker.OnColorListener\nimport com.larswerkman.lobsterpicker.sliders.LobsterShadeSlider\nimport com.mikhaellopez.circleview.CircleView\n\nclass MainActivity : AppCompatActivity() {\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_main)\n\n        val circleView = findViewById<CircleView>(R.id.circleView)\n\n        findViewById<SeekBar>(R.id.seekBarBorderWidth).onProgressChanged {\n            circleView.borderWidth = it.toFloat()\n        }\n        findViewById<SeekBar>(R.id.seekBarShadowRadius).onProgressChanged {\n            circleView.shadowRadius = it.toFloat()\n        }\n        findViewById<LobsterShadeSlider>(R.id.shadeSlider).onColorChanged {\n            circleView.circleColor = it\n            circleView.shadowColor = it\n        }\n    }\n\n    //region Extensions\n    private fun SeekBar.onProgressChanged(onProgressChanged: (Int) -> Unit) {\n        setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {\n            override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) {\n                onProgressChanged(progress)\n            }\n\n            override fun onStartTrackingTouch(seekBar: SeekBar?) {\n                // Nothing\n            }\n\n            override fun onStopTrackingTouch(seekBar: SeekBar?) {\n                // Nothing\n            }\n        })\n    }\n\n    private fun LobsterShadeSlider.onColorChanged(onColorChanged: (Int) -> Unit) {\n        addOnColorListener(object : OnColorListener {\n            override fun onColorChanged(color: Int) {\n                onColorChanged(color)\n            }\n\n            override fun onColorSelected(color: Int) {\n                // Nothing\n            }\n        })\n    }\n    //endregion\n\n}"
  },
  {
    "path": "circleview-example/src/main/res/layout/activity_main.xml",
    "content": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:gravity=\"center\"\n    android:orientation=\"vertical\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"1\"\n        android:gravity=\"center\"\n        android:orientation=\"vertical\">\n\n        <com.mikhaellopez.circleview.CircleView\n            android:id=\"@+id/circleView\"\n            android:layout_width=\"300dp\"\n            android:layout_height=\"300dp\"\n            app:cv_border=\"true\"\n            app:cv_border_color=\"#000000\"\n            app:cv_border_width=\"8dp\"\n            app:cv_color=\"#3f51b5\"\n            app:cv_shadow=\"true\"\n            app:cv_shadow_color=\"#3f51b5\"\n            app:cv_shadow_radius=\"10\" />\n\n    </LinearLayout>\n\n    <LinearLayout\n        android:layout_width=\"240dp\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginBottom=\"40dp\"\n        android:gravity=\"center\"\n        android:orientation=\"vertical\">\n\n        <SeekBar\n            android:id=\"@+id/seekBarBorderWidth\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:max=\"200\"\n            android:progress=\"8\" />\n\n        <SeekBar\n            android:id=\"@+id/seekBarShadowRadius\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"10dp\"\n            android:max=\"40\"\n            android:progress=\"8\" />\n\n        <com.larswerkman.lobsterpicker.sliders.LobsterShadeSlider\n            android:id=\"@+id/shadeSlider\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"10dp\" />\n\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "circleview-example/src/main/res/layout/layout_demo.xml",
    "content": "<FrameLayout 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:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:gravity=\"center\"\n    android:orientation=\"vertical\">\n\n    <com.mikhaellopez.circleview.CircleView\n        android:layout_width=\"300dp\"\n        android:layout_height=\"300dp\"\n        android:layout_marginLeft=\"30dp\"\n        android:layout_marginTop=\"30dp\"\n        app:cv_border=\"true\"\n        app:cv_border_color=\"#ba6b6c\"\n        app:cv_border_width=\"8dp\"\n        app:cv_color=\"#ef9a9a\"\n        tools:ignore=\"RtlHardcoded\" />\n\n    <com.mikhaellopez.circleview.CircleView\n        android:layout_width=\"280dp\"\n        android:layout_height=\"280dp\"\n        android:layout_marginLeft=\"80dp\"\n        android:layout_marginTop=\"100dp\"\n        app:cv_border=\"true\"\n        app:cv_border_color=\"#bf5f82\"\n        app:cv_border_width=\"8dp\"\n        app:cv_color=\"#f48fb1\"\n        tools:ignore=\"RtlHardcoded\" />\n\n    <com.mikhaellopez.circleview.CircleView\n        android:layout_width=\"240dp\"\n        android:layout_height=\"240dp\"\n        android:layout_marginLeft=\"130dp\"\n        android:layout_marginTop=\"170dp\"\n        app:cv_border=\"true\"\n        app:cv_border_color=\"#9c64a6\"\n        app:cv_border_width=\"7dp\"\n        app:cv_color=\"#ce93d8\"\n        tools:ignore=\"RtlHardcoded\" />\n\n    <com.mikhaellopez.circleview.CircleView\n        android:layout_width=\"200dp\"\n        android:layout_height=\"200dp\"\n        android:layout_marginLeft=\"150dp\"\n        android:layout_marginTop=\"240dp\"\n        app:cv_border=\"true\"\n        app:cv_border_color=\"#836fa9\"\n        app:cv_border_width=\"7dp\"\n        app:cv_color=\"#b39ddb\"\n        tools:ignore=\"RtlHardcoded\" />\n\n    <com.mikhaellopez.circleview.CircleView\n        android:layout_width=\"200dp\"\n        android:layout_height=\"200dp\"\n        android:layout_marginLeft=\"150dp\"\n        android:layout_marginTop=\"240dp\"\n        app:cv_border=\"true\"\n        app:cv_border_color=\"#6f79a8\"\n        app:cv_border_width=\"7dp\"\n        app:cv_color=\"#9fa8da\"\n        tools:ignore=\"RtlHardcoded\" />\n\n    <com.mikhaellopez.circleview.CircleView\n        android:layout_width=\"160dp\"\n        android:layout_height=\"160dp\"\n        android:layout_marginLeft=\"150dp\"\n        android:layout_marginTop=\"300dp\"\n        app:cv_border=\"true\"\n        app:cv_border_color=\"#5d99c6\"\n        app:cv_border_width=\"6dp\"\n        app:cv_color=\"#90caf9\"\n        tools:ignore=\"RtlHardcoded\" />\n\n    <com.mikhaellopez.circleview.CircleView\n        android:layout_width=\"120dp\"\n        android:layout_height=\"120dp\"\n        android:layout_marginLeft=\"150dp\"\n        android:layout_marginTop=\"360dp\"\n        app:cv_border=\"true\"\n        app:cv_border_color=\"#4bacb8\"\n        app:cv_border_width=\"6dp\"\n        app:cv_color=\"#80deea\"\n        tools:ignore=\"RtlHardcoded\" />\n\n    <com.mikhaellopez.circleview.CircleView\n        android:layout_width=\"90dp\"\n        android:layout_height=\"90dp\"\n        android:layout_marginLeft=\"130dp\"\n        android:layout_marginTop=\"400dp\"\n        app:cv_border=\"true\"\n        app:cv_border_color=\"#4f9a94\"\n        app:cv_border_width=\"6dp\"\n        app:cv_color=\"#80cbc4\"\n        tools:ignore=\"RtlHardcoded\" />\n\n    <com.mikhaellopez.circleview.CircleView\n        android:layout_width=\"70dp\"\n        android:layout_height=\"70dp\"\n        android:layout_marginLeft=\"110dp\"\n        android:layout_marginTop=\"430dp\"\n        app:cv_border=\"true\"\n        app:cv_border_color=\"#75a478\"\n        app:cv_border_width=\"5dp\"\n        app:cv_color=\"#a5d6a7\"\n        tools:ignore=\"RtlHardcoded\" />\n\n    <com.mikhaellopez.circleview.CircleView\n        android:layout_width=\"50dp\"\n        android:layout_height=\"50dp\"\n        android:layout_marginLeft=\"100dp\"\n        android:layout_marginTop=\"460dp\"\n        app:cv_border=\"true\"\n        app:cv_border_color=\"#94af76\"\n        app:cv_border_width=\"5dp\"\n        app:cv_color=\"#c5e1a5\"\n        tools:ignore=\"RtlHardcoded\" />\n\n    <com.mikhaellopez.circleview.CircleView\n        android:layout_width=\"40dp\"\n        android:layout_height=\"40dp\"\n        android:layout_marginLeft=\"90dp\"\n        android:layout_marginTop=\"485dp\"\n        app:cv_border=\"true\"\n        app:cv_border_color=\"#b3bc6d\"\n        app:cv_border_width=\"4dp\"\n        app:cv_color=\"#e6ee9c\"\n        tools:ignore=\"RtlHardcoded\" />\n\n    <com.mikhaellopez.circleview.CircleView\n        android:layout_width=\"30dp\"\n        android:layout_height=\"30dp\"\n        android:layout_marginLeft=\"95dp\"\n        android:layout_marginTop=\"505dp\"\n        app:cv_border=\"true\"\n        app:cv_border_color=\"#cbc26d\"\n        app:cv_border_width=\"3dp\"\n        app:cv_color=\"#fff59d\"\n        tools:ignore=\"RtlHardcoded\" />\n\n    <com.mikhaellopez.circleview.CircleView\n        android:layout_width=\"25dp\"\n        android:layout_height=\"25dp\"\n        android:layout_marginLeft=\"110dp\"\n        android:layout_marginTop=\"515dp\"\n        app:cv_border=\"true\"\n        app:cv_border_color=\"#caae53\"\n        app:cv_border_width=\"3dp\"\n        app:cv_color=\"#ffe082\"\n        tools:ignore=\"RtlHardcoded\" />\n\n    <com.mikhaellopez.circleview.CircleView\n        android:layout_width=\"20dp\"\n        android:layout_height=\"20dp\"\n        android:layout_marginLeft=\"125dp\"\n        android:layout_marginTop=\"525dp\"\n        app:cv_border=\"true\"\n        app:cv_border_color=\"#ca9b52\"\n        app:cv_border_width=\"2dp\"\n        app:cv_color=\"#ffcc80\"\n        tools:ignore=\"RtlHardcoded\" />\n\n    <com.mikhaellopez.circleview.CircleView\n        android:layout_width=\"15dp\"\n        android:layout_height=\"15dp\"\n        android:layout_marginLeft=\"135dp\"\n        android:layout_marginTop=\"532dp\"\n        app:cv_border=\"true\"\n        app:cv_border_color=\"#c97b63\"\n        app:cv_border_width=\"2dp\"\n        app:cv_color=\"#ffab91\"\n        tools:ignore=\"RtlHardcoded\" />\n\n    <com.mikhaellopez.circleview.CircleView\n        android:layout_width=\"80dp\"\n        android:layout_height=\"80dp\"\n        android:layout_gravity=\"bottom|end\"\n        android:layout_marginRight=\"14dp\"\n        android:layout_marginBottom=\"14dp\"\n        app:cv_border=\"true\"\n        app:cv_border_color=\"#000000\"\n        app:cv_border_width=\"4dp\"\n        app:cv_color=\"@color/primary\"\n        app:cv_shadow=\"true\"\n        tools:ignore=\"RtlHardcoded\" />\n\n</FrameLayout>"
  },
  {
    "path": "circleview-example/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"primary\">#424242</color>\n    <color name=\"primary_dark\">#212121</color>\n    <color name=\"accent\">@color/primary</color>\n</resources>\n"
  },
  {
    "path": "circleview-example/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">CircleView</string>\n</resources>\n"
  },
  {
    "path": "circleview-example/src/main/res/values/themes.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <style name=\"Base.Theme\" parent=\"Base.V1.Theme\" />\n\n    <style name=\"Base.V1.Theme\" parent=\"Theme.AppCompat.Light.DarkActionBar\">\n        <item name=\"colorPrimary\">@color/primary</item>\n        <item name=\"colorPrimaryDark\">@color/primary_dark</item>\n        <item name=\"colorAccent\">@color/accent</item>\n    </style>\n\n</resources>\n\n"
  },
  {
    "path": "circleview-example/src/main/res/values-v21/themes.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <style name=\"Base.Theme\" parent=\"Base.V21.Theme\" />\n\n    <style name=\"Base.V21.Theme\" parent=\"Base.V1.Theme\">\n        <item name=\"android:windowDrawsSystemBarBackgrounds\">true</item>\n        <item name=\"android:navigationBarColor\">@color/primary</item>\n    </style>\n\n</resources>"
  },
  {
    "path": "dependencies.gradle",
    "content": "allprojects {\n    repositories {\n        google()\n        mavenCentral()\n    }\n}\n\next {\n    // APP VERSION\n    androidVersionCode          = 14\n    androidVersionName          = '1.4.1'\n    libraryGroupId              = 'com.mikhaellopez'\n    libraryArtifactId           = 'circleview'\n    libraryVersion              = androidVersionName\n\n    // ANDROID VERSION\n    androidCompileSdkVersion    = 32\n    androidMinSdkVersion        = 14\n    androidTargetSdkVersion     = androidCompileSdkVersion\n\n    // KOTLIN\n    kotlinStdlib                = \"org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version\"\n\n    // ANDROID LIB\n    androidXAppCompat           = \"androidx.appcompat:appcompat:1.5.0\"\n\n    // UI\n    lobsterPicker               = \"com.larswerkman:lobsterpicker:1.0.1\"\n\n    // DEPENDENCY CHECK STRATEGY\n    dependencyUpdatesStrategy = {\n        def isNonStable = { String version ->\n            def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { keyword ->\n                version.toUpperCase().contains(keyword)\n            }\n            def regex = /^[0-9,.v-]+(-r)?$/\n            return !stableKeyword && !(version ==~ regex)\n        }\n        componentSelection {\n            all {\n                if (isNonStable(it.candidate.version) && !isNonStable(it.currentVersion)) {\n                    reject('Release candidate')\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "gradle/publish-mavencentral.gradle",
    "content": "apply plugin: 'maven-publish'\napply plugin: 'signing'\n\ntask androidSourcesJar(type: Jar) {\n    archiveClassifier.set('sources')\n    from android.sourceSets.main.java.sourceFiles\n}\n\nafterEvaluate {\n    publishing {\n        publications {\n            release(MavenPublication) {\n                groupId = libraryGroupId\n                artifactId = libraryArtifactId\n                version = libraryVersion\n\n                from components.release\n                artifact androidSourcesJar\n\n                pom {\n                    name = 'CircleView'\n                    packaging = 'aar'\n                    description = 'This is an Android project allowing to realize a circular View in the simplest way possible.'\n                    url = 'https://github.com/lopspower/CircleView'\n\n                    groupId = libraryGroupId\n                    artifactId = libraryArtifactId\n                    version = libraryVersion\n\n                    scm {\n                        connection = 'scm:git:https://github.com/lopspower/CircleView'\n                        developerConnection = 'scm:git:https://github.com/lopspower/CircleView'\n                        url = 'https://github.com/lopspower/CircleView'\n                    }\n                    licenses {\n                        license {\n                            name = 'The Apache License, Version 2.0'\n                            url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'\n                        }\n                    }\n                    developers {\n                        developer {\n                            id = 'mikhael.lopez'\n                            name = 'Mikhael LOPEZ'\n                            email = 'lopez.mikhael@gmail.com'\n                        }\n                    }\n                }\n            }\n        }\n        repositories {\n            maven {\n                name = \"ossrh\"\n                url = \"https://oss.sonatype.org/service/local/staging/deploy/maven2/\"\n                credentials {\n                    username = ossrhUsername\n                    password = ossrhPassword\n                }\n            }\n        }\n    }\n}\n\nsigning {\n    sign publishing.publications\n}"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Fri Sep 13 10:50:05 CEST 2019\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-7.3.3-all.zip\n"
  },
  {
    "path": "gradle.properties",
    "content": "android.useAndroidX=true\nandroid.enableJetifier=true"
  },
  {
    "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": "gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto init\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto init\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:init\n@rem Get command-line arguments, handling Windows variants\n\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\n\n:win9xME_args\n@rem Slurp the command line arguments.\nset CMD_LINE_ARGS=\nset _SKIP=2\n\n:win9xME_args_slurp\nif \"x%~1\" == \"x\" goto execute\n\nset CMD_LINE_ARGS=%*\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "publish.sh",
    "content": "#!/usr/bin/env bash\n./gradlew clean\n./gradlew publish"
  },
  {
    "path": "settings.gradle",
    "content": "include ':circleview-example', ':circleview'\n"
  }
]