|
|
|
@ -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 { |
|
|
|
|