Repository navigation
ZHttp JVM
Remove Android-Specific Code and Dependencies
Overview
This PR focuses on making the library platform-independent by removing all Android-specific code and dependencies. The main changes include replacing Android log statements with System.err.println() and eliminating any dependencies that were specific to the Android platform.
Changes Made
- Logging:
- Replaced all instances of
android.util.LogwithSystem.err.println()for error messages andSystem.out.println()for general logs. This ensures compatibility across different JVM environments.
- Replaced all instances of
- Dependencies:
- Removed all Android-specific dependencies from the
build.gradlefile. This helps in ensuring that the library can be used in non-Android projects without pulling in unnecessary dependencies.
- Removed all Android-specific dependencies from the
- Configuration:
- Updated the
build.gradleto remove configurations that were specific to Android, ensuring a clean setup for JVM-based projects.
- Updated the
- Unit Tests:
- Ensured all unit tests run successfully without relying on any Android-specific setup. This helps in maintaining the reliability of the library across different platforms.
Impact
These changes make the library more versatile and usable in a wider range of projects, including Kotlin console applications and other JVM-based environments. By removing the Android-specific code and dependencies, the library is now more lightweight and easier to integrate into non-Android projects.
Verification
- Unit Tests: All existing unit tests were run to verify that the library functions correctly without the Android-specific code.
- Manual Testing: Conducted manual tests in a JVM environment to ensure that logging and other functionalities work as expected.
Conclusion
This PR makes the library more adaptable and platform-independent by removing Android-specific code and dependencies. It maintains the core functionalities while broadening the scope of potential use cases.