forked from Renanse/Ardor3D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
65 lines (57 loc) · 2 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
import org.gradle.internal.os.OperatingSystem
allprojects {
apply plugin: 'java-library'
group = 'com.ardor3d'
version = '1.6.1'
project.ext.lwjglVersion = "3.2.3"
switch ( OperatingSystem.current() ) {
case OperatingSystem.WINDOWS:
project.ext.lwjglNatives = "natives-windows"
break
case OperatingSystem.LINUX:
project.ext.lwjglNatives = "natives-linux"
break
case OperatingSystem.MAC_OS:
project.ext.lwjglNatives = "natives-macos"
break
}
}
subprojects {
apply plugin: 'java-library'
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
task packageSources(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts.archives packageSources
repositories {
mavenCentral()
maven { url "https://repo.maven.apache.org/maven2" }
}
configurations.all {
resolutionStrategy {
dependencySubstitution {
// The maven property ${osgi.platform} is not handled by Gradle
// so we replace the dependency, using the osgi platform from the project settings
def os = System.getProperty("os.name").toLowerCase()
if (os.contains("windows")) {
substitute module('org.eclipse.platform:org.eclipse.swt.${osgi.platform}') with module("org.eclipse.platform:org.eclipse.swt.win32.win32.x86_64:3.108.0")
}
else if (os.contains("linux")) {
substitute module('org.eclipse.platform:org.eclipse.swt.${osgi.platform}') with module("org.eclipse.platform:org.eclipse.swt.gtk.linux.x86_64:3.108.0")
}
else if (os.contains("mac")) {
substitute module('org.eclipse.platform:org.eclipse.swt.${osgi.platform}') with module("org.eclipse.platform:org.eclipse.swt.cocoa.macosx.x86_64:3.108.0")
}
}
}
}
dependencies {
testImplementation group: 'junit', name: 'junit', version:'4.13.2'
testImplementation group: 'org.easymock', name: 'easymock', version: '4.3'
}
}