External Dependencies
Gson 2.10.1
Location:lib/gson-2.10.1.jar
Purpose: JSON parsing and serialization for API responses
Usage: The ConsultaMoneda class uses Gson to parse JSON responses from the ExchangeRate-API:
- Lightweight and reliable
- Simple API for parsing JSON
- No additional dependencies
- Widely used in Java projects
Java Standard Library
The application relies on several Java standard library packages:HTTP Client (java.net.http)
Introduced: Java 11 Usage: Making HTTP requests to the ExchangeRate-APIsrc/lad/com/alura/conversormoneda/modelos/ConsultaMoneda.java:6-9
Scanner (java.util)
Usage: Reading user input from consolesrc/lad/com/alura/conversormoneda/controladores/ConversorApp.java:10
LocalDateTime (java.time)
Usage: Timestamping conversion history recordssrc/lad/com/alura/conversormoneda/controladores/ConversorApp.java:7
Collections (java.util)
Usage: Managing conversion historysrc/lad/com/alura/conversormoneda/controladores/ConversorApp.java:8-9
No Build Tool Required
This project intentionally does not use Maven or Gradle. It demonstrates pure Java compilation with manual dependency management.
Why No Build Tool?
- Educational simplicity: Focus on Java fundamentals
- Minimal setup: No build configuration files needed
- Single dependency: Only Gson JAR required
- Transparent process: See exactly what happens during compilation
Comparison with Build Tools
| Aspect | Manual Compilation | Maven/Gradle |
|---|---|---|
| Setup complexity | Minimal | Requires build file |
| Dependencies | 1 JAR file | Automatic download |
| Learning curve | Low | Medium-High |
| Build reproducibility | Manual | Automated |
| Best for | Learning, small projects | Production, large teams |
Updating Gson
If you need to update Gson to a newer version:Visit the Gson releases page and download the desired JAR file.
javac -cp "lib/gson-X.X.X.jar" -d out src/lad/com/alura/conversormoneda/**/*.java
java -cp "out:lib/gson-X.X.X.jar" lad.com.alura.conversormoneda.controladores.ConversorApp
Dependency Verification
Verify the Gson JAR is present:~277 KB file size
API Dependency
External Service: ExchangeRate-API (v6) Endpoint:https://v6.exchangerate-api.com/v6/
Usage: Real-time currency conversion rates
The application requires an active internet connection to fetch current exchange rates. The API key is embedded in the source code for demonstration purposes.
src/lad/com/alura/conversormoneda/modelos/ConsultaMoneda.java:17