forked from agateau/pixelwheels
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
40 lines (33 loc) · 1.56 KB
/
Copy pathbuild.gradle
File metadata and controls
40 lines (33 loc) · 1.56 KB
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
apply plugin: "java"
dependencies {
implementation project(":core")
implementation "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
implementation "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
implementation "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
implementation "com.badlogicgames.gdx-controllers:gdx-controllers-core:$gdxControllersVersion"
implementation "com.badlogicgames.gdx-controllers:gdx-controllers-desktop:$gdxControllersVersion"
}
sourceCompatibility = JavaVersion.VERSION_1_8
sourceSets.main.java.srcDirs = [ "src/" ]
project.ext.mainClassName = "com.agateau.pixelwheels.desktop.DesktopLauncher"
project.ext.assetsDir = new File("../android/assets")
task run(dependsOn: classes, type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
workingDir = project.assetsDir
ignoreExitValue = true
}
task dist(type: Jar) {
from files(sourceSets.main.output.classesDirs)
from files(sourceSets.main.output.resourcesDir)
from {configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) }}
from files(project.assetsDir)
manifest {
attributes 'Main-Class': project.mainClassName
}
// Required to fix this error after updating to Gradle 7.3.3:
// Entry META-INF/INDEX.LIST is a duplicate but no duplicate handling strategy has been set.
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
dist.dependsOn classes