forked from opennars/opennars
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
103 lines (81 loc) · 3.18 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
plugins {
id 'java'
}
group 'org.example'
version '1.0-SNAPSHOT'
apply plugin: "java-library"
repositories {
mavenCentral()
mavenLocal()
maven { url "https://maven.aliyun.com/nexus/content/groups/public/" }
google()
gradlePluginPortal()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
maven { url "https://jitpack.io" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}
dependencies {
api "com.badlogicgames.gdx:gdx-backend-lwjgl3:1.11.0"
api "com.badlogicgames.gdx:gdx-platform:1.11.0:natives-desktop"
api "com.badlogicgames.gdx:gdx-freetype-platform:1.11.0:natives-desktop"
api 'com.badlogicgames.gdx-controllers:gdx-controllers-desktop:2.2.2'
api "de.tomgrill.gdxdialogs:gdx-dialogs-desktop:1.3.0"
api "io.github.spair:imgui-java-app:1.86.4"
api "com.badlogicgames.gdx:gdx:1.11.0"
api "com.badlogicgames.gdx:gdx-freetype:1.11.0"
api 'com.badlogicgames.gdx-controllers:gdx-controllers-core:2.2.2'
api "de.tomgrill.gdxdialogs:gdx-dialogs-core:1.3.0"
// https://mvnrepository.com/artifact/junit/junit
testImplementation 'junit:junit:4.13.2'
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
implementation 'org.apache.commons:commons-lang3:3.12.0'
// https://mvnrepository.com/artifact/com.google.guava/guava
implementation 'com.google.guava:guava:31.1-jre'
implementation "com.badlogicgames.gdx:gdx-bullet:1.11.0"
implementation "com.badlogicgames.gdx:gdx-bullet-platform:1.11.0:natives-desktop"
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
tasks.withType(JavaCompile) {
// options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
sourceCompatibility = 18
sourceSets.main.java.srcDirs = [ "src/main/java" ]
sourceSets.main.resources.srcDirs = ["./assets"]
project.ext.mainClassName = "com.poerlang.nars3dview.DesktopLauncher"
project.ext.assetsDir = new File("./assets")
import org.gradle.internal.os.OperatingSystem
task run(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
workingDir = project.assetsDir
ignoreExitValue = true
if (OperatingSystem.current() == OperatingSystem.MAC_OS) {
// Required to run on macOS
jvmArgs += "-XstartOnFirstThread"
}
}
task debug(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
workingDir = project.assetsDir
ignoreExitValue = true
debug = true
}
task dist(type: Jar) {
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
manifest {
attributes 'Main-Class': project.mainClassName
}
dependsOn configurations.runtimeClasspath
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
with jar
}
dist.dependsOn classes