-
Notifications
You must be signed in to change notification settings - Fork 29
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
NuGetSources task #58
Changes from 16 commits
a09705b
52a8be4
daffe53
4125a3f
8939c94
be4af2c
c2b8f77
86be1be
ee7f6e8
90e42eb
e3f429a
68aa3e2
598fd82
10bb9f4
9215f8f
464ac16
5180711
3f1e8a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.ullink | ||
|
||
import org.gradle.api.GradleException | ||
|
||
class NuGetSources extends BaseNuGet { | ||
|
||
enum Operation{ | ||
add, remove, enable, disable, list | ||
} | ||
|
||
Operation operation | ||
def sourceName | ||
def sourceUrl | ||
def username | ||
def password | ||
def configFile | ||
def storePaswordInClearText = false | ||
|
||
NuGetSources() { | ||
super('sources') | ||
project.afterEvaluate{ | ||
if(!operation){ | ||
throw new GradleException('Operation not specified for NuGetSources task.') | ||
} | ||
if(operation != Operation.list && !sourceName){ | ||
throw new GradleException('SourceName not specified for NuGetSources task.') | ||
} | ||
} | ||
} | ||
|
||
@Override | ||
void exec() { | ||
args operation | ||
if (sourceName) args '-Name', sourceName | ||
if (sourceUrl) args '-Source', sourceUrl | ||
if (username) args '-UserName', name | ||
if (password) args '-Passsword', password | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typo still ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still the '-Passs' typo here, no ? |
||
if (configFile) args '-ConfigFile', configFile | ||
if (storePaswordInClearText) args '-StorePaswordInClearText' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typo as well ( |
||
super.exec() | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be username ?