From 153e9ce8cee0b7083454718050dc598cb78ca9c3 Mon Sep 17 00:00:00 2001 From: sunmondong Date: Fri, 11 Nov 2016 18:43:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=BE=9D=E8=B5=96=E8=B7=AF?= =?UTF-8?q?=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.master.gradle | 4 +- build.master.gradle.bak | 86 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 build.master.gradle.bak diff --git a/build.master.gradle b/build.master.gradle index cc3bea2327..c5cc1b92da 100644 --- a/build.master.gradle +++ b/build.master.gradle @@ -27,8 +27,8 @@ task appletJar<<{ fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") } - unjar(src:"${libDir}/3rd.jar",dest:"${libDir}/tmp-${branchName}") - unjar(src:"${libDir}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") + unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"${libDir}/tmp-${branchName}") + unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") jar(jarfile:"build/libs/fr-applet-8.0.jar"){ fileset(dir:"build/classes"){ exclude(name:"*.*") diff --git a/build.master.gradle.bak b/build.master.gradle.bak new file mode 100644 index 0000000000..a10a5e4277 --- /dev/null +++ b/build.master.gradle.bak @@ -0,0 +1,86 @@ +apply plugin: "java" +tasks.withType(JavaCompile){ + options.encoding = "UTF-8" +} + +def basicDir="../../" +def libDir="${basicDir}/finereport-lib-stable" +//获取什么分支名 +FileTree files =fileTree(dir:"./",include:"build.*.gradle") +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ("\\")) +def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1) + +task appletJar<<{ + + ant{ + mkdir(dir:"${libDir}/tmp-${branchName}") + mkdir(dir:"build/classes/") + copy(todir:"build/classes/"){ + fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-chart-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-report-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-platform-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") + + } + unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"${libDir}/tmp-${branchName}") + unjar(src:"${libDir}/branchName/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") + 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/**") + } + fileset(dir:"${libDir}/tmp-${branchName}"){ + 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:"build/classes"){ + include(name:"com/fr/web/*.class") + include(name:"com/fr/web/attr/*.class") + } + } + delete(dir:"${libDir}/tmp-${branchName}") + def jdk6home= "D:/FineReport/develop/java/jdk1.6u35" + def keystore="frapplet.store" + def keycert="fr.cert" + def keypassword="123456" + def keyalias="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} 'build/libs/fr-applet-8.0.jar' ${keyalias}") + } + delete(file:"${keystore}") + delete(file:"${keycert}") + delete(dir:"build/classes") + + } + +} \ No newline at end of file