sensitiveWordFilter/build.gradle

53 lines
1.3 KiB
Groovy
Raw Permalink Normal View History

2021-09-24 17:53:32 +08:00
plugins {
id 'java'
}
group 'SensitivewordFilter'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
2021-09-26 14:42:00 +08:00
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
mavenLocal()
2021-09-24 17:53:32 +08:00
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile("org.apache.thrift:libthrift:0.9.2")
compile("ch.qos.logback:logback-core:1.1.11")
compile("ch.qos.logback:logback-classic:1.1.11")
compile("org.springframework.boot:spring-boot:1.5.9.RELEASE")
compile("org.springframework.boot:spring-boot-starter-test:1.5.9.RELEASE")
compile("org.springframework.boot:spring-boot-starter-data-redis:1.5.9.RELEASE")
}
2021-10-09 14:10:06 +08:00
//依赖编译然后打包JAR
task taskJar(type:Jar, dependsOn: compileJava) {
from 'build/classes/main'
destinationDir = file('build/libs')
}
//清除上次的编译过的文件
task clearPj(type:Delete){
delete 'build','target'
}
//把JAR复制到目标目录
task release(type: Copy,dependsOn: [clearPj,taskJar]) {
from('build/libs') {
include '*.jar'
}
into ('target')
}
//删除lib中的jar
task clearJars(type:Delete){
delete 'lib'
}
task copyJars(type: Copy, dependsOn:clearJars) {
from configurations.runtime
into 'lib' // 目标位置
}