-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
149 lines (112 loc) · 3.13 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
plugins {
id "com.jfrog.bintray" version "1.8.3"
id "com.diffplug.gradle.spotless" version "3.1.0"
id "de.undercouch.download" version "3.4.3"
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'maven-publish'
project.ext.masterfile = (new File(projectDir,'/gradle/master.gradle')).getAbsolutePath()
// Attempts to download master gradle file
if(!hasProperty('do_not_update_master_file'))
try {
download {
src 'https://github.com/ClearControl/master/blob/master/master.gradle?raw=true'
dest project.ext.masterfile
overwrite true
onlyIfModified true
tempAndMove true
}
}
catch (Throwable e)
{
}
apply from: project.ext.masterfile
//***********************************************************************************
// JAVA CODE BUILDING
sourceSets
{
main
{
java
{ srcDir 'src/main/java' }
resources
{ srcDir 'src/main/java' }
}
test
{
java
{ srcDir 'src/test/java' }
resources
{ srcDir 'src/test/java' }
}
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
test
{
testLogging.showStandardStreams = true
testLogging
{ events "passed", "skipped", "failed" }
exclude '**/demo/**'
exclude '**/run/**'
maxHeapSize = "4G"
}
dependencies
{
compile group: 'org.controlsfx', name: 'controlsfx', version: '8.40.11'
compile group: 'commons-collections', name: 'commons-collections', version: '3.2.1'
compile group: 'commons-lang', name: 'commons-lang', version: '2.6'
compile group: 'commons-io', name: 'commons-io', version: '2.4'
compile group: 'org.apache.commons', name: 'commons-math3', version: '3.4.1'
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.1'
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.1'
compile 'net.sf.trove4j:trove4j:3.0.3'
compile 'com.nativelibs4java:bridj:0.7.0'
compile ('net.clearcontrol:dockfx:'+depver('dockfx')) {changing=true; transitive=true}
compile group: 'junit', name: 'junit', version: '4.11'
testCompile group: 'junit', name: 'junit', version: '4.11'
}
repositories
{
// Main repos:
mavenLocal()
mavenCentral()
jcenter()
maven { url "http://oss.sonatype.org/content/groups/public" }
maven { url "http://dl.bintray.com/clearcontrol/ClearControl" }
}
task sourcesJar(type: Jar, dependsOn:classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn:javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
//***********************************************************************************
// PUBLISHING
group = project.ext.groupname
version = project.ext.versionsMap[project.name]
artifacts
{
archives sourcesJar
archives javadocJar
}
publishing {
publications {
maven(MavenPublication) {
from components.java
artifact sourcesJar { classifier "sources" }
}
}
}