Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
148 lines (120 sloc) 5.04 KB
import proguard.gradle.ProGuardTask
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'com.bmuschko.tomcat'
apply plugin: 'jacoco'
repositories {
mavenCentral()
}
dependencies {
def tomcatVersion = '9.0.10'
compile 'com.sun.mail:javax.mail:1.5.2',
'com.sun.mail:smtp:1.5.2',
'commons-codec:commons-codec:1.9',
'commons-fileupload:commons-fileupload:1.3.1',
'javax.servlet:javax.servlet-api:4.0.+',
'javax.servlet.jsp:jsp-api:2.2.+',
'org.apache.commons:commons-collections4:4.0',
'org.apache.commons:commons-csv:1.1',
'org.apache.commons:commons-dbcp2:2.5.0',
'org.bouncycastle:bctls-jdk15on:1.59'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1',
'org.mockito:mockito-core:2.23.0';
testCompile 'net.sourceforge.htmlunit:htmlunit:2.15'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1',
'org.apache.derby:derby:10.14.2.0'
runtime 'opensymphony:sitemesh:2.4.2',
'javax.servlet:jstl:1.2'
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}"
}
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'net.sf.proguard:proguard-gradle:5.3'
classpath 'com.bmuschko:gradle-tomcat-plugin:2.3'
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0-M4'
}
}
test {
useJUnitPlatform()
dependsOn 'cleanTest'
testLogging { events "passed", "skipped", "failed" }
}
jacoco {
toolVersion = "0.8.2"
}
jacocoTestReport {
group = "Reporting"
reports {
xml.enabled true
csv.enabled false
html.destination file("${buildDir}/reports/coverage")
}
}
task proguard(type: ProGuardTask, dependsOn: jar) {
configurations.runtime.each {
println it
}
injars jar.archivePath
outjars 'passwordsafe.jar'
libraryjars "${System.getProperty('java.home')}/lib/rt.jar"
libraryjars "${System.getProperty('java.home')}/lib/jce.jar"
libraryjars(configurations.runtime)
printmapping 'proguard.map'
dontusemixedcaseclassnames
dontshrink
keepclassmembers 'class * extends java.lang.Enum { \
public static **[] values(); \
public static ** valueOf(java.lang.String); \
}'
keepclassmembers 'class * implements java.io.Serializable { \
static final long serialVersionUID; \
static final java.io.ObjectStreamField[] serialPersistentFields; \
private void writeObject(java.io.ObjectOutputStream); \
private void readObject(java.io.ObjectInputStream); \
java.lang.Object writeReplace(); \
java.lang.Object readResolve(); \
}'
keep 'public class * implements javax.servlet.Filter'
keep 'public class * implements javax.servlet.Servlet'
keep 'public class com.enterprisepasswordsafe.engine.configuration.JDBCConfiguration'
keep 'public class * implements com.enterprisepasswordsafe.engine.dbabstraction.AbstractDAL'
keep 'public interface com.enterprisepasswordsafe.engine.integration.PasswordChanger'
keep 'public class com.enterprisepasswordsafe.engine.integration.PasswordChangerProperty'
keep 'public class * implements com.enterprisepasswordsafe.engine.integration.PasswordChanger { \
public void rollbackChange(java.sql.Connection, java.util.Map, java.util.Map, java.lang.String); \
public void changePassword(java.sql.Connection, java.util.Map, java.util.Map, java.lang.String); \
public java.util.List getProperties(); \
public void install(java.sql.Connection); \
public void uninstall(java.sql.Connection); \
}'
keepclassmembers 'public class * implements javax.security.auth.spi.LoginModule { \
void initialize(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler, java.util.Map<java.lang.String,?>, java.util.Map<java.lang.String,?>); \
boolean login(); \
boolean commit(); \
boolean abort(); \
boolean logout(); \
}'
keep 'public interface com.enterprisepasswordsafe.proguard.ExternalInterface'
keep 'public class * implements com.enterprisepasswordsafe.proguard.ExternalInterface { \
public *** *; \
public *** *(...); \
}'
keep 'public interface com.enterprisepasswordsafe.proguard.JavaBean'
keep 'public class * implements com.enterprisepasswordsafe.proguard.JavaBean { \
void set*(***); \
void set*(int, ***); \
boolean is*(); \
boolean is*(int); \
*** get*(); \
*** get*(int); \
}'
keepclassmembers 'public class com.enterprisepasswordsafe.engine.database.ConfigurationListenersDAO { \
void addListener( java.lang.String, com.enterprisepasswordsafe.engine.database.ConfigurationListenersDAO$ConfigurationListener ); \
}'
}