# HG changeset patch # User cin # Date 2019-10-23 02:19:43 # Node ID f8676ff23edabe301946f1508afc4a4a59e24795 # Parent e1c9ce0d77b4d37609d2678534fdbdfa5fa1190a added optional lint parameter, -Plint=true to enable all lint tasks diff --git a/build.gradle b/build.gradle --- a/build.gradle +++ b/build.gradle @@ -9,6 +9,7 @@ def tagDistance = 0; ext { packageName = "@$npmScope/$name" + lint = project.hasProperty('lint') ? lint : false } if (!version) { @@ -72,7 +73,6 @@ typescript { compilerOptions { types = [] declaration = true - listFiles = true } tscCmd = "$projectDir/node_modules/.bin/tsc" tsLintCmd = "$projectDir/node_modules/.bin/tslint" @@ -80,6 +80,14 @@ typescript { npmCmd = "npm" } +tasks.matching{ it.name =~ /^configureTs/ }.configureEach { + dependsOn "prepare" +} + +tasks.matching{ it.name =~ /^lint/ }.configureEach { + onlyIf { lint } +} + task prepare { } @@ -97,6 +105,8 @@ task printVersion { } task clean { + prepare.mustRunAfter it + doLast { delete buildDir }