Skip to content

Instantly share code, notes, and snippets.

View mattbertolini's full-sized avatar

Matt Bertolini mattbertolini

  • Omicron Persei 8
View GitHub Profile
@ghale
ghale / build.gradle
Last active December 21, 2023 13:41
Build Service for restricting only one test task to execute at a time
import org.gradle.api.services.*
subprojects {
apply plugin: OneTestTaskOnly
}
class OneTestTaskOnly implements Plugin<Project> {
void apply(Project project) {
// Register a service to constrain parallelism of test tasks to 1
Provider<SharedResource> testLimitingService = project.gradle.sharedServices.registerIfAbsent("testLimitingService", SharedResource) { spec ->
@mikybars
mikybars / pom.xml
Last active January 10, 2022 17:36
Maven Surefire, Failsafe plugins with Jacoco for unit and integration testing with code coverage. https://natritmeyer.com/howto/reporting-aggregated-unit-and-integration-test-coverage-with-jacoco/
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${surefire.jacoco.args}</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@moksamedia
moksamedia / gist:5475917
Created April 28, 2013 04:45
Gradle: to automatically discover subprojects and include them in your root project, put this in your settings.gradle file
/*
* Here we iterate over the directories found in the root directory of the
* main project, and if the subdirectory contains a build.gradle file, it
* is added to the main project as a subproject.
*/
Closure discoverSubprojects = {
def list = []
rootDir.eachDir(){ dir ->
dir.eachFileMatch({it == 'build.gradle'}, { list += [dir.name] })
@wbotelhos
wbotelhos / env.rb
Last active February 12, 2018 14:07
Configuring Firefox Binary.path for Cucumber (Ubuntu)
# Could not find Firefox binary (os=linux). Make sure Firefox is installed or set the path manually with Selenium::WebDriver::Firefox::Binary.path= (Selenium::WebDriver::Error::WebDriverError)
require 'selenium-webdriver'
Selenium::WebDriver::Firefox::Binary.path='/usr/bin/firefox/firefox-bin'