Skip to content

Gradle Plugin Manual

Installation

Download and extract the plugin into some directory that will be referred to as gradle-plugin-dir .

Ensure you have the following configuration in build.gradle :

plugins {
    ...
    id 'cryptosense version' '0.0.1'
}

repositories {
    ...
    ivy {
        url 'gradle-plugin-dir'
    }
}

cryptosense {
    agentVersion = '0.0.1'
    apiKey = 'myapikey'
    apiUrl = 'https://analyzer.cryptosense.com'
    projectId = project_id
    profileId = profile_id
}

The numerical integers for project_id and profile_id are visible in the web application:

  • projectId as part of the URL https://analyzer.cryptosense.com/project/<project_id>/dashboard
  • profileId as part of the URL https://analyzer.cryptosense.com/organization/profiles/<profile_id>/detail

And in settings.gradle :

pluginManagement {
    repositories {
    ivy {
        url 'gradle-plugin-dir'
    }
    gradlePluginPortal()
    }
}

Usage

Run the tests with:

./gradlew cleanTest test -Pwith-cryptosense

This will output a JSON report to report.json and the tests will be marked as failed if any crypto misuse is found.