How dmytrodanylyk/circular-progress-button works
Main Components
• Library Module:
• This is located under the “library” directory.
• Contains core source code (files such as CircularProgressButton.java, CircularAnimatedDrawable.java, MorphingAnimation.java, etc.) that implement the UI behavior, animations, and state management for the button.
• Sample Module:
• Stored under the “sample” directory.
• Demonstrates the usage of the library with sample Activities (MainActivity.java, Sample1Activity.java, etc.), along with sample-level Android resources (layouts, drawables, values).
• Build & CI/CD Infrastructure:
• Gradle build files at the root, in the library, and sample directories.
• GitHub workflows (found under .github/workflows) that automate CI tasks such as Android builds and updating the Gradle wrapper.
• Other build-related files like the gradlew scripts, gradle.properties, and settings.gradle.
• External Integration Points:
• Maven Central/JitPack integration for distribution.
• Configuration for ProGuard rules (as noted in both the project files and the README).
Relationships and Interactions
• The Library Module is the core component that is built and distributed for use by external projects.
• The Sample Module acts as a consumer of the library, demonstrating how the UI components work and interact in a full Android activity lifecycle.
• Gradle build scripts manage dependencies, compile the source code, and run tests/CI workflows.
• CI/CD pipelines (GitHub workflows) ensure that any changes are automatically built and released. These workflows interact with the repository and external services like JitPack.
• ProGuard configurations are used to maintain compatibility and optimize the library for production use.
Important Architectural Patterns & Design Principles
• Modularization: The project is split into at least two modules (library and sample) to separate core functionality from demonstration code.
• Separation of Concerns: Core functionality (animation, state management, and UI interactions) are contained in the library while the sample app is solely for demonstration.
• Config-driven builds and automation: Use of Gradle, GitHub Actions workflows, and structured ProGuard configurations.