forked from YCSRobotics/GrizzlyTime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
61 lines (52 loc) · 1.85 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
/*
* Uncomment all lines regarding javafx for java 11 support!
*/
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'application'
id "org.openjfx.javafxplugin" version "0.0.10" apply false
}
group 'GrizzlyTime'
version '2.3.0'
mainClassName = "Main"
def javaVer = getVersion()
if (javaVer > 11) {
apply plugin: "org.openjfx.javafxplugin"
}
repositories {
mavenCentral()
}
dependencies {
//note that it seems the maven repository includes a version 11 of these plugins, should investigate if this is for jdk 11
implementation group: 'commons-io', name: 'commons-io', version: '2.6'
implementation group: 'com.google.oauth-client', name: 'google-oauth-client', version: '1.30.1'
implementation group: 'com.google.api-client', name: 'google-api-client', version: '1.30.2'
implementation group: 'com.google.oauth-client', name: 'google-oauth-client-java6', version: '1.30.1'
implementation group: 'com.google.oauth-client', name: 'google-oauth-client-jetty', version: '1.30.1'
implementation group: 'com.google.apis', name: 'google-api-services-sheets', version: 'v4-rev581-1.25.0'
implementation 'org.json:json:20180813'
if (javaVer == 11){
implementation "org.openjfx:javafx:11.0.1"
} else if (javaVer == 17) {
implementation "org.openjfx:javafx:18-ea+9"
}
}
if (javaVer >= 11) {
javafx {
modules = [ 'javafx.controls',
'javafx.media',
'javafx.swing']
}
}
/* https://stackoverflow.com/a/2591122/6755709 */
def getVersion() {
def version = System.getProperty("java.version");
if(version.startsWith("1.")) {
version = version.substring(2, 3);
} else {
def dot = version.indexOf(".");
if(dot != -1) { version = version.substring(0, dot); }
}
return Integer.parseInt(version)
}