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
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ For running tests on a project with no variants, you can simply run following co
gradle clean uploadDebugToBrowserstackAppLive
```

For uploading apps to AppLive / AppAutomate, you can pass customId through command line args as well

```
gradle clean uploadDebugToBrowserstackAppLive --customId='your-custom-id'

```

And for projects with productFlavors, replace ${buildVariantName} with your build variant name, for example if your productFlavor name is "phone" and you want to upload debug build type of this variant then command will be gradle clean uploadPhoneDebugToBrowserstackAppLive.

##### Supported browserStackConfig parameters
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 6 additions & 0 deletions src/main/java/com/browserstack/gradle/BrowserStackTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.gradle.api.DefaultTask;
import org.gradle.api.tasks.Input;
import org.jetbrains.annotations.NotNull;
import org.gradle.api.tasks.options.Option;

public class BrowserStackTask extends DefaultTask {

Expand Down Expand Up @@ -58,6 +59,11 @@ public void setCustomId(String customId) {
this.customId = customId;
}

@Option(option = "customId", description = "CustomId passed through command line.")
public void overrideCustomId(String customId) {
this.customId = customId;
}

public void setDebug(boolean debug) {
isDebug = debug;
}
Expand Down
7 changes: 7 additions & 0 deletions test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ def run_tests
print_separator
end

def run_tests_with_command_line_params
puts "\nRunning new tests using ./gradlew with command line arg"
run_app_live_test("./gradlew clean uploadDebugToBrowserstackAppLive --customId='abc123'")
print_separator
end

def run_tests_with_flavors
puts "Running tests with flavors using ./gradlew"
run_basic_espresso_test("./gradlew clean executePhoneDebugTestsOnBrowserstack")
Expand Down Expand Up @@ -92,6 +98,7 @@ def test
build_plugin
setup_repo
run_tests
run_tests_with_command_line_params
setup_repo_with_app_variants
run_tests_with_flavors
remove_repo
Expand Down