export default function cleanupKafkaFilesTask({ application }) {
    if (this.isJhipsterVersionLessThan('6.5.2')) {
        this.removeFile(`${application.javaPackageSrcDir}service/${application.upperFirstCamelCaseBaseName}KafkaConsumer.java`);
        this.removeFile(`${application.javaPackageSrcDir}service/${application.upperFirstCamelCaseBaseName}KafkaProducer.java`);
    }
    if (this.isJhipsterVersionLessThan('7.7.1')) {
        this.removeFile(`${application.javaPackageSrcDir}config/KafkaProperties.java`);
    }
    if (this.isJhipsterVersionLessThan('7.10.0')) {
        this.removeFile(`${application.javaPackageSrcDir}config/KafkaSseConsumer.java`);
        this.removeFile(`${application.javaPackageSrcDir}config/KafkaSseProducer.java`);
        this.removeFile(`${application.srcTestResources}META-INF/spring.factories`);
        this.removeFile(`${application.javaPackageTestDir}config/TestContainersSpringContextCustomizerFactory.java`);
    }
    if (this.isJhipsterVersionLessThan('8.1.1')) {
        if (application.messageBrokerPulsar) {
            this.removeFile('gradle/pulsar.gradle');
        }
        if (application.messageBrokerKafka) {
            this.removeFile('gradle/kafka.gradle');
        }
    }
}
