1 Star 0 Fork 165

ashercc/dddlib

forked from 秋水逍遥/dddlib 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
build.gradle 6.76 KB
一键复制 编辑 原始数据 按行查看 历史
秋水逍遥 提交于 2015-09-21 15:58 . 修改gradle构建脚本
ext {
linkHomepage = 'http://dayatang.github.io/dddlib'
linkCi = 'http://jenkins.dayatang.org/job/dddlib'
linkIssue = 'https://github.com/dayatang/dddlib/issues'
linkScmUrl = 'http://github.com/dayatang/dddlib'
linkScmConnection = 'scm:git:git://github.com/dayatang/dddlib.git'
linkScmDevConnection = 'scm:git:ssh://git@github.com:dayatang/dddlib.git'
}
configure(allprojects) { project ->
group = "org.dayatang.dddlib"
ext.slf4jVersion = "1.7.9"
ext.springVersion = "4.2.1.RELEASE"
ext.tapestryVersion = "5.4-beta-26"
ext.hibernateVersion = "4.3.10.Final"
ext.mysqlVersion = "5.1.35"
ext.h2Version = "1.4.185"
ext.oracleVersion = "11.2.0.3"
ext.sqlserverVersion = "4.0.2206.100"
ext.postgresqlVersion = "9.3-1102-jdbc4"
ext.db2Version = "4.7.112"
ext.hsqldbVersion = "2.3.2"
ext.derbyVersion = "10.10.2.0"
ext.junitVersion = "4.12"
apply plugin: "java"
configurations {
sniffer
javaApiSignature
}
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", "-Werror"
]
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"]
compileJava {
sourceCompatibility=1.6
targetCompatibility=1.6
}
compileTestJava {
sourceCompatibility=1.6
targetCompatibility=1.6
options.compilerArgs += "-parameters"
}
sourceSets.test.resources.srcDirs = ["src/test/resources", "src/test/java"]
test {
systemProperty("java.awt.headless", "true")
scanForTestClasses = false
include(["**/*Tests.class", "**/*Test.class"])
// Since we set scanForTestClasses to false, we need to filter out inner
// classes with the "$" pattern; otherwise, using -Dtest.single=MyTests to
// run MyTests by itself will fail if MyTests contains any inner classes.
exclude(["**/Abstract*.class", '**/*$*'])
}
repositories {
maven { url "http://nexus.openkoala.org/content/repositories/public-releases" }
maven { url "http://nexus.openkoala.org/content/repositories/public-snapshots" }
}
dependencies {
testCompile("junit:junit:${junitVersion}") {
exclude group:'org.hamcrest', module:'hamcrest-core'
}
testCompile("org.mockito:mockito-core:1.10.8") {
exclude group:'org.hamcrest', module:'hamcrest-core'
}
testCompile("org.hamcrest:hamcrest-all:1.3")
//sniffer("org.codehaus.mojo:animal-sniffer-ant-tasks:${snifferVersion}")
javaApiSignature("org.codehaus.mojo.signature:java16:1.1@signature") // as from JDK 6 update 18
}
task copyJavaApiSignature(type: Copy) {
ext.to = file("$buildDir/javaApiSignature/")
description "Copy the resolved Animal Sniffer signature dependency artifact to a known location and name"
from configurations.javaApiSignature
into to
rename '.*signature', 'javaApi.signature'
}
task sniff {
group = "Verification"
description = "Checks the Java API signatures"
dependsOn compileJava
dependsOn copyJavaApiSignature
inputs.dir sourceSets.main.output.classesDir
inputs.dir copyJavaApiSignature.to
outputs.upToDateWhen { true }
doLast {
ant.taskdef(
name: 'animalSniffer',
classname: 'org.codehaus.mojo.animal_sniffer.ant.CheckSignatureTask',
classpath: configurations.sniffer.asPath
)
ant.animalSniffer(
signature: "$buildDir/javaApiSignature/javaApi.signature",
classpath: sourceSets.main.compileClasspath.asPath) {
path(path: sourceSets.main.output.classesDir)
annotation(className: "org.springframework.lang.UsesJava7")
annotation(className: "org.springframework.lang.UsesJava8")
annotation(className: "org.springframework.lang.UsesSunHttpServer")
}
}
}
ext.javadocLinks = [
"http://docs.oracle.com/javase/8/docs/api/",
"http://docs.oracle.com/javaee/7/api/",
"http://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/", // CommonJ
"http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.javadoc.doc/web/apidocs/",
"http://glassfish.java.net/nonav/docs/v3/api/",
"http://docs.jboss.org/jbossas/javadoc/4.0.5/connector/",
"http://docs.jboss.org/jbossas/javadoc/7.1.2.Final/",
"http://commons.apache.org/proper/commons-lang/javadocs/api-2.5/",
"http://commons.apache.org/proper/commons-codec/apidocs/",
"http://commons.apache.org/proper/commons-dbcp/apidocs/",
"http://portals.apache.org/pluto/portlet-2.0-apidocs/",
"http://tiles.apache.org/tiles-request/apidocs/",
"http://tiles.apache.org/framework/apidocs/",
"http://aopalliance.sourceforge.net/doc/",
"http://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/",
"http://ehcache.org/apidocs/",
"http://quartz-scheduler.org/api/2.2.0/",
"http://fasterxml.github.com/jackson-core/javadoc/2.3.0/",
"http://fasterxml.github.com/jackson-databind/javadoc/2.3.0/",
"http://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.3.0/",
"http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/"
] as String[]
}
apply plugin: 'sonar-runner'
sonarRunner {
sonarProperties {
property "sonar.projectName", "DDDLib"
property "sonar.profile", "DDDLib"
property "sonar.jacoco.reportPath", "${buildDir.name}/jacoco.exec"
property "sonar.links.homepage", linkHomepage
property "sonar.links.ci", linkCi
property "sonar.links.issue", linkIssue
property "sonar.links.scm", linkScmUrl
property "sonar.links.scm_dev", linkScmDevConnection
property "sonar.java.coveragePlugin", "jacoco"
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/ashercc/dddlib.git
git@gitee.com:ashercc/dddlib.git
ashercc
dddlib
dddlib
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385