diff --git a/build.gradle b/build.gradle index 659130f9e..abc981595 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,6 @@ apply plugin: "java" tasks.withType(JavaCompile){ options.encoding = "UTF-8" } - def basicDir="../../" def libDir="${basicDir}/finereport-lib-stable" //获取什么分支名 diff --git a/build.gradle.bak b/build.gradle.bak index 633739a74..67a8a0e70 100644 --- a/build.gradle.bak +++ b/build.gradle.bak @@ -2,10 +2,10 @@ apply plugin: "java" tasks.withType(JavaCompile){ options.encoding = "UTF-8" } - +sourceCompatibility=1.7 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) diff --git a/designer_base/build.gradle b/designer_base/build.gradle index bd5f62e8e..cbaf1a695 100644 --- a/designer_base/build.gradle +++ b/designer_base/build.gradle @@ -56,7 +56,7 @@ task compressJS{ 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'){ + 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') diff --git a/designer_base/build.gradle.bak b/designer_base/build.gradle.bak index a48a4d2c5..bd5f62e8e 100644 --- a/designer_base/build.gradle.bak +++ b/designer_base/build.gradle.bak @@ -3,11 +3,11 @@ apply plugin: 'java' tasks.withType(JavaCompile){ options.encoding = 'UTF-8' } -//ָjdk汾 +//指定构建的jdk版本 sourceCompatibility=1.8 -//ָjar汾 +//指定生成jar包版本 version='8.0' -//jar +//生成jar包重命名 jar{ baseName='fr-designer-core' } @@ -15,7 +15,7 @@ jar{ def srcDir="." -//ָԴ· +//指定源码路径 sourceSets{ main{ java{ @@ -23,13 +23,13 @@ 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 ('\\')) def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) -//ⲿ +//声明外部依赖 dependencies{ compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') @@ -37,7 +37,7 @@ compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/* testCompile 'junit:junit:4.12' } -//Ʒ.javaļclassesļ² +//复制非.java文件到classes文件夹下参与打包 task copyFile(type:Copy,dependsOn:compileJava){ copy{ from ("${srcDir}/src"){ @@ -49,7 +49,7 @@ task copyFile(type:Copy,dependsOn:compileJava){ } -//ѹĿеjsļ +//压缩项目中的js文件 task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath { diff --git a/designer_chart/build.gradle b/designer_chart/build.gradle index 2a9777371..946649195 100644 --- a/designer_chart/build.gradle +++ b/designer_chart/build.gradle @@ -54,7 +54,7 @@ task compressJS{ 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'){ + 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') diff --git a/designer_chart/build.gradle.bak b/designer_chart/build.gradle.bak index 2b465eca9..2a9777371 100644 --- a/designer_chart/build.gradle.bak +++ b/designer_chart/build.gradle.bak @@ -3,14 +3,14 @@ apply plugin: 'java' tasks.withType(JavaCompile){ options.encoding = 'UTF-8' } -//ָjdk汾 +//指定构建的jdk版本 sourceCompatibility=1.8 -//ָjarİ汾 +//指定生成jar包的版本 version='8.0' def srcDir="." -//ɵjar +//对生成的jar包进行重命名 jar{ baseName='fr-designer-chart' @@ -28,14 +28,14 @@ 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',include:'**/*.jar') compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/*.jar") testCompile 'junit:junit:4.12' } -//.java ļƵclassesļ² +//将非.java 文件复制到classes文件夹下参与打包 task copyFile(type:Copy,dependsOn:compileJava){ copy{ from ("${srcDir}/src"){ @@ -47,7 +47,7 @@ task copyFile(type:Copy,dependsOn:compileJava){ } -//ѹĿеjsļ +//压缩项目中的js文件 task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath {