Add basic codenarc checks
* Use gradle to run codenarc tests
* Point jcenter repo address to MCP Artifactory instance
* Add gradle cache and codenarc build report directories to .gitignore
Change-Id: Id5d23de2d6fde8fd4a583b3b67866e1906de8866
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..0660e6d
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,25 @@
+apply plugin: 'groovy'
+apply plugin: 'codenarc'
+
+def jcenterRepo = System.getenv('ARTIFACTORY_URL') ?: 'https://artifactory.mcp.mirantis.net/jcenter'
+
+sourceSets {
+ main {
+ groovy {
+ srcDirs = ['src', 'vars']
+ }
+ }
+}
+
+compileGroovy.enabled = false
+
+repositories {
+ maven {
+ url jcenterRepo
+ }
+}
+
+codenarc {
+ configFile = new File('codenarcRules.groovy')
+ reportFormat = 'text'
+}