forked from RobertBColton/DockFX
-
Notifications
You must be signed in to change notification settings - Fork 19
/
build.gradle
136 lines (98 loc) · 2.05 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
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/resources' }
}
test
{
java
{ srcDir 'src/test/java' }
resources
{ srcDir 'src/test/resources' }
}
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
test
{
testLogging.showStandardStreams = true
testLogging
{ events "passed", "skipped", "failed" }
exclude '**/demo/**'
exclude '**/run/**'
maxHeapSize = "4G"
}
dependencies
{
}
repositories
{
// Main repos:
mavenLocal()
mavenCentral()
jcenter()
}
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" }
}
}
}