Browse Source

build.gradle更改为多分支构建

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

34
build.gradle

@ -2,34 +2,32 @@ apply plugin: 'java'
tasks.withType(JavaCompile){
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<<{
ant{
mkdir(dir:'../finereport-lib-stable/tmp')
mkdir(dir:'${libDir}/tmp')
mkdir(dir:'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:'../finereport-chart-stable/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-report-stable/${branchName}/build/classes/main')
fileset(dir:'${basicDir}/finereport-platform-stable/${branchName}/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:'../finereport-lib-stable/servlet-api.jar',dest:'../finereport-lib-stable/tmp')
unjar(src:"${libDir}/3rd.jar',dest:'${libDir}/tmp')
unjar(src:'${libDir}/servlet-api.jar',dest:'${libDir}/tmp')
jar(jarfile:'build/libs/fr-applet-8.0.jar'){
fileset(dir:'build/classes'){
exclude(name:'*.*')
@ -45,7 +43,7 @@ task appletJar<<{
exclude(name:'com/fr/start/**')
exclude(name:'com/fr/process/**')
}
fileset(dir:'../finereport-lib-stable/tmp'){
fileset(dir:'${libDir}/tmp'){
include(name:'javax/mail/**')
include(name:'javax/servlet/**')
include(name:'org/freehep/**')
@ -61,7 +59,7 @@ task appletJar<<{
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 keystore='frapplet.store'
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{
compile fileTree(dir:'../../finereport-lib-stable',include:'**/*.jar')
compile fileTree(dir:'../../',include:'finereport-*-stable/**/*.jar')
compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar')
compile fileTree(dir:'../../../',include:'finereport-*-stable/**/*.jar')
testCompile 'junit:junit:4.12'
}
@ -48,7 +53,7 @@ task copyFile(type:Copy,dependsOn:compileJava){
task compressJS{
ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){
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'){

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{
compile fileTree(dir:'../../finereport-lib-stable',include:'**/*.jar')
compile fileTree(dir:'../../',include:'finereport-*-stable/**/*.jar')
compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar')
compile fileTree(dir:'../../../',include:'finereport-*-stable/${branchName}/**/*.jar')
testCompile 'junit:junit:4.12'
}
@ -46,7 +51,7 @@ task copyFile(type:Copy,dependsOn:compileJava){
task compressJS{
ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){
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'){

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{
compile fileTree(dir:'../../finereport-lib-stable',include:'**/*.jar')
compile fileTree(dir:'../../',include:'finereport-*-stable/**/*.jar')
compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar')
compile fileTree(dir:'../../../',include:'finereport-*-stable/**/*.jar')
testCompile 'junit:junit:4.12'
}
@ -56,7 +63,7 @@ task copyFile(type:Copy,dependsOn:compileJava){
task compressJS{
ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){
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'){

Loading…
Cancel
Save