forked from fanruan/design
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.
92 lines
2.9 KiB
92 lines
2.9 KiB
apply plugin: 'java' |
|
tasks.withType(JavaCompile){ |
|
options.encoding = 'UTF-8' |
|
} |
|
|
|
task appletJar<<{ |
|
|
|
ant{ |
|
mkdir(dir:'../finereport-lib-stable/tmp') |
|
mkdir(dir:'build/classes/') |
|
copy(todir:'build/classes/'){ |
|
fileset(dir:'../finereport-core-stable/build/classes/main'){ |
|
include(name:'**/*.*') |
|
} |
|
fileset(dir:'../finereport-chart-stable/build/classes/main'){ |
|
include(name:'**/*.*') |
|
} |
|
fileset(dir:'../finereport-report-stable/build/classes/main'){ |
|
include(name:'**/*.*') |
|
} |
|
|
|
fileset(dir:'../finereport-platform-stable/build/classes/main'){ |
|
include(name:'**/*.*') |
|
} |
|
fileset(dir:'../finereport-performance-stable/build/classes'){ |
|
include(name:'**/*.*') |
|
} |
|
|
|
|
|
} |
|
unjar(src:'../finereport-lib-stable/3rd.jar',dest:'finereport-lib-stable/tmp') |
|
unjar(src:'../finereport-lib-stable/servlet-api.jar',dest:'finereport-lib-stable/tmp') |
|
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:'om/fr/fs/**') |
|
exclude(name:'com/fr/design/**') |
|
exclude(name:'com/fr/start/**') |
|
exclude(name:'com/fr/process/**') |
|
} |
|
fileset(dir:'../finereport-lib-stable/tmp'){ |
|
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/**') |
|
|
|
} |
|
fileset(dir:'buildclasses'){ |
|
include(name:'com/fr/web/*.class') |
|
include(name:'com/fr/web/attr/*.class') |
|
} |
|
} |
|
delete(dir:'../finereport-lib-stable/tmp') |
|
def jdk6home= 'D:/FineReport/develop/java/jdk1.6u35' |
|
def keystore='frapplet.store' |
|
def keycert='fr.cert' |
|
def keypassword='123456' |
|
def keyalias='fr' |
|
//property(name:'jdk1.6.home',value:'D:/FineReport/develop/java/jdk1.6u35') |
|
//property(name:'keystore',value:'frapplet.store') |
|
//property(name:'keycert',value:'fr.cert') |
|
//property(name:'keypasssword',value:'123456') |
|
//property(name:'keyalias',value:'fr') |
|
|
|
exec(executable:"${jdk6home}/bin/keytool"){ |
|
arg(line:"-genkey -dname "CN=FineReport L=NanJing C=China" -keystore ${keystore} -alias ${keyalias} -validity 3650 -storepass ${keypassword}") |
|
} |
|
exec(executable:"${jdk6home}/bin/keytool"){ |
|
arg(line:"-export -keystore ${keystore} -alias ${keyalias} -file ${keycert} -storepass ${keypassword}") |
|
} |
|
|
|
exec(executable:"${jdk6home}/bin/jarsigner"){ |
|
arg(line:"-keystore ${keystore} -storepass ${keypassword} ${applet_jar} ${keyalias}") |
|
} |
|
delete(file:"${keystore}") |
|
delete(file:"${keycert}") |
|
delete(dir:'build/classes') |
|
|
|
} |
|
|
|
} |