<commit_before>﻿var tl = require('vso-task-lib');
var fs = require('fs')

var wrapperScript = tl.getPathInput('wrapperScript', true, true);
fs.chmodSync(wrapperScript, "755"); //Make sure the wrapper script is executable
var gb = new tl.ToolRunner(wrapperScript);

var options = tl.getInput('options');
if (options) {
    gb.arg(options);
}

var tasks = tl.getInput('tasks', true);
if (tasks) {
    gb.arg(tasks);
}

// update JAVA_HOME if user selected specific JDK version
var jdkVersion = tl.getInput('jdkVersion');
var jdkArchitecture = tl.getInput('jdkArchitecture');
if(jdkVersion != 'default') {
  // jdkVersion should be in the form of 1.7, 1.8, or 1.10<commit_msg>handle cwd in gradle task<commit_after>﻿var tl = require('vso-task-lib');
var fs = require('fs');
var path = require('path');

var wrapperScript = tl.getPathInput('wrapperScript', true, true);
fs.chmodSync(wrapperScript, "755"); //Make sure the wrapper script is executable

//working directory
var cwd = tl.getInput('cwd');
if(!cwd) {
  cwd = path.dirname(wrapperScript);
}
tl.cd(cwd);

var gb = new tl.ToolRunner(wrapperScript);

var options = tl.getInput('options');
if (options) {
    gb.arg(options);
}

var tasks = tl.getInput('tasks', true);
if (tasks) {
    gb.arg(tasks);
}

// update JAVA_HOME if user selected specific JDK version
var jdkVersion = tl.getInput('jdkVersion');
var jdkArchitecture = tl.getInput('jdkArchitecture');
if(jdkVersion != 'default') {
  // jdkVersion should be in the form of 1.7, 1.8, or 1.10
{'fraction_non_alphanumeric': 0.15456362425049966, 'fraction_numerical': 0.013324450366422385, 'mean_word_length': 4.844357976653696, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '7355107', 'n_tokens_mistral': 550, 'n_tokens_neox': 523, 'n_words': 143}