forked from openrndr/openrndr-gradle-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
80 lines (67 loc) · 2.3 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
group 'org.openrndr.template'
version '1.0-SNAPSHOT'
buildscript {
ext.kotlin_version = '1.3.0'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'application'
sourceCompatibility = 1.8
project.ext.openrndrVersion = "0.3.29"
repositories {
mavenCentral()
maven {
url="https://dl.bintray.com/openrndr/openrndr/"
}
maven { url 'https://jitpack.io' }
}
switch (org.gradle.internal.os.OperatingSystem.current()) {
case org.gradle.internal.os.OperatingSystem.WINDOWS:
project.ext.openrndrOS = "windows"
break
case org.gradle.internal.os.OperatingSystem.LINUX:
project.ext.openrndrOS = "linux-x64"
break
case org.gradle.internal.os.OperatingSystem.MAC_OS:
project.ext.openrndrOS = "macos"
break
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
testCompile group: 'junit', name: 'junit', version: '4.12'
runtime "org.openrndr:openrndr-gl3:$openrndrVersion"
runtime "org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion"
compile "org.openrndr:openrndr-core:$openrndrVersion"
compile "org.openrndr:openrndr-svg:$openrndrVersion"
compile "org.openrndr:openrndr-animatable:$openrndrVersion"
compile "org.openrndr:openrndr-extensions:$openrndrVersion"
compile "org.openrndr:openrndr-filter:$openrndrVersion"
compile "org.openrndr:openrndr-ffmpeg:$openrndrVersion"
// replace the following with functional slf4j library when using slf4j
compile 'org.slf4j:slf4j-nop:1.7.25'
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
mainClassName = "TemplateProgramKt"
if (!System.properties['os.name'].toLowerCase().contains('windows')) {
applicationDefaultJvmArgs = ["-XstartOnFirstThread"]
}
ext.mainClassName = mainClassName
jar {
manifest {
attributes 'Main-Class': mainClassName
}
doFirst {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
from { configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) } }
}
exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA', '**/module-info*'
archiveName 'myjar.jar'
}