Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed resource file not being set when making localized calls in Grad… #1843

Merged
merged 1 commit into from
Jun 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Tasks/Gradle/gradlesonar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import trm = require('vsts-task-lib/toolrunner');
import sqCommon = require('sonarqube-common/sonarqube-common');
import {SonarQubeEndpoint} from 'sonarqube-common/sonarqube-common';

// Set up localization resource file
tl.setResourcePath(path.join( __dirname, 'task.json'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary ? Isn't it enough to set it once in the GradleTask.ts ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discovered in testing that in fact no, it's not.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know!


// Apply arguments to enable SonarQube analysis
export function applyEnabledSonarQubeArguments(gradleRun: trm.ToolRunner):trm.ToolRunner {
if (!isSonarQubeEnabled()) {
Expand Down
3 changes: 3 additions & 0 deletions Tasks/Gradle/gradletask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import path = require('path');
// Lowercased file names are to lessen the likelihood of xplat issues
import sqGradle = require('./gradlesonar');

// Set up localization resource file
tl.setResourcePath(path.join( __dirname, 'task.json'));

var wrapperScript = tl.getPathInput('wrapperScript', true, true);
if (fs.existsSync(wrapperScript)) {
// (The exists check above is not necessary, but we need to avoid this call when we are running L0 tests.)
Expand Down
2 changes: 1 addition & 1 deletion Tasks/Maven/mavencodeanalysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import pmd = require('./mavenpmd');
import {AnalysisResult} from './analysisresult';
import {ModuleAnalysis} from './moduleanalysis';

// Set up for localization
// Set up localization resource file
tl.setResourcePath(path.join( __dirname, 'task.json'));

// Cache build variables are cached globally as they cannot change during the same build.
Expand Down
3 changes: 3 additions & 0 deletions Tasks/Maven/maventask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import {SonarQubeEndpoint} from 'sonarqube-common/sonarqube-common';
// Lowercased file names are to lessen the likelihood of xplat issues
import codeAnalysis = require('./mavencodeanalysis');

// Set up localization resource file
tl.setResourcePath(path.join( __dirname, 'task.json'));

var mavenPOMFile: string = tl.getPathInput('mavenPOMFile', true, true);
var javaHomeSelection: string = tl.getInput('javaHomeSelection', true);
var mavenVersionSelection: string = tl.getInput('mavenVersionSelection', true);
Expand Down