From 09e9ace63be65d1f9d2b19128601063506b1e3ac Mon Sep 17 00:00:00 2001 From: Marco Collovati Date: Mon, 30 Dec 2024 08:46:09 +0100 Subject: [PATCH] fix: add replacements for HillaPlugin method calls (#7150) --- .../generator/templates/template-vaadin-gradle-plugin-pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/generator/templates/template-vaadin-gradle-plugin-pom.xml b/scripts/generator/templates/template-vaadin-gradle-plugin-pom.xml index abb1b67ed..adee8cd68 100644 --- a/scripts/generator/templates/template-vaadin-gradle-plugin-pom.xml +++ b/scripts/generator/templates/template-vaadin-gradle-plugin-pom.xml @@ -174,6 +174,8 @@ String oldPackage = 'package com.vaadin.hilla.gradle.plugin' String newPackage = 'package com.vaadin.gradle.plugin' String oldPluginClassDef = 'public class HillaPlugin : Plugin {' String newPluginClassDef = 'public class VaadinPlugin : Plugin {' +String oldPluginCreateEngineConf = 'HillaPlugin.createEngineConfiguration' +String newPluginCreateEngineConf = 'VaadinPlugin.createEngineConfiguration' String importDef = 'import com.vaadin.gradle.VaadinPlugin' String projectDef = 'override fun apply(project: Project) {' String projectTaskDef = 'project.tasks.apply {' @@ -192,6 +194,8 @@ Files.walk(Paths.get(directoryPath)) String updatedContent = content.replace(oldPackage, newPackage) // Replace the old plugin class definition with the new one updatedContent = updatedContent.replace(oldPluginClassDef, newPluginClassDef) + // Replace the old plugin method calls definition with the new one + updatedContent = updatedContent.replace(oldPluginCreateEngineConf, newPluginCreateEngineConf) // Add import for getBooleanProperty updatedContent = updatedContent.replace(importDef,importDef+'\nimport com.vaadin.gradle.getBooleanProperty') // Collect hilla used property