-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
60 lines (45 loc) · 1.34 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
plugins {
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
}
apply plugin: 'java'
repositories {
mavenCentral()
jcenter()
}
group = 'games.spooky.gdx'
version = '1.0.0'
ext {
gdxVersion = '1.8.0'
libName = 'gdx-gfx'
}
archivesBaseName = "$libName"
sourceCompatibility = 1.6
targetCompatibility = 1.6
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
testCompile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
testCompile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
}
// Demo
ext.demoClass = "games.spooky.gdx.gfx.demo.GdxGfxDemo"
task demo(dependsOn: classes, type: JavaExec) {
main = demoClass
classpath = sourceSets.test.runtimeClasspath
standardInput = System.in
ignoreExitValue = true
}
task demoJar(type: Jar) {
baseName = "${project.name}-demo"
from files(sourceSets.main.output.classesDirs)
from sourceSets.test.output
from {configurations.compile.collect {zipTree(it)}}
from {configurations.testCompile.collect {zipTree(it)}}
manifest {
attributes 'Main-Class': demoClass
}
}
apply from: "$rootDir/gradle/license.gradle"
license.includes(["**/*.java"])
apply from: "${rootDir}/gradle/publish-root.gradle"
apply from: "${rootDir}/gradle/publish-module.gradle"