Skip to content

Instantly share code, notes, and snippets.

View mark-vieira's full-sized avatar

Mark Vieira mark-vieira

View GitHub Profile
@mark-vieira
mark-vieira / scratch_6.groovy
Last active November 8, 2017 20:04
Download maven deps to folder
repositories {
jcenter()
}
configurations {
jars
}
dependencies {
jars 'junit:junit:4.12'
@mark-vieira
mark-vieira / BuildCachePlugin.groovy
Created August 25, 2017 22:04
Build cache plugin hack
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.internal.project.ProjectInternal
import org.gradle.caching.configuration.internal.BuildCacheConfigurationInternal
import org.gradle.caching.http.HttpBuildCache
class BuildCachePlugin implements Plugin<Project> {
@Override
void apply(Project project) {
def cacheConfig = ((ProjectInternal) project).services.get(BuildCacheConfigurationInternal)
@mark-vieira
mark-vieira / settings.gradle
Created February 9, 2017 21:27
Gradle IDEA plugin project name deduplication error
include ':foo:common', ':bar:common'
gradle.rootProject {
project(':foo') {
subprojects {
apply plugin: 'idea'
}
}
project(':bar') {
@mark-vieira
mark-vieira / gist:cfe83379e3b8749afc78
Created February 8, 2015 17:21
Gradle EAR and WAR plugins on single project
apply plugin: 'war'
apply plugin: 'ear'
dependencies {
deploy files(war)
}
project.extensions.create('foo', Foo)
foo {
project = ':project'
}
class Foo {
Project proj
void setProject(Project project) {