From ee40273402d9b8d2e3412f43475a7231ffb90eb7 Mon Sep 17 00:00:00 2001 From: neil Date: Fri, 21 Oct 2016 10:57:25 +0800 Subject: [PATCH] 1 --- .../{build.dev.gradle => build.master.gradle} | 2 +- designer_chart/build.release.gradle | 66 ------------------- 2 files changed, 1 insertion(+), 67 deletions(-) rename designer_chart/{build.dev.gradle => build.master.gradle} (98%) delete mode 100644 designer_chart/build.release.gradle diff --git a/designer_chart/build.dev.gradle b/designer_chart/build.master.gradle similarity index 98% rename from designer_chart/build.dev.gradle rename to designer_chart/build.master.gradle index f980fa135..ba6df992b 100644 --- a/designer_chart/build.dev.gradle +++ b/designer_chart/build.master.gradle @@ -4,7 +4,7 @@ tasks.withType(JavaCompile){ options.encoding = 'UTF-8' } //指定构建的jdk版本 -sourceCompatibility=1.8 +sourceCompatibility=1.7 //指定生成jar包的版本 version='8.0' diff --git a/designer_chart/build.release.gradle b/designer_chart/build.release.gradle deleted file mode 100644 index e97176e24..000000000 --- a/designer_chart/build.release.gradle +++ /dev/null @@ -1,66 +0,0 @@ - -apply plugin: 'java' -tasks.withType(JavaCompile){ - options.encoding = 'UTF-8' -} -//指定构建的jdk版本 -sourceCompatibility=1.8 -//指定生成jar包的版本 -version='8.0' - -def srcDir="." - -//对生成的jar包进行重命名 - -jar{ - baseName='fr-designer-chart' -} - -sourceSets{ - main{ - java{ - 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:'../../../finereport-lib-stable/master',include:'**/*.jar') -compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") - - testCompile 'junit:junit:4.12' -} -//将非.java 文件复制到classes文件夹下参与打包 -task copyFile(type:Copy,dependsOn:compileJava){ - copy{ - from ("${srcDir}/src"){ - exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' - - } - into 'build/classes/main' - } - -} - -//压缩项目中的js文件 -task compressJS{ - ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ - classpath { - 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'){ - fileset (dir:"${srcDir}/src"){ - include (name:'**/*.js') - include (name:'**/*.css') - } - - } -} -jar.dependsOn compressJS -