Created
July 1, 2014 07:35
-
-
Save devacto/65e883156e24729da374 to your computer and use it in GitHub Desktop.
Example Gradle build file for use with Dropwizard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'java' | |
apply plugin: 'gradle-one-jar' | |
apply plugin: 'application' | |
// Use Java 8 by default | |
sourceCompatibility = 1.8 | |
targetCompatibility = 1.8 | |
version = '1.0' | |
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' | |
// The main class of the application | |
mainClassName = 'au.com.ioof.retailinsurance.aiaconsumerservice.AIAConsumerServiceApplication' | |
// Add Gradle OneJarPlugin, see https:github.com/rholder/gradle-one-jar | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.github.rholder:gradle-one-jar:1.0.3' | |
} | |
} | |
// Set our project variables | |
project.ext { | |
dropwizardVersion = '0.7.0' | |
} | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile ( | |
'io.dropwizard:dropwizard-core:' + dropwizardVersion, | |
'io.dropwizard:dropwizard-hibernate:' + dropwizardVersion, | |
'io.dropwizard:dropwizard-migrations:' + dropwizardVersion, | |
'io.dropwizard:dropwizard-auth:' + dropwizardVersion, | |
'com.h2database:h2:1.3.168' | |
) | |
testCompile group: 'junit', name: 'junit', version: '4.11' | |
} | |
// Configure the oneJar task | |
task oneJar(type: OneJar) { | |
mainClass = mainClassName | |
} | |
// Configure the run task to start the Dropwizard service | |
run { | |
args 'server', 'example.yml' | |
} | |
task wrapper(type: Wrapper) { | |
gradleVersion = '1.4' | |
} | |
artifacts { | |
oneJar |
Looks like the only thing truncated is a closing brace "}"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice! It seems to be truncated, however.