diff --git a/README.md b/README.md index ed7a3ad7b..32ec6d668 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ A collection of our Android templates: ``` package-name= New package name (i.e., com.example.package) app-name= New app name (i.e., MyApp, "My App", "my-app") - template= Template (i.e., compose) + template= Template (i.e., compose) (optional, default: compose) force= Force project creation even if the script fails (default: false) destination= Set the output location where the project should be generated (i.e., /Users/johndoe/documents/projectfolder) ``` diff --git a/gradle-wrapper.properties b/gradle-wrapper.properties deleted file mode 100644 index 7257f1b43..000000000 --- a/gradle-wrapper.properties +++ /dev/null @@ -1,7 +0,0 @@ -#Tue Jan 12 10:52:22 ICT 2021 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip -org.gradle.parallel=true diff --git a/scripts/new_project.kts b/scripts/new_project.kts index 142bea3db..b111306bc 100644 --- a/scripts/new_project.kts +++ b/scripts/new_project.kts @@ -33,7 +33,7 @@ object NewProject { Run kscript new_project.kts to create a new project with the following arguments: $KEY_PACKAGE_NAME= New package name (i.e., com.example.package) $KEY_APP_NAME= New app name (i.e., MyApp, "My App", "my-app") - $KEY_TEMPLATE= Template (i.e. $TEMPLATE_COMPOSE) + $KEY_TEMPLATE= Template (i.e. $TEMPLATE_COMPOSE) (optional, default: $TEMPLATE_COMPOSE) $KEY_FORCE= Force project creation even if the script fails (default: false) $KEY_DESTINATION= Set the output location where the project should be generated (i.e., /Users/johndoe/documents/projectfolder) @@ -83,7 +83,7 @@ object NewProject { } } - private var template: String = "" + private var template: String = TEMPLATE_COMPOSE private val templatePackageName get() = TEMPLATE_PACKAGE_NAME_COMPOSE @@ -114,7 +114,6 @@ object NewProject { private fun handleArguments(args: Array) { var hasAppName = false var hasPackageName = false - var hasTemplate = false args.forEach { arg -> when { arg == KEY_HELP -> { @@ -139,7 +138,6 @@ object NewProject { arg.startsWith("$KEY_TEMPLATE$DELIMITER_ARGUMENT") -> { val (key, value) = arg.split(DELIMITER_ARGUMENT) validateTemplate(value) - hasTemplate = true } arg.startsWith("$KEY_FORCE$DELIMITER_ARGUMENT") -> { @@ -173,12 +171,6 @@ object NewProject { exitAfterMessage = true, isError = true, ) - - !hasTemplate -> showMessage( - message = "ERROR: No template has been provided \n$helpMessage", - exitAfterMessage = true, - isError = true, - ) } }