@@ -176,9 +176,6 @@ String oldPluginClassDef = 'public class HillaPlugin : Plugin<Project> {'
176
176
String newPluginClassDef = 'public class VaadinPlugin : Plugin<Project> {'
177
177
String oldPluginCreateEngineConf = 'HillaPlugin.createEngineConfiguration'
178
178
String newPluginCreateEngineConf = 'VaadinPlugin.createEngineConfiguration'
179
- String importDef = 'import com.vaadin.gradle.VaadinPlugin'
180
- String projectDef = 'override fun apply(project: Project) {'
181
- String projectTaskDef = 'project.tasks.apply {'
182
179
183
180
// Use NIO to walk through the directory
184
181
Files.walk(Paths.get(directoryPath))
@@ -196,12 +193,6 @@ Files.walk(Paths.get(directoryPath))
196
193
updatedContent = updatedContent.replace(oldPluginClassDef, newPluginClassDef)
197
194
// Replace the old plugin method calls definition with the new one
198
195
updatedContent = updatedContent.replace(oldPluginCreateEngineConf, newPluginCreateEngineConf)
199
- // Add import for getBooleanProperty
200
- updatedContent = updatedContent.replace(importDef,importDef+'\nimport com.vaadin.gradle.getBooleanProperty')
201
- // Collect hilla used property
202
- updatedContent = updatedContent.replace(projectDef, projectDef + '\nval hillaUsed = project.getBooleanProperty("hilla.active") ?: true;')
203
- // Do not apply tasks if hilla not used
204
- updatedContent = updatedContent.replace(projectTaskDef,'if(hillaUsed) '+projectTaskDef)
205
196
// Write the updated content back to the file
206
197
Files.write(path, updatedContent.getBytes())
207
198
println "Updated package declaration in file: ${path}"
0 commit comments