export default function cleanupElasticsearchFilesTask({ application }) {
    if (this.isJhipsterVersionLessThan('4.0.0')) {
        this.removeFile(`${application.javaPackageSrcDir}config/ElasticSearchConfiguration.java`);
    }
    if (this.isJhipsterVersionLessThan('5.2.2')) {
        this.removeFile(`${application.javaPackageSrcDir}config/ElasticsearchConfiguration.java`);
    }
    if (this.isJhipsterVersionLessThan('7.0.0-beta.0')) {
        this.removeFile(`${application.javaPackageTestDir}config/ElasticsearchTestConfiguration.java`);
    }
    if (this.isJhipsterVersionLessThan('7.7.1')) {
        if (application.generateUserManagement) {
            this.removeFile(`${application.javaPackageTestDir}repository/search/UserSearchRepositoryMockConfiguration.java`);
        }
    }
    if (this.isJhipsterVersionLessThan('7.9.3')) {
        if (application.reactive) {
            this.removeFile(`${application.javaPackageTestDir}config/ElasticsearchReactiveTestConfiguration.java`);
        }
    }
}
