Skip to content

Commit

Permalink
Define variables for dependency version numbers and group dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chang Liu (cgliu) committed Apr 15, 2021
1 parent 241ab7d commit 3c360dc
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
buildscript {
ext {
es_version = System.getProperty("es.version", "7.10.2")
log4j_version = "2.11.1"
jjwt_version = "0.10.5"
}

repositories {
Expand Down Expand Up @@ -117,7 +119,7 @@ configurations.testCompile {
}

dependencies {
compile('org.elasticsearch.plugin:transport-netty4-client:7.10.2') {
compile("org.elasticsearch.plugin:transport-netty4-client:${es_version}") {
exclude group: 'org.elasticsearch', module: 'jna'
exclude group: 'com.vividsolutions', module: 'jts'
exclude group: 'org.apache.logging.log4j', module: 'log4j-api'
Expand All @@ -130,7 +132,7 @@ dependencies {
compile('com.fasterxml.jackson.core:jackson-databind:2.11.2') {
exclude group: 'com.fasterxml.jackson.core', module: 'ackson-core'
}
compile('org.apache.logging.log4j:log4j-slf4j-impl:2.11.1') {
compile("org.apache.logging.log4j:log4j-slf4j-impl:${log4j_version}") {
exclude group: 'org.apache.logging.log4j', module: 'log4j-api'
}
compile('org.ldaptive:ldaptive:1.2.3') {
Expand All @@ -140,10 +142,10 @@ dependencies {
compile('org.apache.httpcomponents:httpclient-cache:4.5.3') {
exclude group: 'org.apache.httpcomponents', module: 'httpcore'
}
compile('org.elasticsearch.client:elasticsearch-rest-high-level-client:7.10.2') {
compile("org.elasticsearch.client:elasticsearch-rest-high-level-client:${es_version}") {
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
compile 'io.jsonwebtoken:jjwt-api:0.10.5'
compile "io.jsonwebtoken:jjwt-api:${jjwt_version}"
compile('org.apache.cxf:cxf-rt-rs-security-jose:3.4.0') {
exclude group: 'jakarta.activation', module: 'jakarta.activation-api'
}
Expand All @@ -169,7 +171,7 @@ dependencies {
compile('org.apache.httpcomponents:httpclient:4.5.3') {
exclude group: 'org.apache.httpcomponents', module: 'httpcore'
}
compile('io.jsonwebtoken:jjwt-jackson:0.10.5') {
compile("io.jsonwebtoken:jjwt-jackson:${jjwt_version}") {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
}
compile 'org.apache.geronimo.specs:geronimo-jta_1.1_spec:1.1.1'
Expand All @@ -182,35 +184,35 @@ dependencies {
exclude group: 'jakarta.activation', module: 'jakarta.activation-api'
}
compile 'org.jboss.spec.javax.rmi:jboss-rmi-api_1.0_spec:1.0.6.Final'
compileOnly 'org.apache.logging.log4j:log4j-core:2.11.1'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.10.5'
runtimeOnly('io.jsonwebtoken:jjwt-jackson:0.10.5') {
compile "org.elasticsearch.plugin:lang-mustache-client:${es_version}"
compile "org.elasticsearch.plugin:parent-join-client:${es_version}"
compile "org.elasticsearch.plugin:aggs-matrix-stats-client:${es_version}"
compileOnly "org.apache.logging.log4j:log4j-core:${log4j_version}"
compileOnly "org.elasticsearch:elasticsearch:${es_version}"
compileOnly 'io.netty:netty-tcnative:2.0.25.Final'
runtimeOnly "io.jsonwebtoken:jjwt-impl:${jjwt_version}"
runtimeOnly("io.jsonwebtoken:jjwt-jackson:${jjwt_version}") {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
}
runtimeOnly 'com.sun.xml.messaging.saaj:saaj-impl:1.5.2'
runtimeOnly 'org.jvnet.staxex:stax-ex:1.8.3'
testImplementation 'commons-io:commons-io:2.6'
testCompileOnly 'org.hamcrest:hamcrest-all:1.3'
testCompileOnly 'org.springframework.kafka:spring-kafka-test:2.5.4.RELEASE'
testImplementation 'commons-io:commons-io:2.6'
testImplementation 'junit:junit:4.12'
testImplementation 'org.apache.httpcomponents:fluent-hc:4.5.3'
testImplementation('org.elasticsearch.plugin:reindex-client:7.10.2') {
testImplementation("org.elasticsearch.plugin:reindex-client:${es_version}") {
exclude group: 'org.elasticsearch', module: 'elasticsearch-ssl-config'
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
testImplementation 'org.elasticsearch:elasticsearch-ssl-config:7.10.2'
testImplementation 'org.elasticsearch.plugin:percolator-client:7.10.2'
compile 'org.elasticsearch.plugin:lang-mustache-client:7.10.2'
compile 'org.elasticsearch.plugin:parent-join-client:7.10.2'
compile 'org.elasticsearch.plugin:aggs-matrix-stats-client:7.10.2'
testImplementation "org.elasticsearch:elasticsearch-ssl-config:${es_version}"
testImplementation "org.elasticsearch.plugin:percolator-client:${es_version}"
testImplementation 'org.mockito:mockito-core:2.23.0'
testImplementation 'net.bytebuddy:byte-buddy:1.9.0'
testImplementation 'org.objenesis:objenesis:2.6'
testCompileOnly 'org.springframework.kafka:spring-kafka-test:2.5.4.RELEASE'
testImplementation 'javax.servlet:servlet-api:2.5'
testImplementation 'com.unboundid:unboundid-ldapsdk:4.0.9'
testImplementation 'com.github.stephenc.jcip:jcip-annotations:1.0-1'
compileOnly 'org.elasticsearch:elasticsearch:7.10.2'
compileOnly 'io.netty:netty-tcnative:2.0.25.Final'
}

tasks.register('testsJar', Jar) {
Expand Down Expand Up @@ -299,7 +301,7 @@ ospackage {
user 'root'
permissionGroup 'root'

requires('elasticsearch-oss', "7.10.2", EQUAL)
requires('elasticsearch-oss', "${es_version}", EQUAL)
packager = 'Amazon'
vendor = 'Amazon'
os = 'LINUX'
Expand Down

0 comments on commit 3c360dc

Please sign in to comment.