Skip to content

Instantly share code, notes, and snippets.

@davidB
Last active March 19, 2018 09:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidB/4c520c9dc1b3fddcf0ec to your computer and use it in GitHub Desktop.
Save davidB/4c520c9dc1b3fddcf0ec to your computer and use it in GitHub Desktop.
a set of gradle snippet that are used via "apply from: 'http://....' "
task copyDeps {
description 'copy runtime + testRuntime dependencies into lib/ dir to allow other tools (jme3-SDK, eclipse apt-processor) to use libs'
copy {
from configurations.runtime
into 'lib/main'
}
copy {
from (configurations.testRuntime - configurations.runtime)
into 'lib/test'
}
}
buildscript {
repositories {
mavenLocal()
jcenter()
}
dependencies {
classpath "net.alchim31.gradle:gradle-getdown-plugin:0.4.1"
}
}
apply plugin: 'net.alchim31.getdown'
getdown {
urlbase = "http://alchim31.net/download/${project.name}"
checklatest = false
mainClassName = project.mainClassName
jvmArgs = project.applicationDefaultJvmArgs
tmplGetdownTxt = tmplGetdownTxt + "\nallow_offline = true"
}
println "configuring $project"
task hello << {
println 'hello from other script'
}
//buildscript {
// repositories {
// jcenter()
// }
// dependencies {
// classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:1.12.+'
// }
//}
apply plugin: 'java'
apply plugin: 'provided-base'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
repositories {
mavenLocal()
jcenter()
maven { url "http://updates.jmonkeyengine.org/maven/"}
maven { url "http://dl.bintray.com/jmonkeyengine/contrib" }
}
sourceSets {
main {
resources {
srcDirs = ["$projectDir/src/main/resources", "$projectDir/src/main/assets", "$projectDir/assets"]
exclude "**/*.blend*"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment