Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.
/ code-sdk-java Public archive

Snyk Code Public API package in Java

License

Notifications You must be signed in to change notification settings

snyk/code-sdk-java

Repository files navigation

java-client

Deepcode Public API package in Java

deepcode

For low level APIs look for DeepCodeRestApi public methods. For descriptions - look Rest APIs and CLI

For high-level APIs look inside ai.deepcode.javaclient.core package. Here common logic for any Java made IDE presented as abstract classes that need to be instantiated and finalised with platform specific code. See jetbrains-plugin for usage example.

Architect overview of common logic: Inversion of Control (Dependency Injection pattern) is implemented through constructor parameters injection.

Build the jar

To make a standalone jar file with all dependencies use shadowJar gradle task.

  • Run gradle task: source gradlew shadowJar
  • Look for resulting JAR file at ./build/libs

Run tests

  • 2 environment variables with already logged Tokens need to be declared:

DEEPCODE_API_KEY - logged at https://www.deepcode.ai Token

DEEPCODE_API_KEY_STAGING - logged at https://www.deepcoded.com Token

  • Run gradle test task: source gradlew test --stacktrace --scan