|
|
|
@ -26,7 +26,6 @@ task unJar{
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//设置源码路径 |
|
|
|
|
sourceSets{ |
|
|
|
|
main{ |
|
|
|
@ -94,45 +93,6 @@ sourceSets{
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
sourceSets.main.java.outputDir = 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 (java.io.File.separator)) |
|
|
|
|
def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1) |
|
|
|
|
def MVN_BRANCH = branchVariable.toUpperCase() |
|
|
|
|
|
|
|
|
|
//指定依赖 |
|
|
|
|
dependencies{ |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-antlr4/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-aspectj/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-commons-logging/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-cssparser/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-freehep/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-hsqldb/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-jgit/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-org-dom4j/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-sense4/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-third-default/fine-slf4j-api/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:System.getenv("JAVA_HOME"),include:"lib/tools.jar") |
|
|
|
|
compile group: "com.fr.third.server", name: "servlet-api", version: "3.0" |
|
|
|
|
testCompile 'junit:junit:4.12' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//指明无法编译文件所在路径 |
|
|
|
|
def dataContent = { def dir -> |
|
|
|
|
copySpec{ |
|
|
|
|
from ("${dir}"){ |
|
|
|
|
exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
def resourceDirs = [ |
|
|
|
|
"${srcDir}/fine-antlr4/src", |
|
|
|
|
"${srcDir}/fine-antlr-old/src/main/java", |
|
|
|
@ -194,17 +154,36 @@ def resourceDirs = [
|
|
|
|
|
"${srcDir}/fine-third-jdk11/fine-jaxws/src/main/java" |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
task copyFiles(type:Copy,dependsOn:'compileJava'){ |
|
|
|
|
resourceDirs.each { |
|
|
|
|
String resourceDir -> |
|
|
|
|
if(file(resourceDir).exists()){ |
|
|
|
|
copy { |
|
|
|
|
println("----复制资源:从" + resourceDir + "到${classesDir}" ) |
|
|
|
|
with dataContent.call(resourceDir) |
|
|
|
|
into "${classesDir}" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
sourceSets.main.java.outputDir = file('build/classes/1') |
|
|
|
|
sourceSets.main.resources.srcDirs = resourceDirs |
|
|
|
|
sourceSets.main.resources.excludes = ['**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html'] |
|
|
|
|
sourceSets.main.output.resourcesDir = file('build/resource/1') |
|
|
|
|
|
|
|
|
|
repositories{ |
|
|
|
|
mavenCentral() |
|
|
|
|
maven { url "http://mvn.finedevelop.com/repository/maven-public/" } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
jar.dependsOn copyFiles |
|
|
|
|
//获取什么分支名 |
|
|
|
|
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) |
|
|
|
|
def MVN_BRANCH = branchVariable.toUpperCase() |
|
|
|
|
|
|
|
|
|
//指定依赖 |
|
|
|
|
dependencies{ |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-antlr4/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-aspectj/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-commons-logging/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-cssparser/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-freehep/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-hsqldb/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-jgit/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-org-dom4j/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-sense4/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/fine-third-default/fine-slf4j-api/lib",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar') |
|
|
|
|
compile fileTree(dir:System.getenv("JAVA_HOME"),include:"lib/tools.jar") |
|
|
|
|
compile group: "com.fr.third.server", name: "servlet-api", version: "3.0" |
|
|
|
|
testCompile 'junit:junit:4.12' |
|
|
|
|
} |
|
|
|
|