1 Star 0 Fork 0

antch_hw / logstash-filter-java_eastcom_filter-redis

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.gradle 5.24 KB
一键复制 编辑 原始数据 按行查看 历史
antch 提交于 2019-11-04 19:45 . 初始化
buildscript {
repositories {
maven{ url 'https://maven.aliyun.com/repository/google'}
maven{ url 'https://maven.aliyun.com/repository/gradle-plugin'}
maven{ url 'https://maven.aliyun.com/repository/public'}
maven{ url 'https://maven.aliyun.com/repository/jcenter'}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
//classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
classpath "com.github.jengelman.gradle.plugins:shadow:2.0.4"
}
}
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java-library'
}
import java.nio.file.Files
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING
apply plugin: 'java'
apply from: LOGSTASH_CORE_PATH + "/../rubyUtils.gradle"
apply plugin: "com.github.johnrengelman.shadow"
// ===========================================================================
// plugin info
// ===========================================================================
group 'org.logstashplugins' // must match the package of the main plugin class
version "${file("VERSION").text.trim()}" // read from required VERSION file
description = "redis Java filter implementation"
pluginInfo.licenses = ['Apache-2.0'] // list of SPDX license IDs
pluginInfo.longDescription = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using \$LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
pluginInfo.authors = ['antch']
pluginInfo.email = ['861710865@qq.com']
pluginInfo.homepage = "http://www.elastic.co/guide/en/logstash/current/index.html"
pluginInfo.pluginType = "filter"
pluginInfo.pluginClass = "JavaFilterRedis"
pluginInfo.pluginName = "java_filter_redis" // must match the @LogstashPlugin annotation in the main plugin class
// ===========================================================================
sourceCompatibility = 1.8
targetCompatibility = 1.8
wrapper {
gradleVersion = '4.4'
distributionUrl = distributionUrl.replace("bin", "all")
}
dependencies {
// This dependency is exported to consumers, that is to say found on their compile classpath.
api 'org.apache.commons:commons-math3:3.6.1'
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:23.0'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
compile 'org.apache.commons:commons-lang3:3.7'
compile 'org.apache.logging.log4j:log4j-api:2.9.1'
compile 'org.apache.logging.log4j:log4j-core:2.9.1'
compile fileTree(dir: LOGSTASH_CORE_PATH, include: "build/libs/logstash-core-?.?.?.jar")
testCompile 'junit:junit:4.12'
testCompile 'org.jruby:jruby-complete:9.2.7.0'
// https://mvnrepository.com/artifact/redis.clients/jedis
compile group: 'redis.clients', name: 'jedis', version: '3.1.0'
}
clean {
delete "${projectDir}/Gemfile"
delete "${projectDir}/" + pluginInfo.pluginFullName() + ".gemspec"
delete "${projectDir}/lib/"
delete "${projectDir}/vendor/"
new FileNameFinder().getFileNames(projectDir.toString(), pluginInfo.pluginFullName() + "-?.?.?.gem").each { filename ->
delete filename
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
shadowJar {
classifier = null
}
task vendor(dependsOn: shadowJar) {
doLast {
String vendorPathPrefix = "vendor/jar-dependencies"
String projectGroupPath = project.group.replaceAll('\\.', '/')
File projectJarFile = file("${vendorPathPrefix}/${projectGroupPath}/${pluginInfo.pluginFullName()}/${project.version}/${pluginInfo.pluginFullName()}-${project.version}.jar")
projectJarFile.mkdirs()
Files.copy(file("$buildDir/libs/${project.name}-${project.version}.jar").toPath(), projectJarFile.toPath(), REPLACE_EXISTING)
validatePluginJar(projectJarFile, project.group)
}
}
task generateRubySupportFiles() {
doLast {
generateRubySupportFilesForPlugin(project.description, project.group, version)
}
}
task removeObsoleteJars() {
doLast {
new FileNameFinder().getFileNames(
projectDir.toString(),
"vendor/**/" + pluginInfo.pluginFullName() + "*.jar",
"vendor/**/" + pluginInfo.pluginFullName() + "-" + version + ".jar").each { f ->
delete f
}
}
}
task gem(dependsOn: [downloadAndInstallJRuby, removeObsoleteJars, vendor, generateRubySupportFiles]) {
doLast {
buildGem(projectDir, buildDir, pluginInfo.pluginFullName() + ".gemspec")
}
}
// In this section you declare where to find the dependencies of your project
repositories {
mavenLocal()
maven{ url 'https://maven.aliyun.com/repository/google'}
maven{ url 'https://maven.aliyun.com/repository/gradle-plugin'}
maven{ url 'https://maven.aliyun.com/repository/public'}
maven{ url 'https://maven.aliyun.com/repository/jcenter'}
maven {
url "https://plugins.gradle.org/m2/"
}
jcenter()
}
Java
1
https://gitee.com/antch_hw/logstash-filter-java_eastcom_filter-redis.git
git@gitee.com:antch_hw/logstash-filter-java_eastcom_filter-redis.git
antch_hw
logstash-filter-java_eastcom_filter-redis
logstash-filter-java_eastcom_filter-redis
master

搜索帮助