Skip to content
Open
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
12 changes: 12 additions & 0 deletions src/main/java/io/github/lambdatest/gradle/LambdaTestTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,30 @@ public void runLambdaTest() {
// setter methods for the properties

public void setUsername(String username) {
if (username == null || username.trim().isEmpty()) {
throw new IllegalArgumentException("Username cannot be null or empty");
}
this.username = username;
}

public void setAccessKey(String accessKey) {
if (accessKey == null || accessKey.trim().isEmpty()) {
throw new IllegalArgumentException("Access key cannot be null or empty");
}
this.accessKey = accessKey;
}

public void setAppFilePath(String appFilePath) {
if (appFilePath != null && appFilePath.trim().isEmpty()) {
throw new IllegalArgumentException("App file path cannot be empty");
}
this.appFilePath = appFilePath;
}

public void setTestSuiteFilePath(String testSuiteFilePath) {
if (testSuiteFilePath != null && testSuiteFilePath.trim().isEmpty()) {
throw new IllegalArgumentException("Test suite file path cannot be empty");
}
this.testSuiteFilePath = testSuiteFilePath;
}

Expand Down
12 changes: 12 additions & 0 deletions src/main/java/io/github/lambdatest/gradle/LambdaUploaderTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,30 @@ public void uploadApkToLambdaTest() {

// Setter functions for the task
public void setUsername(String username) {
if (username == null || username.trim().isEmpty()) {
throw new IllegalArgumentException("Username cannot be null or empty");
}
this.username = username;
}

public void setAccessKey(String accessKey) {
if (accessKey == null || accessKey.trim().isEmpty()) {
throw new IllegalArgumentException("Access key cannot be null or empty");
}
this.accessKey = accessKey;
}

public void setAppFilePath(String appFilePath) {
if (appFilePath != null && appFilePath.trim().isEmpty()) {
throw new IllegalArgumentException("App file path cannot be empty");
}
this.appFilePath = appFilePath;
}

public void setTestSuiteFilePath(String testSuiteFilePath) {
if (testSuiteFilePath != null && testSuiteFilePath.trim().isEmpty()) {
throw new IllegalArgumentException("Test suite file path cannot be empty");
}
this.testSuiteFilePath = testSuiteFilePath;
}

Expand Down
Loading