-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
119 lines (90 loc) · 3.56 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath (group: 'eu.mihosoft.vrl', name: 'vrl', version: '0.4.3.2.3')
}
}
plugins {
// id 'com.github.hierynomus.license' version '0.13.1'
id 'maven-publish'
id 'net.nemerosa.versioning' version '2.6.1'
id 'com.jfrog.bintray' version '1.7.2'
id 'com.github.ben-manes.versions' version '0.13.0'
}
ext.VRL_VERSION = '0.4.3.2.3'
apply plugin: 'java'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
task wrapper(type: Wrapper) {
gradleVersion = '4.6'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.10'
compile (group: 'eu.mihosoft.vrl', name: 'vrl', version: VRL_VERSION)
compile (group: 'eu.mihosoft.vrl', name: 'vrl', version: VRL_VERSION, classifier: 'sources')
compile (group: 'eu.mihosoft.vrl', name: 'vrl', version: VRL_VERSION, classifier: 'javadoc')
compile group: 'eu.mihosoft.vrl.jcsg', name:'jcsg', version: '0.5.7'
compile group: 'eu.mihosoft.vrl.jcsg', name:'jcsg', version: '0.5.7', classifier: 'sources'
compile group: 'eu.mihosoft.vrl.jcsg', name:'jcsg', version: '0.5.7', classifier: 'javadoc'
compile group: 'eu.mihosoft.jcsg.ext.path', name:'jcsg-pathextensions', version: '0.2.5'
compile group: 'eu.mihosoft.jcsg.ext.path', name:'jcsg-pathextensions', version: '0.2.5', classifier: 'sources'
compile group: 'eu.mihosoft.jcsg.ext.path', name:'jcsg-pathextensions', version: '0.2.5', classifier: 'javadoc'
compile group: 'eu.mihosoft.jcsg.ext.mesh', name:'jcsg-meshextensions', version: '0.5.1'
compile group: 'eu.mihosoft.jcsg.ext.mesh', name:'jcsg-meshextensions', version: '0.5.1', classifier: 'sources'
compile group: 'eu.mihosoft.jcsg.ext.mesh', name:'jcsg-meshextensions', version: '0.5.1', classifier: 'javadoc'
compile group: 'eu.mihosoft.vrl.vrljogl', name: 'vrl-jogl', version: '0.4.1'
// compile files("lib/jars/")
}
apply from: 'gradle/publishing.gradle'
def loadProperties(String sourceFileName) {
def config = new Properties()
def propFile = new File(projectDir,sourceFileName)
if (propFile.isFile()) {
config.load(new FileInputStream(propFile))
for (Map.Entry property in config) {
ext.set(property.key, property.value)
}
}
}
jar {
// project class files compiled from source
from files(sourceSets.main.output.classesDirs)
}
// loads the property file
loadProperties('build.properties')
String getVRLDir() {
String result;
if (vrldir.isEmpty()) {
result = System.getProperty("user.home");
result+= "/.vrl/"
result+= eu.mihosoft.vrl.system.Constants.VERSION_MAJOR
result+= "/default"
} else {
result = vrldir;
}
return result
}
// compiles and installs the vrl plugin to the specified folder
task installVRLPlugin(dependsOn: [clean, publicationVRLPluginJar]) {
doLast {
println(">> copying vrl plugin to: " + getVRLDir() + "/plugin-updates")
copy {
from buildDir.getPath() + "/libs/" + rootProject.name + ".vrlplugin"
into getVRLDir() + "/plugin-updates/"
include rootProject.name + ".vrlplugin"
rename (rootProject.name + ".vrlplugin", rootProject.name + ".jar")
}
}
}