A different version of the library has been downloaded

I have defined version 6.8.6 Elasticsearch in build.gradle.

implementation group: 'org.elasticsearch', name: 'elasticsearch', version: '6.8.6'

Then version 6.8.6 and version 7.6.2 were downloaded.
Why?
Moreover, due to the transitive dependency of gradle, application used version 7.6.2.

I want to use version 6.8.6.

help me..

↓ My build.gradle

ext {
        set('elasticsearch.version', '6.8.6')
    }

    dependencies {
        implementation "org.elasticsearch:elasticsearch:6.8.6"

        implementation("org.elasticsearch.client:elasticsearch-rest-high-level-client:6.8.6") {
            exclude group: "org.elasticsearch" ,module: "elasticsearch"
        }
        implementation("org.elasticsearch.client:elasticsearch-rest-client:6.8.6") {
            exclude group: "org.elasticsearch" ,module: "elasticsearch"
        }

    }
    configurations.all {
        resolutionStrategy {
            dependencySubstitution {
                substitute module('org.elasticsearch.client:elasticsearch-rest-high-level-client') with module('org.elasticsearch.client:elasticsearch-rest-high-level-client:6.8.6')
                substitute module('org.elasticsearch.client:elasticsearch-rest-client') with module('org.elasticsearch.client:elasticsearch-rest-client:6.8.6')
                substitute module('org.elasticsearch:elasticsearch') with module('org.elasticsearch:elasticsearch:6.8.6')

            }
        }
        resolutionStrategy.force "org.elasticsearch:elasticsearch:6.8.6"
    }

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.