diff --git a/build.third_step0.gradle b/build.third_step0.gradle index 10005672e..dcb6d2a8f 100644 --- a/build.third_step0.gradle +++ b/build.third_step0.gradle @@ -1,5 +1,3 @@ - - apply plugin: 'java' tasks.withType(JavaCompile){ options.encoding = 'UTF-8' @@ -14,6 +12,12 @@ jar{ baseName="fine-third-10.0" } +repositories { + mavenCentral() + maven { url "http://mvn.finedevelop.com/repository/maven-public/" } +} + + sourceSets{ main{ java{ @@ -25,36 +29,44 @@ sourceSets{ //获取什么分支名 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) +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator)) +def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1) def srcDir="." -task unJar{ - ant{ - mkdir(dir:"build/classes/main") - println "------------------------------------------------unjar" - - unjar(dest:"build/classes/main"){ - fileset(dir:"../../finereport-lib-base/${branchName}"){ - include(name:'3rd.jar') - } - fileset(dir:"../../finereport-lib-other/${branchName}"){ - include(name:"batik-all-1.9.jar") - } - fileset(dir:"${srcDir}/fine-poi/lib"){ - include(name:'**/*.jar') - } - fileset(dir:"${srcDir}/fine-quartz/lib"){ - include(name:'c3p0-0.9.1.1.jar') - } - fileset(dir:"${srcDir}/fine-spring/lib"){ - include(name:'aopalliance-1.0.jar') - } - fileset(dir:"${srcDir}/build/libs"){ - include(name:"*.jar") - } +configurations { + thirdjar +} + +dependencies { + thirdjar "com.fr.third:fine-third:10.0-FEATURE-SNAPSHOT" + testCompile 'junit:junit:4.12' +} + + +task unpack(type:Copy) { + delete classesDir + destinationDir=file(classesDir) + println(configurations.thirdjar.singleFile) + from { + zipTree(configurations.thirdjar.singleFile) + } + from { + zipTree("fine-quartz/lib/c3p0-0.9.1.1.jar") + } + + from { + zipTree("fine-spring/lib/aopalliance-1.0.jar") + } + from { + zipTree("fine-poi/lib/curvesapi-1.03.jar") + } + fileTree(dir:"build/libs",include:"**/*.jar").each { + File file -> from { + zipTree(file) } } + } +jar.dependsOn unpack diff --git a/build.third_step1.gradle b/build.third_step1.gradle index 8a51fd40e..205f72c16 100644 --- a/build.third_step1.gradle +++ b/build.third_step1.gradle @@ -43,19 +43,20 @@ sourceSets{ sourceSets.main.output.classesDir = file('build/classes/1') repositories{ mavenCentral() + maven { url "http://mvn.finedevelop.com/repository/maven-public/" } } //获取什么分支名 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) +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator)) +def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1) //指定依赖 dependencies{ compile fileTree(dir:"${srcDir}/fine-poi/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/fine-quartz/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar') - compile fileTree(dir:"../../finereport-lib-base/${branchName}",include:'**/*.jar') + compile "com.fr.third:fine-third:10.0-FEATURE-SNAPSHOT" compile fileTree(dir:"../../finereport-lib-other/${branchName}",include:'**/*.jar') testCompile 'junit:junit:4.12' } diff --git a/build.third_step2.gradle b/build.third_step2.gradle index b4b6cbced..e71ab7dc9 100644 --- a/build.third_step2.gradle +++ b/build.third_step2.gradle @@ -32,19 +32,20 @@ sourceSets{ sourceSets.main.output.classesDir = file('build/classes/2') repositories{ mavenCentral() + maven { url "http://mvn.finedevelop.com/repository/maven-public/" } } //获取什么分支名 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) +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator)) +def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1) //指定依赖 dependencies{ compile fileTree(dir:"${srcDir}/fine-aspectj/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/fine-spring/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar') - compile fileTree(dir:"../../finereport-lib-base/${branchName}",include:'**/*.jar') + compile "com.fr.third:fine-third:10.0-FEATURE-SNAPSHOT" compile fileTree(dir:"../../finereport-lib-other/${branchName}",include:'**/*.jar') testCompile 'junit:junit:4.12' } diff --git a/build.third_step3.gradle b/build.third_step3.gradle index 48ba26ed4..0bf16d70f 100644 --- a/build.third_step3.gradle +++ b/build.third_step3.gradle @@ -34,18 +34,19 @@ sourceSets.main.output.classesDir = file('build/classes/3') repositories{ mavenCentral() + maven { url "http://mvn.finedevelop.com/repository/maven-public/" } } //获取什么分支名 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) +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator)) +def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1) //指定依赖 dependencies{ compile fileTree(dir:"${srcDir}/fine-jboss-logging/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar') - compile fileTree(dir:"../../finereport-lib-base/${branchName}",include:'**/*.jar') + compile "com.fr.third:fine-third:10.0-FEATURE-SNAPSHOT" compile fileTree(dir:"../../finereport-lib-other/${branchName}",include:'**/*.jar') testCompile 'junit:junit:4.12' } diff --git a/build.third_step4.gradle b/build.third_step4.gradle index ef7978cdb..f75a4f847 100644 --- a/build.third_step4.gradle +++ b/build.third_step4.gradle @@ -33,18 +33,19 @@ sourceSets.main.output.classesDir = file('build/classes/4') repositories{ mavenCentral() + maven { url "http://mvn.finedevelop.com/repository/maven-public/" } } //获取什么分支名 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) +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator)) +def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1) //指定依赖 dependencies{ compile fileTree(dir:"${srcDir}/fine-hibernate/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar') - compile fileTree(dir:"../../finereport-lib-base/${branchName}",include:'**/*.jar') + compile "com.fr.third:fine-third:10.0-FEATURE-SNAPSHOT" compile fileTree(dir:"../../finereport-lib-other/${branchName}",include:'**/*.jar') testCompile 'junit:junit:4.12' } diff --git a/build.third_step5.gradle b/build.third_step5.gradle index 5406e7803..67933f2b3 100644 --- a/build.third_step5.gradle +++ b/build.third_step5.gradle @@ -31,19 +31,20 @@ sourceSets.main.output.classesDir = file('build/classes/5') repositories{ mavenCentral() + maven { url "http://mvn.finedevelop.com/repository/maven-public/" } } //获取什么分支名 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) +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator)) +def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1) //指定依赖 dependencies{ compile fileTree(dir:"${srcDir}/fine-druid/lib",include:'ojdbc7-12.1.0.jar') compile fileTree(dir:"${srcDir}/fine-druid/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar') - compile fileTree(dir:"../../finereport-lib-base/${branchName}",include:'**/*.jar') + compile "com.fr.third:fine-third:10.0-FEATURE-SNAPSHOT" compile fileTree(dir:"../../finereport-lib-other/${branchName}",include:'**/*.jar') testCompile 'junit:junit:4.12' } diff --git a/build.third_step6.gradle b/build.third_step6.gradle index c66cc3584..048ef33b2 100644 --- a/build.third_step6.gradle +++ b/build.third_step6.gradle @@ -49,12 +49,13 @@ sourceSets.main.output.classesDir = file('build/classes/6') repositories{ mavenCentral() + maven { url "http://mvn.finedevelop.com/repository/maven-public/" } } //获取什么分支名 -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) +FileTree files =fileTree(dir:'./',include:'build*.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator)) +def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1) //指定依赖 dependencies{ @@ -65,7 +66,7 @@ dependencies{ compile fileTree(dir:"${srcDir}/fine-redisson/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/fine-socketio/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar') - compile fileTree(dir:"../../finereport-lib-base/${branchName}",include:'**/*.jar') + compile "com.fr.third:fine-third:10.0-FEATURE-SNAPSHOT" compile fileTree(dir:"../../finereport-lib-other/${branchName}",include:'**/*.jar') testCompile 'junit:junit:4.12' }