Skip to content

Instantly share code, notes, and snippets.

@ncarroll
ncarroll / build.gradle
Created January 9, 2014 01:08
Gradle distribution DSL containing an exclude rule that uses a regex to filter out all but one properties file.
apply plugin: 'java'
apply plugin: 'distribution'
distributions {
main {
baseName = 'distribution'
contents {
exclude { override ->
override.file.path.matches('.*resources/config/overrides/.*properties\\b(?<!\\blocal.config.properties)')
}
@ncarroll
ncarroll / pom.xml
Created February 12, 2012 06:16
Maven configuration for deployment to Tomcat server
<project>
<build>
<plugins>
<plugin>
<groupid>org.codehaus.mojo</groupid>
<artifactid>tomcat-maven-plugin</artifactid>
<configuration>
<path>/app</path>
<url>http://hostname.com/manager</url>
<server>deployment.server</server>
@ncarroll
ncarroll / build.gradle
Created February 12, 2012 06:01
Gradle Android Plugin
buildscript {
repositories {
mavenRepo(urls: 'http://jvoegele.com/maven2/')
}
dependencies {
classpath 'com.jvoegele.gradle.plugins:android-plugin:0.8'
}
}
usePlugin com.jvoegele.gradle.plugins.android.AndroidPlugin