Browse Source

冲突

master
neil 8 years ago
parent
commit
a37a903212
  1. 60
      designer_form/build.gradle

60
designer_form/build.gradle

@ -3,61 +3,39 @@ apply plugin: 'java'
tasks.withType(JavaCompile){ tasks.withType(JavaCompile){
options.encoding = 'UTF-8' options.encoding = 'UTF-8'
} }
//jdk版本
sourceCompatibility=1.8
//jar包版本
version='8.0' version='8.0'
def srcDir="." def srcDir="${System.getenv()['JENKINS_HOME']}/workspace/design"
def libDir="${System.getenv()['JENKINS_HOME']}/workspace/lib"
//jar包的名字
jar{ jar{
baseName='fr-designer-report' baseName='fr-designer-report'
} }
//
sourceSets{ sourceSets{
main{ main{
java{ java{
srcDirs=["${srcDir}/src", srcDirs=["${srcDir}/designer/src",
"${srcDir}/../designer/src"] "${srcDir}/designer_form/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)
FileTree jars=fileTree(dir:'../../../').include "finereport-*-stable/${branchName}/**/*.jar"
jars.each{File file->
println "-----------this jar path is ${file.path}----------"
}
//
dependencies{ dependencies{
compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') compile fileTree(dir:'../../',include:'**/*.jar')
compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/*.jar") compile fileTree(dir:libDir,include:'*.jar')
compile fileTree(dir:"${libDir}/jetty",include:'*.jar')
testCompile 'junit:junit:4.12' 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){ task copyFile(type:Copy,dependsOn:compileJava){
copy{ copy{
with dataContent.call("${srcDir}/src") from ("${srcDir}/designer/src"){
with dataContent.call("${srcDir}/../designer/src") exclude '**/*.java'
}
from ("${srcDir}/designer_form/src")
into ('build/classes/main') into ('build/classes/main')
} }
@ -68,19 +46,17 @@ task copyFile(type:Copy,dependsOn:compileJava){
task compressJS{ task compressJS{
ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){
classpath { classpath {
fileset(dir:'../../lib',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'){ ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false", , charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){
fileset (dir:"${srcDir}/src"){ fileset (dir:"${srcDir}/designer/src"){
include (name:'**/*.js') include (name:'**/*.js')
include (name:'**/*.css')
} }
fileset (dir:"${srcDir}/../designer/src"){ fileset (dir:"${srcDir}/designer_form/src"){
include (name:'**/*.js') include (name:'**/*.js')
include (name:'**/*.css')
} }
} }

Loading…
Cancel
Save