Skip to content

Instantly share code, notes, and snippets.

@sleroy
Forked from devacto/build.gradle
Last active August 29, 2015 14:07
Show Gist options
  • Save sleroy/be3c1e95f99621897449 to your computer and use it in GitHub Desktop.
Save sleroy/be3c1e95f99621897449 to your computer and use it in GitHub Desktop.
apply plugin: 'java'
apply plugin: 'gradle-one-jar'
apply plugin: 'application'
// Use Java 8 by default
sourceCompatibility = 1.7
targetCompatibility = 1.7
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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment