Skip to content

Commit

Permalink
fix: change functions visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasfara committed Jun 15, 2022
1 parent 54742c9 commit ebf49c2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package it.nicolasfarabegoli.gradle
import org.gradle.api.Project
import java.io.File

fun writeScript(
internal fun writeScript(
project: Project,
baseDir: File,
types: List<String>,
Expand Down Expand Up @@ -54,9 +54,9 @@ private fun createCommitMessage(
}

private fun wrapInEcho(str: String?): String = str?.let { s -> "echo -e '${escape(s)}'" } ?: ""
fun escape(str: String): String = str.replace("\r", "").replace("\n", "\\n").replace("'", "\\'")
private fun escape(str: String): String = str.replace("\r", "").replace("\n", "\\n").replace("'", "\\'")

fun File.isGitFolder(): Boolean =
private fun File.isGitFolder(): Boolean =
listFiles()?.any { folder -> folder.isDirectory && folder.name == ".git" } ?: false

private fun File.writeScript(content: String) {
Expand Down

0 comments on commit ebf49c2

Please sign in to comment.