You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
2.8 KiB
86 lines
2.8 KiB
8 years ago
|
apply plugin: "java"
|
||
8 years ago
|
tasks.withType(JavaCompile){
|
||
8 years ago
|
options.encoding = "UTF-8"
|
||
8 years ago
|
}
|
||
8 years ago
|
|
||
8 years ago
|
def basicDir="../../"
|
||
8 years ago
|
def libDir="${basicDir}/finereport-lib-stable"
|
||
8 years ago
|
//获取什么分支名
|
||
8 years ago
|
FileTree files =fileTree(dir:"./",include:"build.*.gradle")
|
||
8 years ago
|
def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ("\\"))
|
||
8 years ago
|
def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1)
|
||
8 years ago
|
|
||
8 years ago
|
task appletJar<<{
|
||
8 years ago
|
|
||
|
ant{
|
||
8 years ago
|
mkdir(dir:"${libDir}/tmp-${branchName}")
|
||
8 years ago
|
mkdir(dir:"build/classes/")
|
||
|
copy(todir:"build/classes/"){
|
||
|
fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main")
|
||
8 years ago
|
|
||
8 years ago
|
fileset(dir:"${basicDir}/finereport-chart-stable/${branchName}/build/classes/main")
|
||
8 years ago
|
|
||
8 years ago
|
fileset(dir:"${basicDir}/finereport-report-stable/${branchName}/build/classes/main")
|
||
8 years ago
|
|
||
8 years ago
|
fileset(dir:"${basicDir}/finereport-platform-stable/${branchName}/build/classes/main")
|
||
8 years ago
|
|
||
8 years ago
|
fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main")
|
||
8 years ago
|
|
||
|
}
|
||
8 years ago
|
unjar(src:"${libDir}/3rd.jar",dest:"${libDir}/tmp-${branchName}")
|
||
|
unjar(src:"${libDir}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}")
|
||
8 years ago
|
jar(jarfile:"build/libs/fr-applet-8.0.jar"){
|
||
|
fileset(dir:"build/classes"){
|
||
|
exclude(name:"*.*")
|
||
|
exclude(name:"bin/*.*")
|
||
|
exclude(name:"classes/**")
|
||
|
exclude(name:"com/fr/schedule/**")
|
||
|
exclude(name:"com/fr/cell/**")
|
||
|
exclude(name:"com/fr/dialog/**")
|
||
|
exclude(name:"com/fr/view/**")
|
||
|
exclude(name:"com/fr/web/**")
|
||
|
exclude(name:"com/fr/fs/**")
|
||
|
exclude(name:"com/fr/design/**")
|
||
|
exclude(name:"com/fr/start/**")
|
||
|
exclude(name:"com/fr/process/**")
|
||
8 years ago
|
}
|
||
8 years ago
|
fileset(dir:"${libDir}/tmp-${branchName}"){
|
||
8 years ago
|
include(name:"javax/mail/**")
|
||
|
include(name:"javax/servlet/**")
|
||
|
include(name:"org/freehep/**")
|
||
|
include(name:"com/fr/third/JAI/**")
|
||
|
include(name:"com/fr/third/antlr/**")
|
||
|
include(name:"com/fr/third/javax/**")
|
||
|
include(name:"com/sun/xml/**")
|
||
|
include(name:"javax/xml/**")
|
||
8 years ago
|
|
||
|
}
|
||
8 years ago
|
fileset(dir:"build/classes"){
|
||
|
include(name:"com/fr/web/*.class")
|
||
|
include(name:"com/fr/web/attr/*.class")
|
||
8 years ago
|
}
|
||
|
}
|
||
8 years ago
|
delete(dir:"${libDir}/tmp-${branchName}")
|
||
8 years ago
|
def jdk6home= "D:/FineReport/develop/java/jdk1.6u35"
|
||
|
def keystore="frapplet.store"
|
||
|
def keycert="fr.cert"
|
||
|
def keypassword="123456"
|
||
|
def keyalias="fr"
|
||
8 years ago
|
|
||
|
exec(executable:"${jdk6home}/bin/keytool"){
|
||
8 years ago
|
arg(line:"-genkey -dname "CN=FineReport L=NanJing C=China" -keystore ${keystore} -alias ${keyalias} -validity 3650 -storepass ${keypassword}")
|
||
|
}
|
||
8 years ago
|
exec(executable:"${jdk6home}/bin/keytool"){
|
||
8 years ago
|
arg(line:"-export -keystore ${keystore} -alias ${keyalias} -file ${keycert} -storepass ${keypassword}")
|
||
|
}
|
||
|
|
||
8 years ago
|
exec(executable:"${jdk6home}/bin/jarsigner"){
|
||
8 years ago
|
arg(line:"-keystore ${keystore} -storepass ${keypassword} 'build/libs/fr-applet-8.0.jar' ${keyalias}")
|
||
8 years ago
|
}
|
||
|
delete(file:"${keystore}")
|
||
|
delete(file:"${keycert}")
|
||
8 years ago
|
delete(dir:"build/classes")
|
||
8 years ago
|
|
||
|
}
|
||
|
|
||
|
}
|