diff --git a/build.gradle b/build.gradle index 6f4353e..6c58e9e 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { } wrapper { - gradleVersion = "${project.property('gradle.wrapper.version')}" + gradleVersion = libs.versions.gradle.get() distributionType = Wrapper.DistributionType.ALL } @@ -27,9 +27,9 @@ subprojects { apply plugin: 'java-library' dependencies { - testImplementation "org.apache.logging.log4j:log4j-core:${project.property('log4j.version')}" - testImplementation "org.apache.logging.log4j:log4j-jul:${project.property('log4j.version')}" - testImplementation "org.apache.logging.log4j:log4j-slf4j-impl:${project.property('log4j.version')}" + testImplementation libs.log4j.core + testImplementation libs.log4j.jul + testImplementation libs.log4j.slf4j } apply from: rootProject.file('gradle/ide/idea.gradle') diff --git a/elx-api/build.gradle b/elx-api/build.gradle index 4b91301..ae40999 100644 --- a/elx-api/build.gradle +++ b/elx-api/build.gradle @@ -1,7 +1,7 @@ dependencies { - api "org.xbib:metrics-common:${project.property('xbib-metrics.version')}" - api "org.elasticsearch:elasticsearch:${project.property('elasticsearch.version')}" + api libs.metrics + api libs.elasticsearch // override old artifacts in ES x-content. We must use jackson smile/cbor/yaml and log4j2 api here. - api "com.fasterxml.jackson.core:jackson-core:${project.property('jackson.version')}" - api "org.apache.logging.log4j:log4j-api:${project.property('log4j.version')}" + api libs.jackson + api libs.log4j.api } diff --git a/elx-common/build.gradle b/elx-common/build.gradle index fc26420..f59c9cd 100644 --- a/elx-common/build.gradle +++ b/elx-common/build.gradle @@ -1,6 +1,6 @@ dependencies { api project(':elx-api') - implementation "org.xbib:time:${rootProject.property('xbib-time.version')}" - testImplementation "org.elasticsearch.plugin:transport-netty4-client:${rootProject.property('elasticsearch.version')}" - testImplementation "org.xbib:netty-http-client:${project.property('xbib-netty-http.version')}" + implementation libs.time + testImplementation libs.netty.http + testImplementation libs.es.plugin.transport.netty4 } diff --git a/elx-http/build.gradle b/elx-http/build.gradle index b069967..31c0959 100644 --- a/elx-http/build.gradle +++ b/elx-http/build.gradle @@ -1,5 +1,5 @@ dependencies{ api project(':elx-common') - api "org.xbib:netty-http-client:${project.property('xbib-netty-http.version')}" - api "org.elasticsearch.plugin:transport-netty4-client:${rootProject.property('elasticsearch.version')}" + api libs.netty.http + api libs.es.plugin.transport.netty4 } diff --git a/elx-node/build.gradle b/elx-node/build.gradle index b61dbcf..aa78967 100644 --- a/elx-node/build.gradle +++ b/elx-node/build.gradle @@ -1,4 +1,4 @@ dependencies { api project(':elx-common') - api "org.elasticsearch.plugin:transport-netty4-client:${project.property('elasticsearch.version')}" + api libs.es.plugin.transport.netty4 } diff --git a/elx-transport/build.gradle b/elx-transport/build.gradle index 835f3a0..aa78967 100644 --- a/elx-transport/build.gradle +++ b/elx-transport/build.gradle @@ -1,4 +1,4 @@ dependencies { api project(':elx-common') - api "org.elasticsearch.plugin:transport-netty4-client:${rootProject.property('elasticsearch.version')}" + api libs.es.plugin.transport.netty4 } diff --git a/gradle.properties b/gradle.properties index 0255d0e..89eeefa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,16 +1,5 @@ group = org.xbib name = elx -version = 7.10.2.20 +version = 7.10.2.21 org.gradle.warning.mode = ALL -gradle.wrapper.version = 7.3.2 -elasticsearch.version = 7.10.2 -# ES 7.10.2 uses Jackson 2.10.4 -jackson.version = 2.12.5 -# ES 7.10.2 uses Netty 4.1.49 -xbib-netty-http.version = 4.1.72.1 -# ES 7.10.2 uses log4j2 2.11.1 -log4j.version = 2.17.1 -xbib-metrics.version = 2.2.0 -xbib-time.version = 2.1.0 -junit.version = 5.8.1 diff --git a/gradle/test/junit5.gradle b/gradle/test/junit5.gradle index 79f16ba..2a11c7a 100644 --- a/gradle/test/junit5.gradle +++ b/gradle/test/junit5.gradle @@ -1,12 +1,8 @@ - -def junitVersion = project.hasProperty('junit.version')?project.property('junit.version'):'5.7.1' -def hamcrestVersion = project.hasProperty('hamcrest.version')?project.property('hamcrest.version'):'2.2' - dependencies { - testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}" - testImplementation "org.junit.jupiter:junit-jupiter-params:${junitVersion}" - testImplementation "org.hamcrest:hamcrest-library:${hamcrestVersion}" - testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}" + testImplementation libs.junit.jupiter.api + testImplementation libs.junit.jupiter.params + testImplementation libs.hamcrest + testRuntimeOnly libs.junit.jupiter.engine } test { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180..41d9927 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ac0b842..92f06b5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle b/settings.gradle index 57d6828..a7477a9 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,29 @@ +dependencyResolutionManagement { + versionCatalogs { + libs { + version('gradle', '7.4.2') + version('junit', '5.8.2') + version('elasticsearch', '7.10.2') + version('log4j', '2.17.1') // ES 7.10.2 uses log4j2 2.11.1 + library('junit-jupiter-api', 'org.junit.jupiter', 'junit-jupiter-api').versionRef('junit') + library('junit-jupiter-params', 'org.junit.jupiter', 'junit-jupiter-params').versionRef('junit') + library('junit-jupiter-engine', 'org.junit.jupiter', 'junit-jupiter-engine').versionRef('junit') + library('hamcrest', 'org.hamcrest:hamcrest-library:2.2') + library('junit4', 'junit:junit:4.13.2') + library('log4j-api', 'org.apache.logging.log4j', 'log4j-api').versionRef('log4j') + library('log4j-core', 'org.apache.logging.log4j', 'log4j-core').versionRef('log4j') + library('log4j-slf4j', 'org.apache.logging.log4j', 'log4j-slf4j-impl').versionRef('log4j') + library('log4j-jul', 'org.apache.logging.log4j', 'log4j-jul').versionRef('log4j') + library('elasticsearch', 'org.elasticsearch', 'elasticsearch').versionRef('elasticsearch') + library('es-plugin-transport-netty4', 'org.elasticsearch.plugin', 'transport-netty4-client').versionRef('elasticsearch') + library('jackson', 'com.fasterxml.jackson.core', 'jackson-core').version('2.12.7') // ES 7.10.2 uses Jackson 2.10.4 + library('netty-http', 'org.xbib', 'netty-http-client').version('4.1.77.0') // ES 7.10.2 uses Netty 4.1.49 + library('metrics', 'org.xbib', 'metrics-common').version('2.2.0') + library('time', 'org.xbib', 'time').version('2.1.0') + } + } +} + include 'elx-api' include 'elx-common' include 'elx-node'