Skip to content

Commit

Permalink
Update build.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
acetousk authored Jul 11, 2024
1 parent e8eec05 commit c0d8f4c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -971,14 +971,14 @@ task createComponent {
def myaddonsFile = file('myaddons.xml')
if (myaddonsFile.exists()){
// Iterate through myaddons file and delete the lines that are </addons>
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("</addons>")) {
iterator.remove()
}
}
// Filter out the lines that contain </addons>
def filteredLines = lines.findAll { !it.contains("</addons>") }

// 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()
Expand Down

0 comments on commit c0d8f4c

Please sign in to comment.