1 Star 0 Fork 32

osmt/discoverx2

forked from 腾硕软件/discoverx2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
build.gradle 4.04 KB
一键复制 编辑 原始数据 按行查看 历史
腾硕软件 提交于 2015-04-02 23:21 . 初始提交
repositories {
mavenCentral()
}
apply plugin: "java"
sourceSets {
main {
java {
srcDir 'src'
}
resources {
srcDir 'src/resources'
}
}
}
configurations {
compileOnly
}
sourceSets.all {
compileClasspath += configurations.compileOnly
}
compileJava.options*.compilerArgs = [
"-Xlint:serial", "-Xlint:varargs", "-Xlint:cast", "-Xlint:classfile",
"-Xlint:dep-ann", "-Xlint:divzero", "-Xlint:empty", "-Xlint:finally",
"-Xlint:overrides", "-Xlint:path", "-Xlint:-processing", "-Xlint:static",
"-Xlint:try", "-Xlint:fallthrough", "-Xlint:rawtypes", "-Xlint:deprecation",
"-Xlint:unchecked", "-Xlint:-options"
]
compileJava {
sourceCompatibility = 1.6
targetCompatibility = 1.6
}
compileJava.doLast {
logger.info "copy resources (xml, xsd) to build path."
copy {
from 'src'
into 'build/classes/main'
include '**/*.xml'
include '**/*.xsd'
}
}
compileTestJava.options*.compilerArgs = [
"-Xlint:serial", "-Xlint:varargs", "-Xlint:cast", "-Xlint:classfile",
"-Xlint:dep-ann", "-Xlint:divzero", "-Xlint:empty", "-Xlint:finally",
"-Xlint:overrides", "-Xlint:path", "-Xlint:-processing", "-Xlint:static",
"-Xlint:try", "-Xlint:-fallthrough", "-Xlint:-rawtypes", "-Xlint:-deprecation",
"-Xlint:-unchecked", "-Xlint:-options"
]
compileTestJava {
sourceCompatibility = 1.6
targetCompatibility = 1.6
}
compileTestJava.doLast {
logger.info "copy test resources (xml, xsd) to build path ."
copy {
from 'src/test'
into 'build/classes/test'
include '**/*.xml'
include '**/*.xsd'
}
}
ext.javadocLinks = ["http://download.oracle.com/javase/6/docs/api/"] as String[]
ext.javadocTitle = "腾硕协作应用构建平台Discoverx2"
javadoc {
description = "Generates project-level javadoc for use in -javadoc jar"
destinationDir= new File("$rootProject.projectDir/javadocs")
failOnError = false;
options.links(project.ext.javadocLinks)
options.author = true
options.header = project.name
options.use = true
options.charSet = "GBK"
options.locale = "zh_CN"
if(JavaVersion.current().isJava6()){
options.stylesheetFile= new File("$rootProject.projectDir/javadoccss/stylesheet.css")
}
options.footer = "<p><a href=\"http://www.tensosoft.com/forum/\" target=\"_blank\">使用反馈</a></p>"
options.bottom = "Discoverx For Java SDK | <i>版权所有 &#169; 2005-2014 <a href=\"http://www.tensosoft.com/\" target=\"_blank\">腾硕软件</a>. 保留所有权利.</i>"
options.docTitle = "<h1>" + project.ext.javadocTitle + "</h1>"
options.windowTitle = project.ext.javadocTitle
title = project.ext.javadocTitle
logging.captureStandardError LogLevel.INFO
logging.captureStandardOutput LogLevel.INFO
}
group = "com.tansuosoft.discoverx"
version = "2.0"
[compileJava, javadoc, compileTestJava]*.options.collect { options -> options.encoding = "GBK" }
task sourceJar(type: Jar, dependsOn: classes) {
classifier = "source"
from sourceSets.main.allJava
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = "javadoc"
from javadoc.destinationDir
}
artifacts {
archives sourceJar
archives javadocJar
}
dependencies {
compile "com.google.zxing:core:2.2"
compile "net.sf.ehcache:ehcache:1.8.0"
compile "javax.mail:mail:1.4.7"
compileOnly "javax.servlet:servlet-api:2.5"
compileOnly "javax.servlet.jsp:jsp-api:2.1"
//如果无法通过网络下载mavenCentral中的支撑包,那么注释掉以上语句,去掉下一句的注释以使用本地jar包来编译
//compile fileTree(dir: "$rootProject.projectDir/libs", include: '*.jar')
testCompile "junit:junit:4.11"
}
jar {
manifest.attributes["Created-By"] = "${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"
manifest.attributes["Implementation-Title"] = project.name
manifest.attributes["Implementation-Version"] = project.version
}
//拷贝jar到webapp/WEB-INF/lib
task cp2Webapp(type: Copy) {
if (project.name.endsWith("product-rc")) {
def extJar=".jar"
def jarPath="$project.buildDir/libs/$project.name-$version$extJar"
//拷贝前可能要修改路径
def targetWebAppDir="$rootProject.projectDir/webapp/WEB-INF/lib"
from jarPath
into targetWebAppDir
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/osmt222/discoverx2.git
git@gitee.com:osmt222/discoverx2.git
osmt222
discoverx2
discoverx2
master

搜索帮助