-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
206 lines (158 loc) · 4.82 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
plugins { id "com.jfrog.bintray" version "1.2" }
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'maven-publish'
//***********************************************************************************
// JAVA CODE BUILDING
sourceSets
{
main
{
java
{ srcDir 'src' }
resources
{ srcDir 'src' }
}
test
{
java
{ srcDir 'src' }
resources
{ srcDir 'src' }
}
}
sourceCompatibility = 1.7
test
{
testLogging.showStandardStreams = true
testLogging
{ events "passed", "skipped", "failed" }
exclude '**/demo/**'
exclude '**/run/**'
maxHeapSize = "4G"
}
dependencies
{
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 group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'junit', name: 'junit', version: '4.12'
compile group: "net.coremem", name: "CoreMem", version: "(,1.0.0]", changing: true, transitive:true
compile group: "de.jcuda", name: "jcuda-maven", version: "7.5", transitive: true
}
repositories
{
mavenCentral()
maven
{ url "http://oss.sonatype.org/content/groups/public" }
maven
{ url "http://dl.bintray.com/clearvolume/ClearVolume" }
maven
{ url "http://dl.bintray.com/rtlib/CoreMem" }
}
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')
}
}
}
//***********************************************************************************
// BINTRAY PUBLISHING
/*
* Gets the version name from the latest Git tag
*/
def getVersionName = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags'
standardOutput = stdout
}
return stdout.toString().trim()
}
group = 'net.clearvolume'
version = getVersionName()
artifacts
{
archives sourcesJar
archives javadocJar
}
publishing {
publications {
maven(MavenPublication) {
from components.java
artifact sourcesJar { classifier "sources" }
}
}
}
if(hasProperty('bintray_user') && hasProperty('bintray_key') )
{
bintray {
// property must be set in ~/.gradle/gradle.properties
user = bintray_user
key = bintray_key
configurations = [
'default'] //When uploading configuration files
// - OR -
//publications = ['mavenStuff'] //When uploading Maven-based publication files
// - AND/OR -
/*filesSpec { //When uploading any arbitrary files ('filesSpec' is a standard Gradle CopySpec)
from 'arbitrary-files'
into 'standalone_files/level1'
rename '(.+)\\.(.+)', '$1-suffix.$2'
}/**/
dryRun = false //Whether to run this as dry-run, without deploying
publish = true //If version should be auto published after an upload
pkg {
repo = 'ClearVolume'
userOrg = 'clearvolume' //An optional organization name when the repo belongs to one of the user's orgs
name = 'ClearCUDA'
desc = 'ClearCUDA'
websiteUrl = 'https://clearvolume.github.io/ClearVolume/'
issueTrackerUrl = 'https://github.com/ClearVolume/ClearCUDA/issues'
vcsUrl = 'https://github.com/ClearVolume/ClearCUDA.git'
licenses = ['Apache-2.0']
labels = [
'ClearCUDA',
'GPU',
'3D',
'Real-time'
]
publicDownloadNumbers = true
//attributes= ['a': ['ay1', 'ay2'], 'b': ['bee'], c: 'cee'] //Optional package-level attributes
//Optional version descriptor
version {
name = project.version //Bintray logical version name
desc = '.'
released = new java.util.Date()
vcsTag = project.version
/*attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin'] //Optional version-level attributes
gpg {
sign = false //Determines whether to GPG sign the files. The default is false
passphrase = 'passphrase' //Optional. The passphrase for GPG signing'
}
mavenCentralSync {
sync = false //Optional (true by default). Determines whether to sync the version to Maven Central.
user = 'userToken' //OSS user token
password = 'paasword' //OSS user password
close = '1' //Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by puting 0 as value) and release the version manually.
} /**/
}
}
/**/
}
}