@AGENTS.md
Primary reference: AGENTS.md (imported above) covers setup, build commands, conventions, and gotchas. Read it before touching any file.
cloudinary_java is the official server-side Cloudinary SDK for the JVM. The published artifact is cloudinary-http5 (group com.cloudinary), built on Apache HttpClient 5. Use it from Java backends — Spring Boot, servlets, batch jobs — where the api_secret must stay private.
- Multi-module Gradle build. Depend on
cloudinary-http5; it pulls incloudinary-coretransitively. Do not depend oncloudinary-coredirectly for HTTP work. - Artifact coordinate changed at 2.x. The legacy
cloudinary-http45coordinate belongs to the 1.x line only — there is nocloudinary-http45:2.x. Change theartifactIdtocloudinary-http5when upgrading from 1.x. - Java 8 source level. No Java 9+ language features or APIs anywhere in the codebase (
sourceCompatibility = targetCompatibility = 1.8). api_secretis server-only. Never ship it to a browser or Android bundle. Use the signed-upload pattern (server signs, browser posts directly to Cloudinary) to keep the secret off the client.- Not for Android. Use
cloudinary_android. Not for idiomatic Kotlin: usecloudinary_kotlin. - Integration tests need a live cloud. CI provisions a throwaway sub-account via
./gradlew createTestSubAccount. For offline/unit work, skip that step — unit tests incloudinary-coreandcloudinary-http5run without credentials.
./gradlew build # compile + assemble all modules
./gradlew :cloudinary-core:test # unit tests, no credentials needed
./gradlew :cloudinary-http5:test # HTTP module unit tests
# Full integration suite (needs CLOUDINARY_URL):
./gradlew -DCLOUDINARY_URL=$CLOUDINARY_URL ciTest -p cloudinary-http5 -iUse gradlew.bat instead of ./gradlew on Windows. There is no separate lint or formatter task in the Gradle build.