<commit_before>/*
 * Copyright 2019 PolyForest
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.acornui.build.gradle

fun main(args: Array<String>) {
	val argMap = ArgumentMap(args)
	val target = getTarget(argMap.get("target", default = Targets.ASSETS.name))
	val usage = """Usage: -target=[assets|asset-manifest|lib-manifest|bust-script-cache] -src=<dir> -dest=<dir> -root=<dir>
		|${"\t"}Note - `-target=assets` does not require root or dest
	""".trimMargin()

	if (target == null) {
		println(usage)
		System.exit(-1)
	}

	with(argMap) {
		when (target) {

			Targets.ASSETS -> run {
				val (src, dest) = getFileArgs("src", "dest")
				com.acornui.build.util.AcornAssets.packAssets(src, dest)
			}

			Targets.ASSET_MANIFEST -> run {
				val (src, root) = getFileArgs("src", "root")
				// Source directory is also the destination of the generated manifest file
				com.acornui.build.util.AcornAssets.writeManifest(src, root)
			}
<commit_msg>Fix arguments & gradle argument properties for tasks that use acorn build<commit_after>/*
 * Copyright 2019 PolyForest
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.acornui.build.gradle

fun main(args: Array<String>) {
	val argMap = ArgumentMap(args)
	val target = getTarget(argMap.get("target", default = Targets.ASSETS.name))
	val usage = """Usage: -target=[assets|asset-manifest|lib-manifest|bust-script-cache] -src=<dir> -dest=<dir> -root=<dir>
		|${"\t"}Note - `-target=assets` does not require root or dest
	""".trimMargin()

	if (target == null) {
		println(usage)
		System.exit(-1)
	}

	with(argMap) {
		when (target) {

			Targets.ASSETS -> run {
				val src = getFileArg("src")
				com.acornui.build.util.AcornAssets.packAssets(src, src)
			}

			Targets.ASSET_MANIFEST -> run {
				val (src, root) = getFileArgs("src", "root")
				// Source directory is also the destination of the generated manifest file
				com.acornui.build.util.AcornAssets.writeManifest(src, root)
			}

{'fraction_non_alphanumeric': 0.12014725568942436, 'fraction_numerical': 0.006024096385542169, 'mean_word_length': 3.852272727272727, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7154317', 'n_tokens_mistral': 997, 'n_tokens_neox': 918, 'n_words': 304}