1 Star 0 Fork 32

zhujinfei/discoverx2

forked from 腾硕软件/discoverx2 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
build.gradle 4.04 KB
Copy Edit Raw Blame History
腾硕软件 authored 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/zhujinfei/discoverx2.git
git@gitee.com:zhujinfei/discoverx2.git
zhujinfei
discoverx2
discoverx2
master

Search