From c0d8f4c3852031c52c3f4f262019e1e1a229ed5f Mon Sep 17 00:00:00 2001 From: acetousk Date: Thu, 11 Jul 2024 16:53:24 -0600 Subject: [PATCH] Update build.gradle --- build.gradle | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 1193a4f0d..1d8aa0bc3 100644 --- a/build.gradle +++ b/build.gradle @@ -971,14 +971,14 @@ task createComponent { def myaddonsFile = file('myaddons.xml') if (myaddonsFile.exists()){ // Iterate through myaddons file and delete the lines that are - def iterator = myaddonsFile.readLines().iterator() + // Read the lines from the file + def lines = myaddonsFile.readLines() - while (iterator.hasNext()) { - def line = iterator.next() - if (line.contains("")) { - iterator.remove() - } - } + // Filter out the lines that contain + def filteredLines = lines.findAll { !it.contains("") } + + // Write the filtered lines back to the file + myaddonsFile.text = filteredLines.join('\n') } else { println "myaddons.xml not found. Creating one\nEnter repository github (g), github-ssh (GS), bitbucket (b), or bitbucket-ssh (bs)" def repositoryInput = System.in.newReader().readLine()