Created
January 8, 2014 16:04
-
-
Save warmwaffles/8319144 to your computer and use it in GitHub Desktop.
This file contains 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
// ############################################################################# | |
// Configurations | |
// ############################################################################# | |
group = 'com.someapp' | |
version = '1.0.0' | |
mainClassName = "${group}.Launcher" | |
description = "Some description" | |
buildDir = 'build/' | |
// ############################################################################# | |
// ############################################################################# | |
buildscript { | |
repositories { | |
maven { | |
name 'Gradle Shadow' | |
url 'http://dl.bintray.com/content/johnrengelman/gradle-plugins' | |
} | |
} | |
dependencies { | |
classpath 'org.gradle.plugins:shadow:0.7.4' | |
} | |
} | |
apply plugin: 'java' | |
apply plugin: 'application' | |
apply plugin: 'eclipse' | |
apply plugin: 'idea' | |
apply plugin: 'shadow' | |
apply plugin: 'jacoco' | |
repositories { | |
mavenCentral() | |
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } | |
mavenLocal(); | |
} | |
dependencies { | |
compile group: "com.badlogicgames.gdx", name: "gdx", version: "1.0-SNAPSHOT" | |
compile group: "com.badlogicgames.gdx", name: "gdx-backend-lwjgl", version: "1.0-SNAPSHOT" | |
compile group: "com.badlogicgames.gdx", name: "gdx-platform", version: "1.0-SNAPSHOT", classifier: "natives-desktop" | |
compile group: 'com.google.guava', name: 'guava', version: '12.+' | |
testCompile group: 'junit', name: 'junit', version: '4.+' | |
testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.+' | |
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.+' | |
} | |
sourceCompatibility = 1.7 | |
targetCompatibility = 1.7 | |
sourceSets { | |
main { | |
runtimeClasspath = files(output.resourcesDir) + runtimeClasspath | |
} | |
test { | |
runtimeClasspath = files(output.resourcesDir) + runtimeClasspath | |
} | |
} | |
jar { | |
manifest { | |
attributes 'Main-Class': mainClassName | |
attributes 'Sealed': true | |
} | |
} | |
jacocoTestReport { | |
group 'reporting' | |
description 'Runs Jacoco reporting tools.' | |
reports { | |
xml.enabled false | |
csv.enabled false | |
html.enabled true | |
} | |
} | |
shadow { | |
exclude 'META-INF/*.DSA' | |
exclude 'META-INF/*.RSA' | |
} | |
test { | |
ext.useDefaultListeners = true | |
ext.workingDirectory = buildDir | |
reports.html.enabled = true | |
} | |
run { | |
ignoreExitValue = true | |
} | |
// Aliased task | |
task('report', dependsOn: [jacocoTestReport]) { | |
group 'reporting' | |
description 'Runs all of the reporting tasks' | |
} | |
idea { | |
module { | |
downloadSources = true | |
downloadJavadoc = true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment