From 98f853326293d45321a7a0c34b002c65c28697ff Mon Sep 17 00:00:00 2001 From: fangdong sun Date: Tue, 9 Aug 2016 19:09:02 +0800 Subject: [PATCH 01/13] =?UTF-8?q?build.gradle=E6=9B=B4=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E5=A4=9A=E5=88=86=E6=94=AF=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 85 +++++++++++++++++++++++++++++++++++++ designer_base/build.gradle | 37 ++++++++++------ designer_chart/build.gradle | 35 +++++++++------ designer_form/build.gradle | 54 +++++++++++++++-------- 4 files changed, 166 insertions(+), 45 deletions(-) create mode 100644 build.gradle diff --git a/build.gradle b/build.gradle new file mode 100644 index 000000000..11222785b --- /dev/null +++ b/build.gradle @@ -0,0 +1,85 @@ +apply plugin: 'java' +tasks.withType(JavaCompile){ + options.encoding = 'UTF-8' +} +def libDir='${libDir}' +def basicDir='../../' +//获取什么分支名 +FileTree files =fileTree(dir:'./',include:'build.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +def branchName=buildDir.substring(build.DirlastIndexOf ('\\')+1) + +task appletJar<<{ + + ant{ + mkdir(dir:'${libDir}/tmp') + 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}/3rd.jar',dest:'${libDir}/tmp') + unjar(src:'${libDir}/servlet-api.jar',dest:'${libDir}/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:'com/fr/fs/**') + exclude(name:'com/fr/design/**') + exclude(name:'com/fr/start/**') + exclude(name:'com/fr/process/**') + } + fileset(dir:'${libDir}/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:'build/classes'){ + include(name:'com/fr/web/*.class') + include(name:'com/fr/web/attr/*.class') + } + } + delete(dir:'${libDir}/tmp') + 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 diff --git a/designer_base/build.gradle b/designer_base/build.gradle index 319cc17f2..731deebe3 100644 --- a/designer_base/build.gradle +++ b/designer_base/build.gradle @@ -3,36 +3,45 @@ apply plugin: 'java' tasks.withType(JavaCompile){ options.encoding = 'UTF-8' } +//指定构建的jdk版本 +sourceCompatibility=1.8 +//指定生成jar包版本 version='8.0' - +//生成jar包重命名 jar{ baseName='fr-designer-core' } -def srcDir="${System.getenv()['JENKINS_HOME']}/workspace/design" -def libDir="${System.getenv()['JENKINS_HOME']}/workspace/lib" +def srcDir="." +//指定源码路径 sourceSets{ main{ java{ - srcDirs=["${srcDir}/designer_base/src"] + srcDirs=["${srcDir}/src"] } } } +//获取什么分支名 +FileTree files =fileTree(dir:'./',include:'build.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) - +//声明外部依赖 dependencies{ -compile fileTree(dir:'../../',include:'**/*.jar') -compile fileTree(dir:libDir,include:'*.jar') -compile fileTree(dir:"${libDir}/jetty",include:'*.jar') + +compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') +compile fileTree(dir:'../../../',include:'finereport-*-stable/**/*.jar') + testCompile 'junit:junit:4.12' } - +//复制非.java文件到classes文件夹下参与打包 task copyFile(type:Copy,dependsOn:compileJava){ copy{ - from ("${srcDir}/designer_base/src"){ - exclude '**/*.java' + from ("${srcDir}/src"){ + exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' } into 'build/classes/main' } @@ -44,13 +53,13 @@ task copyFile(type:Copy,dependsOn:compileJava){ task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath { - fileset(dir:'../../lib',includes:'*.jar') + fileset(dir:'../../../finereport-build-stable',includes:'**/*.jar') } } ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false", , charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ - fileset (dir:"${srcDir}/designer_base/src"){ + fileset (dir:"${srcDir}/src"){ include (name:'**/*.js') - + include (name:'**/*.css') } } diff --git a/designer_chart/build.gradle b/designer_chart/build.gradle index 2a667bf82..92e221f19 100644 --- a/designer_chart/build.gradle +++ b/designer_chart/build.gradle @@ -3,12 +3,14 @@ apply plugin: 'java' tasks.withType(JavaCompile){ options.encoding = 'UTF-8' } - +//指定构建的jdk版本 +sourceCompatibility=1.8 +//指定生成jar包的版本 version='8.0' -def srcDir="${System.getenv()['JENKINS_HOME']}/workspace/design" -def libDir="${System.getenv()['JENKINS_HOME']}/workspace/lib" +def srcDir="." +//对生成的jar包进行重命名 jar{ baseName='fr-designer-chart' @@ -17,21 +19,28 @@ jar{ sourceSets{ main{ java{ - srcDirs=["${srcDir}/designer_chart/src"] + srcDirs=["${srcDir}/src"] } } } +FileTree files =fileTree(dir:'./',include:'build.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) + +//指定外部依赖 dependencies{ -compile fileTree(dir:'../../',include:'**/*.jar') -compile fileTree(dir:libDir,include:'*.jar') -compile fileTree(dir:"${libDir}/jetty",include:'*.jar') +compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') +compile fileTree(dir:'../../../',include:'finereport-*-stable/${branchName}/**/*.jar') + testCompile 'junit:junit:4.12' } - +//将非.java 文件复制到classes文件夹下参与打包 task copyFile(type:Copy,dependsOn:compileJava){ copy{ - from ("${srcDir}/designer_chart/src"){ - exclude '**/*.java' + from ("${srcDir}/src"){ + exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' + } into 'build/classes/main' } @@ -42,13 +51,13 @@ task copyFile(type:Copy,dependsOn:compileJava){ task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath { - fileset(dir:'../../lib',includes:'*.jar') + fileset(dir:'../../../finereport-build-stable',includes:'**/*.jar') } } ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false", , charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ - fileset (dir:"${srcDir}/designer_chart/src"){ + fileset (dir:"${srcDir}/src"){ include (name:'**/*.js') - + include (name:'**/*.css') } } diff --git a/designer_form/build.gradle b/designer_form/build.gradle index 1a87cbf95..118215fc8 100644 --- a/designer_form/build.gradle +++ b/designer_form/build.gradle @@ -3,39 +3,56 @@ apply plugin: 'java' tasks.withType(JavaCompile){ options.encoding = 'UTF-8' } - +//指定构建的jdk版本 +sourceCompatibility=1.8 +//指定生成的jar包版本 version='8.0' -def srcDir="${System.getenv()['JENKINS_HOME']}/workspace/design" -def libDir="${System.getenv()['JENKINS_HOME']}/workspace/lib" +def srcDir="." +//指明生成jar包的名字 jar{ baseName='fr-designer-report' } - +//源码所在位置 sourceSets{ main{ java{ - srcDirs=["${srcDir}/designer/src", -"${srcDir}/designer_form/src"] + srcDirs=["${srcDir}/src", +"${srcDir}/../designer/src"] } } } + +//获取什么分支名 +FileTree files =fileTree(dir:'./',include:'build.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) + +//声明外部依赖 dependencies{ -compile fileTree(dir:'../../',include:'**/*.jar') -compile fileTree(dir:libDir,include:'*.jar') -compile fileTree(dir:"${libDir}/jetty",include:'*.jar') +compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') +compile fileTree(dir:'../../../',include:'finereport-*-stable/**/*.jar') + testCompile 'junit:junit:4.12' } +//指明无法编译文件所在路径 +def dataContent ={def dir -> + copySpec{ + from ("${dir}"){ + exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' + } + } +} +//将非.java文件复制到classes文件夹下 参与打包 task copyFile(type:Copy,dependsOn:compileJava){ copy{ - from ("${srcDir}/designer/src"){ - exclude '**/*.java' - } - from ("${srcDir}/designer_form/src") + with dataContent.call("${srcDir}/src") + with dataContent.call("${srcDir}/../designer/src") into ('build/classes/main') } @@ -46,17 +63,18 @@ task copyFile(type:Copy,dependsOn:compileJava){ task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath { - fileset(dir:'../../lib',includes:'*.jar') + fileset(dir:'../../../finereport-build-stable',includes:'**/*.jar') } } - ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false", , charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ - fileset (dir:"${srcDir}/designer/src"){ + ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false", charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ + fileset (dir:"${srcDir}/src"){ include (name:'**/*.js') + include (name:'**/*.css') } - fileset (dir:"${srcDir}/designer_form/src"){ + fileset (dir:"${srcDir}/../designer/src"){ include (name:'**/*.js') - + include (name:'**/*.css') } } From 6b48ce010d453faa18e6d51541c73436bf31514d Mon Sep 17 00:00:00 2001 From: fangdong sun Date: Tue, 9 Aug 2016 20:04:40 +0800 Subject: [PATCH 02/13] =?UTF-8?q?build.gradle=E5=A4=9A=E5=88=86=E6=94=AF?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E6=B5=8B=E8=AF=95=20--01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 11222785b..3ab04c1e2 100644 --- a/build.gradle +++ b/build.gradle @@ -2,8 +2,9 @@ apply plugin: 'java' tasks.withType(JavaCompile){ options.encoding = 'UTF-8' } -def libDir='${libDir}' + 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 ('\\')) From 1580d643a4ca80ce859af516719fc00eb822ed46 Mon Sep 17 00:00:00 2001 From: fangdong sun Date: Wed, 10 Aug 2016 09:42:49 +0800 Subject: [PATCH 03/13] =?UTF-8?q?=E5=A4=9A=E5=88=86=E6=94=AF=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E6=B5=8B=E8=AF=95--01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 100 ++++++++++++++++++------------------ designer_base/build.gradle | 2 +- designer_chart/build.gradle | 2 +- designer_form/build.gradle | 2 +- 4 files changed, 53 insertions(+), 53 deletions(-) diff --git a/build.gradle b/build.gradle index 3ab04c1e2..4cfb0fc7a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,71 +1,71 @@ -apply plugin: 'java' +apply plugin: "java" tasks.withType(JavaCompile){ - options.encoding = 'UTF-8' + options.encoding = "UTF-8" } -def basicDir='../../' -def libDir='${basicDir}/finereport-lib-stable' +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(build.DirlastIndexOf ('\\')+1) +FileTree files =fileTree(dir:"./",include:"build.gradle") +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ("\\")) +def branchName=buildDir.substring(build.DirlastIndexOf ("\\")+1) task appletJar<<{ ant{ - mkdir(dir:'${libDir}/tmp') - mkdir(dir:'build/classes/') - copy(todir:'build/classes/'){ - fileset(dir:'${basicDir}/finereport-core-stable/${branchName}/build/classes/main') + mkdir(dir:"${libDir}/tmp") + 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-chart-stable/${branchName}/build/classes/main") - fileset(dir:'${basicDir}/finereport-report-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-platform-stable/${branchName}/build/classes/main") - fileset(dir:'${basicDir}/finereport-performance-stable/${branchName}/build/classes/main') + fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") } - unjar(src:"${libDir}/3rd.jar',dest:'${libDir}/tmp') - unjar(src:'${libDir}/servlet-api.jar',dest:'${libDir}/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:'com/fr/fs/**') - exclude(name:'com/fr/design/**') - exclude(name:'com/fr/start/**') - exclude(name:'com/fr/process/**') + unjar(src:"${libDir}/3rd.jar",dest:"${libDir}/tmp") + unjar(src:"${libDir}/servlet-api.jar",dest:"${libDir}/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:"com/fr/fs/**") + exclude(name:"com/fr/design/**") + exclude(name:"com/fr/start/**") + exclude(name:"com/fr/process/**") } - fileset(dir:'${libDir}/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:"${libDir}/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:'build/classes'){ - include(name:'com/fr/web/*.class') - include(name:'com/fr/web/attr/*.class') + fileset(dir:"build/classes"){ + include(name:"com/fr/web/*.class") + include(name:"com/fr/web/attr/*.class") } } - delete(dir:'${libDir}/tmp') - def jdk6home= 'D:/FineReport/develop/java/jdk1.6u35' - def keystore='frapplet.store' - def keycert='fr.cert' - def keypassword='123456' - def keyalias='fr' + delete(dir:"${libDir}/tmp") + 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}") @@ -79,7 +79,7 @@ task appletJar<<{ } delete(file:"${keystore}") delete(file:"${keycert}") - delete(dir:'build/classes') + delete(dir:"build/classes") } diff --git a/designer_base/build.gradle b/designer_base/build.gradle index 731deebe3..b57b6f569 100644 --- a/designer_base/build.gradle +++ b/designer_base/build.gradle @@ -33,7 +33,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) dependencies{ compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') -compile fileTree(dir:'../../../',include:'finereport-*-stable/**/*.jar') +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/*.jar") testCompile 'junit:junit:4.12' } diff --git a/designer_chart/build.gradle b/designer_chart/build.gradle index 92e221f19..2c836c351 100644 --- a/designer_chart/build.gradle +++ b/designer_chart/build.gradle @@ -31,7 +31,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) //指定外部依赖 dependencies{ compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') -compile fileTree(dir:'../../../',include:'finereport-*-stable/${branchName}/**/*.jar') +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/*.jar") testCompile 'junit:junit:4.12' } diff --git a/designer_form/build.gradle b/designer_form/build.gradle index 118215fc8..ade1e3efc 100644 --- a/designer_form/build.gradle +++ b/designer_form/build.gradle @@ -34,7 +34,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) //声明外部依赖 dependencies{ compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') -compile fileTree(dir:'../../../',include:'finereport-*-stable/**/*.jar') +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/*.jar") testCompile 'junit:junit:4.12' } From e865f12868c8c4ae713e63501715cb52bf36e30b Mon Sep 17 00:00:00 2001 From: fangdong sun Date: Wed, 10 Aug 2016 09:53:38 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E5=A4=9A=E5=88=86=E6=94=AF=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E6=B5=8B=E8=AF=95--02?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 4cfb0fc7a..0dc1b07b1 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ 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(build.DirlastIndexOf ("\\")+1) +def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1) task appletJar<<{ From 02d62d990a0b3bbb2544dbc0dbf00fe7b2e4e6c8 Mon Sep 17 00:00:00 2001 From: fangdong sun Date: Wed, 10 Aug 2016 09:59:18 +0800 Subject: [PATCH 05/13] =?UTF-8?q?=E5=A4=9A=E5=88=86=E6=94=AF=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E6=B5=8B=E8=AF=95--03?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/build.gradle | 2 +- designer_chart/build.gradle | 2 +- designer_form/build.gradle | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/designer_base/build.gradle b/designer_base/build.gradle index b57b6f569..926e87e43 100644 --- a/designer_base/build.gradle +++ b/designer_base/build.gradle @@ -26,7 +26,7 @@ sourceSets{ //获取什么分支名 FileTree files =fileTree(dir:'./',include:'build.gradle') def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) -buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) //声明外部依赖 diff --git a/designer_chart/build.gradle b/designer_chart/build.gradle index 2c836c351..46717d4ac 100644 --- a/designer_chart/build.gradle +++ b/designer_chart/build.gradle @@ -25,7 +25,7 @@ sourceSets{ } FileTree files =fileTree(dir:'./',include:'build.gradle') def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) -buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) //指定外部依赖 diff --git a/designer_form/build.gradle b/designer_form/build.gradle index ade1e3efc..4409495b9 100644 --- a/designer_form/build.gradle +++ b/designer_form/build.gradle @@ -28,7 +28,7 @@ sourceSets{ //获取什么分支名 FileTree files =fileTree(dir:'./',include:'build.gradle') def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) -buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) //声明外部依赖 From d07401997f5b9b44c25c59b2522845e12a4e86d8 Mon Sep 17 00:00:00 2001 From: fangdong sun Date: Wed, 10 Aug 2016 10:10:55 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E5=A4=9A=E5=8A=9F=E8=83=BD=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E6=B5=8B=E8=AF=95--04?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 0dc1b07b1..633739a74 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1) task appletJar<<{ ant{ - mkdir(dir:"${libDir}/tmp") + mkdir(dir:"${libDir}/tmp-${branchName}") mkdir(dir:"build/classes/") copy(todir:"build/classes/"){ fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main") @@ -27,8 +27,8 @@ task appletJar<<{ fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") } - unjar(src:"${libDir}/3rd.jar",dest:"${libDir}/tmp") - unjar(src:"${libDir}/servlet-api.jar",dest:"${libDir}/tmp") + unjar(src:"${libDir}/3rd.jar",dest:"${libDir}/tmp-${branchName}") + unjar(src:"${libDir}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") jar(jarfile:"build/libs/fr-applet-8.0.jar"){ fileset(dir:"build/classes"){ exclude(name:"*.*") @@ -44,7 +44,7 @@ task appletJar<<{ exclude(name:"com/fr/start/**") exclude(name:"com/fr/process/**") } - fileset(dir:"${libDir}/tmp"){ + fileset(dir:"${libDir}/tmp-${branchName}"){ include(name:"javax/mail/**") include(name:"javax/servlet/**") include(name:"org/freehep/**") @@ -60,7 +60,7 @@ task appletJar<<{ include(name:"com/fr/web/attr/*.class") } } - delete(dir:"${libDir}/tmp") + delete(dir:"${libDir}/tmp-${branchName}") def jdk6home= "D:/FineReport/develop/java/jdk1.6u35" def keystore="frapplet.store" def keycert="fr.cert" From 916b706e88565fe4c0e2ef681b1823428cb2b6a0 Mon Sep 17 00:00:00 2001 From: fangdong sun Date: Wed, 10 Aug 2016 11:05:41 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E5=A4=9A=E5=88=86=E6=94=AF=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E6=B5=8B=E8=AF=95=20--03?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_form/build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_form/build.gradle b/designer_form/build.gradle index 4409495b9..bc3c89a11 100644 --- a/designer_form/build.gradle +++ b/designer_form/build.gradle @@ -30,7 +30,8 @@ FileTree files =fileTree(dir:'./',include:'build.gradle') def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) - +println "this brance name is ${branchName}" +println "this path is buildDir" //声明外部依赖 dependencies{ compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') From 8dc887960d5361eaeb119725064cec36209a4074 Mon Sep 17 00:00:00 2001 From: fangdong sun Date: Wed, 10 Aug 2016 11:37:30 +0800 Subject: [PATCH 08/13] =?UTF-8?q?=E5=A4=9A=E5=88=86=E6=94=AF=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E6=B5=8B=E8=AF=95--04?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_form/build.gradle | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/designer_form/build.gradle b/designer_form/build.gradle index bc3c89a11..ac73a01e7 100644 --- a/designer_form/build.gradle +++ b/designer_form/build.gradle @@ -30,8 +30,10 @@ FileTree files =fileTree(dir:'./',include:'build.gradle') def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) -println "this brance name is ${branchName}" -println "this path is buildDir" + +FileTree jars=fileTree(dir:'../../../').include "finereport-*-stable/${branchName}/**/*.jar" +println "${jars}" + //声明外部依赖 dependencies{ compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') From 948f7a349a4d1c37f5ff517f9d13cbd0fb03a709 Mon Sep 17 00:00:00 2001 From: fangdong sun Date: Wed, 10 Aug 2016 11:41:43 +0800 Subject: [PATCH 09/13] =?UTF-8?q?=E5=A4=9A=E5=88=86=E6=94=AF=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E6=B5=8B=E8=AF=95--05?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_form/build.gradle | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/designer_form/build.gradle b/designer_form/build.gradle index ac73a01e7..94b5eed3f 100644 --- a/designer_form/build.gradle +++ b/designer_form/build.gradle @@ -32,7 +32,10 @@ buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) FileTree jars=fileTree(dir:'../../../').include "finereport-*-stable/${branchName}/**/*.jar" -println "${jars}" +jars.each{File file-> +println "-----------this jar path is ${file.path}----------" +} + //声明外部依赖 dependencies{ From 59b5e8d6faf62603313aa63ef21a45c32bf67005 Mon Sep 17 00:00:00 2001 From: fangdong sun Date: Thu, 11 Aug 2016 09:34:24 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E9=83=A8=E5=88=86?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/build.gradle | 2 +- designer_chart/build.gradle | 2 +- designer_form/build.gradle | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/designer_base/build.gradle b/designer_base/build.gradle index 926e87e43..a48a4d2c5 100644 --- a/designer_base/build.gradle +++ b/designer_base/build.gradle @@ -53,7 +53,7 @@ task copyFile(type:Copy,dependsOn:compileJava){ task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath { - fileset(dir:'../../../finereport-build-stable',includes:'**/*.jar') + fileset(dir:'../../../finereport-lib4build-stable',includes:'**/*.jar') } } ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false", , charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ diff --git a/designer_chart/build.gradle b/designer_chart/build.gradle index 46717d4ac..2b465eca9 100644 --- a/designer_chart/build.gradle +++ b/designer_chart/build.gradle @@ -51,7 +51,7 @@ task copyFile(type:Copy,dependsOn:compileJava){ task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath { - fileset(dir:'../../../finereport-build-stable',includes:'**/*.jar') + fileset(dir:'../../../finereport-lib4build-stable',includes:'**/*.jar') } } ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false", , charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ diff --git a/designer_form/build.gradle b/designer_form/build.gradle index 94b5eed3f..5a02f311f 100644 --- a/designer_form/build.gradle +++ b/designer_form/build.gradle @@ -69,7 +69,7 @@ task copyFile(type:Copy,dependsOn:compileJava){ task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath { - fileset(dir:'../../../finereport-build-stable',includes:'**/*.jar') + fileset(dir:'../../../finereport-lib4build-stable',includes:'**/*.jar') } } ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false", charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ From c1a1b8b5dc65f2ca101fb9f797934ab13650008a Mon Sep 17 00:00:00 2001 From: fangdong sun Date: Thu, 11 Aug 2016 10:48:51 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E5=A4=9A=E5=88=86=E6=94=AF=E6=B5=8B?= =?UTF-8?q?=E8=AF=95--00?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_form/build.gradle | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/designer_form/build.gradle b/designer_form/build.gradle index a39f9589e..9932a8085 100644 --- a/designer_form/build.gradle +++ b/designer_form/build.gradle @@ -31,15 +31,11 @@ def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) -<<<<<<< HEAD + FileTree jars=fileTree(dir:'../../../').include "finereport-*-stable/${branchName}/**/*.jar" jars.each{File file-> println "-----------this jar path is ${file.path}----------" } - - -======= ->>>>>>> adaabb5817789ef492696721df369702adeb9971 //声明外部依赖 dependencies{ compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') From 2703f372f10a9fed2623e2d1bc0311641f2a8723 Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 11 Aug 2016 15:30:59 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E9=AB=98=E7=BA=A7=E6=A1=86=E9=AB=98=E5=BA=A6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java b/designer_base/src/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java index 46245560a..9d278d048 100644 --- a/designer_base/src/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java +++ b/designer_base/src/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java @@ -32,7 +32,7 @@ public abstract class ButtonWithHotkeysDetailPane extends Butt private void initComponents() { JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Advanced")); - advancedPane.setPreferredSize(new Dimension(600,300)); + advancedPane.setPreferredSize(new Dimension(600, 341)); JPanel attrPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); attrPane.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 4)); this.add(advancedPane); From 455166016db1f124decda92ba3570648bbf6a485 Mon Sep 17 00:00:00 2001 From: zhouping Date: Thu, 11 Aug 2016 16:53:12 +0800 Subject: [PATCH 13/13] =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E9=87=8D=E5=86=99=E7=88=B6=E7=B1=BB=E4=B8=AD=E7=9A=84=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E6=96=B9=E6=B3=95=EF=BC=88=E9=83=BD=E6=98=AF=E7=BB=9D?= =?UTF-8?q?=E5=AF=B9=E5=B8=83=E5=B1=80=E4=B8=AD=E5=8E=9F=E6=9D=A5=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=89=8D=E7=9A=84=E6=96=B9=E6=B3=95=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layout/FRParameterLayoutAdapter.java | 69 ++++++++++++++++++- .../designer/creator/XWParameterLayout.java | 9 +++ 2 files changed, 77 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRParameterLayoutAdapter.java b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRParameterLayoutAdapter.java index 65858c299..c88579c41 100644 --- a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRParameterLayoutAdapter.java +++ b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRParameterLayoutAdapter.java @@ -1,14 +1,20 @@ package com.fr.design.designer.beans.adapters.layout; import com.fr.design.beans.GroupModel; +import com.fr.design.designer.beans.ConstraintsGroupModel; import com.fr.design.designer.beans.HoverPainter; import com.fr.design.designer.beans.painters.FRParameterLayoutPainter; import com.fr.design.designer.creator.XCreator; +import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.form.parameter.RootDesignGroupModel; +import com.fr.design.utils.ComponentUtils; +import com.fr.design.utils.gui.LayoutUtils; import com.fr.form.ui.container.WParameterLayout; +import java.awt.*; + /** * 琛ㄥ崟鍙傛暟鐣岄潰鐨勭洃鍚櫒 */ @@ -39,5 +45,66 @@ public class FRParameterLayoutAdapter extends FRAbsoluteLayoutAdapter { WParameterLayout wabs = (WParameterLayout)container.toData(); wabs.refreshTagList(); } - + + /** + * 鏄惁鑳藉湪鎸囧畾浣嶇疆娣诲姞缁勪欢 + * + * @param creator 缁勪欢 + * @param x 鍧愭爣x + * @param y 鍧愭爣y + * @return 鑳藉垯杩斿洖true + */ + @Override + public boolean accept(XCreator creator, int x, int y) { + return x >= 0 && y >= 0 && creator.getHeight() <= container.getHeight() + && creator.getWidth() <= container.getWidth(); + } + + @Override + protected void addComp(XCreator creator, int x, int y) { + if (XCreatorUtils.getParentXLayoutContainer(creator) != null) { + Rectangle r = ComponentUtils.getRelativeBounds(container); + Rectangle creatorRectangle = ComponentUtils.getRelativeBounds(creator); + x = creatorRectangle.x - r.x; + y = creatorRectangle.y - r.y; + } else { + int w = creator.getWidth() / 2; + int h = creator.getHeight() / 2; + x = x - w; + y = y - h; + } + + fix(creator, x, y); + container.add(creator); + LayoutUtils.layoutRootContainer(container); + } + + /** + * 璋冩暣缁勪欢澶у皬鍒板悎閫傚昂瀵镐綅缃 + * + * @param creator 缁勪欢 + * @param x 鍧愭爣x + * @param y 鍧愭爣y + */ + @Override + public void fix(XCreator creator, int x, int y) { + if (x < 0) { + x = 0; + } else if (x + creator.getWidth() > container.getWidth()) { + x = container.getWidth() - creator.getWidth(); + } + + if (y < 0) { + y = 0; + } else if (y + creator.getHeight() > container.getHeight()) { + y = container.getHeight() - creator.getHeight(); + } + + creator.setLocation(x, y); + } + + @Override + public ConstraintsGroupModel getLayoutConstraints(XCreator creator) { + return super.getLayoutConstraints(creator); + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/XWParameterLayout.java b/designer_form/src/com/fr/design/designer/creator/XWParameterLayout.java index 890612ccc..e1ab80b7c 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWParameterLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/XWParameterLayout.java @@ -174,4 +174,13 @@ public class XWParameterLayout extends XWAbsoluteLayout { public XLayoutContainer getTopLayout() { return this; } + + /** + * 鏂板鍒犻櫎鎷変几鍚庢洿鏂版瘡涓粍浠剁殑BoundsWidget + * + * @param xCreator + */ + @Override + public void updateBoundsWidget(XCreator xCreator) { + } } \ No newline at end of file