Integrating Java hash signing CSP with Gradle

To integrate the CSP with your Gradle implementation, add the following code snippet to your build.gradle file.

apply plugin: 'java'
task sign(type: Exec, dependsOn: 'jar', description: 'jar signing using Symantec Java CSP', group: 'Build')
def storePassword = "changeit"
def keyPassword = "changeit"
def keyStore = "NONE"
def storeType = "SAS"
def providerClass = ""
def cspPropertiesFile = "C:/users/anshuman_mor/desktop/testing/java/"
def alias = "Ft3_27072018,vanilla-gradle"
commandLine "${System.env.JAVA_HOME}/bin/jarsigner.exe", "-J-DcspPropertiesFile=" + cspPropertiesFile, "-keystore", keyStore, "-storepass", storePassword, "-keypass", keyPassword, "-providerClass", providerClass, "-storetype", storeType, jar.archivePath, alias

See jarsigner and CSP properties for more information on these integration tools.

We use cookies to ensure that we give you the best experience on our website. By using this site, you agree to the Terms of Service.