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 }