Skip to content

Commit 398a7b1

Browse files
committed
Revert "feat: Property to disable hilla task registration (#6519)"
This reverts commit 1c09c83.
1 parent 3fc6a5c commit 398a7b1

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

scripts/generator/templates/template-vaadin-gradle-plugin-pom.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,6 @@ String oldPluginClassDef = 'public class HillaPlugin : Plugin<Project> {'
176176
String newPluginClassDef = 'public class VaadinPlugin : Plugin<Project> {'
177177
String oldPluginCreateEngineConf = 'HillaPlugin.createEngineConfiguration'
178178
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 {'
182179
183180
// Use NIO to walk through the directory
184181
Files.walk(Paths.get(directoryPath))
@@ -196,12 +193,6 @@ Files.walk(Paths.get(directoryPath))
196193
updatedContent = updatedContent.replace(oldPluginClassDef, newPluginClassDef)
197194
// Replace the old plugin method calls definition with the new one
198195
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)
205196
// Write the updated content back to the file
206197
Files.write(path, updatedContent.getBytes())
207198
println "Updated package declaration in file: ${path}"

0 commit comments

Comments
 (0)