4 Star 15 Fork 2

WeBank/WeCross-Console

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.gradle 3.60 KB
一键复制 编辑 原始数据 按行查看 历史
plugins {
id 'com.github.sherter.google-java-format' version '0.8'
id 'org.ajoberstar.grgit' version '4.0.1'
}
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'java'
apply plugin: 'jacoco'
group = 'com.webank'
version = '1.4.0'
sourceCompatibility = '1.8'
repositories {
jcenter()
maven { url "https://maven.aliyun.com/nexus/content/groups/public/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
mavenCentral()
}
googleJavaFormat {
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
exclude '**/temp/*.java'
}
verifyGoogleJavaFormat {
source = sourceSets*.allJava
include '**/*.java'
exclude '**/temp/*.java'
}
def log4j_version = '2.22.1'
List logger = [
"org.apache.logging.log4j:log4j-api:$log4j_version",
"org.apache.logging.log4j:log4j-core:$log4j_version",
"org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version",
//"org.apache.logging.log4j:log4j-to-slf4j:$log4j_version",
//"org.apache.logging.log4j:log4j-web:$log4j_version",
//"org.apache.logging.log4j:log4j-jul:$log4j_version"
]
dependencies {
compile logger
compile 'org.jline:jline:3.15.0'
compile 'org.codehaus.groovy:groovy-all:3.0.10'
compile 'com.fasterxml.jackson.core:jackson-databind:2.14.3'
compile 'com.webank:wecross-java-sdk:1.4.0'
compile 'org.apache.commons:commons-compress:1.26.0'
compile 'commons-io:commons-io:2.8.0'
compile 'com.moandjiezana.toml:toml4j:0.7.2'
compile 'com.google.code.gson:gson:2.8.9'
// Use JUnit test framework
testImplementation 'junit:junit:4.13.2'
}
sourceSets {
main {
resources {
exclude 'contracts/*'
}
}
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
exclude module: "testng"
}
jar {
destinationDir file('dist/apps')
archiveName project.name + "-" + project.version + '.jar'
exclude '**/*.xml'
exclude '**/*.toml'
exclude '**/*.properties'
exclude '**/*.yml'
exclude '**/*.crt'
exclude '**/*.key'
manifest {
try {
def repo = grgit.open(dir: file('.').canonicalPath)
if (repo != null) {
def date = new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
def branch = repo.branch.getCurrent().getName()
def commit = repo.head().getAbbreviatedId(40)
attributes(["Implementation-Timestamp": date,
"Git-Branch" : branch,
"Git-Commit" : commit
])
logger.info(" Commit : ")
logger.info(" => date: {}", date)
logger.info(" => branch: {}", branch)
logger.info(" => commit: {}", commit)
}
} catch (Exception e) {
// logger.warn(' .git not exist, cannot found commit info')
}
}
doLast {
copy {
from file('src/main/resources/')
into 'dist/conf'
}
copy {
from configurations.runtime
into 'dist/lib'
}
copy {
from file('.').listFiles().findAll { File f -> (f.name.endsWith('.sh') || f.name.endsWith('.env')) }
into 'dist'
}
copy {
from file('scripts/')
into 'dist'
}
}
}
test {
testLogging {
showStandardStreams = false
events 'passed', 'skipped', 'failed'
}
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled false
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/WeBank/WeCross-Console.git
git@gitee.com:WeBank/WeCross-Console.git
WeBank
WeCross-Console
WeCross-Console
master

搜索帮助