Browse Source

build.gradle更改为多分支构建

master
fangdong sun 8 years ago
parent
commit
7e6ee95b53
  1. 36
      build.gradle
  2. 11
      designer_base/build.gradle
  3. 11
      designer_chart/build.gradle
  4. 13
      designer_form/build.gradle

36
build.gradle

@ -2,34 +2,32 @@ apply plugin: 'java'
tasks.withType(JavaCompile){ tasks.withType(JavaCompile){
options.encoding = 'UTF-8' 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<<{ task appletJar<<{
ant{ ant{
mkdir(dir:'../finereport-lib-stable/tmp') mkdir(dir:'${libDir}/tmp')
mkdir(dir:'build/classes/') mkdir(dir:'build/classes/')
copy(todir:'build/classes/'){ copy(todir:'build/classes/'){
fileset(dir:'../finereport-core-stable/build/classes/main') 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:'../finereport-chart-stable/build/classes/main') fileset(dir:'${basicDir}/finereport-platform-stable/${branchName}/build/classes/main')
fileset(dir:'../finereport-report-stable/build/classes/main')
fileset(dir:'../finereport-platform-stable/build/classes/main')
fileset(dir:'../finereport-performance-stable/build/classes/main')
fileset(dir:'${basicDir}/finereport-performance-stable/${branchName}/build/classes/main')
} }
unjar(src:'../finereport-lib-stable/3rd.jar',dest:'../finereport-lib-stable/tmp') unjar(src:"${libDir}/3rd.jar',dest:'${libDir}/tmp')
unjar(src:'../finereport-lib-stable/servlet-api.jar',dest:'../finereport-lib-stable/tmp') unjar(src:'${libDir}/servlet-api.jar',dest:'${libDir}/tmp')
jar(jarfile:'build/libs/fr-applet-8.0.jar'){ jar(jarfile:'build/libs/fr-applet-8.0.jar'){
fileset(dir:'build/classes'){ fileset(dir:'build/classes'){
exclude(name:'*.*') exclude(name:'*.*')
@ -45,7 +43,7 @@ task appletJar<<{
exclude(name:'com/fr/start/**') exclude(name:'com/fr/start/**')
exclude(name:'com/fr/process/**') exclude(name:'com/fr/process/**')
} }
fileset(dir:'../finereport-lib-stable/tmp'){ fileset(dir:'${libDir}/tmp'){
include(name:'javax/mail/**') include(name:'javax/mail/**')
include(name:'javax/servlet/**') include(name:'javax/servlet/**')
include(name:'org/freehep/**') include(name:'org/freehep/**')
@ -61,7 +59,7 @@ task appletJar<<{
include(name:'com/fr/web/attr/*.class') include(name:'com/fr/web/attr/*.class')
} }
} }
delete(dir:'../finereport-lib-stable/tmp') delete(dir:'${libDir}/tmp')
def jdk6home= 'D:/FineReport/develop/java/jdk1.6u35' def jdk6home= 'D:/FineReport/develop/java/jdk1.6u35'
def keystore='frapplet.store' def keystore='frapplet.store'
def keycert='fr.cert' def keycert='fr.cert'

11
designer_base/build.gradle

@ -23,12 +23,17 @@ sourceSets{
} }
} }
} }
//
FileTree files =fileTree(dir:'./',include:'build.gradle')
def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\'))
buildDir=buildDir.substring(0buildDir.lastIndexOf ('\\'))
def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1)
//ÉùÃ÷ÍⲿÒÀÀµ //ÉùÃ÷ÍⲿÒÀÀµ
dependencies{ dependencies{
compile fileTree(dir:'../../finereport-lib-stable',include:'**/*.jar') compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar')
compile fileTree(dir:'../../',include:'finereport-*-stable/**/*.jar') compile fileTree(dir:'../../../',include:'finereport-*-stable/**/*.jar')
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
} }
@ -48,7 +53,7 @@ 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:'../../finereport-build-stable',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'){ ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false", , charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){

11
designer_chart/build.gradle

@ -23,10 +23,15 @@ 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{ dependencies{
compile fileTree(dir:'../../finereport-lib-stable',include:'**/*.jar') 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' testCompile 'junit:junit:4.12'
} }
@ -46,7 +51,7 @@ 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:'../../finereport-build-stable',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'){ ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false", , charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){

13
designer_form/build.gradle

@ -24,10 +24,17 @@ sourceSets{
} }
} }
} }
//
FileTree files =fileTree(dir:'./',include:'build.gradle')
def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\'))
buildDir=buildDir.substring(0buildDir.lastIndexOf ('\\'))
def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1)
//ÉùÃ÷ÍⲿÒÀÀµ //ÉùÃ÷ÍⲿÒÀÀµ
dependencies{ dependencies{
compile fileTree(dir:'../../finereport-lib-stable',include:'**/*.jar') compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar')
compile fileTree(dir:'../../',include:'finereport-*-stable/**/*.jar') compile fileTree(dir:'../../../',include:'finereport-*-stable/**/*.jar')
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
} }
@ -56,7 +63,7 @@ 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:'../../finereport-build-stable',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'){ ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false", charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){

Loading…
Cancel
Save