forked from enasequence/cramtools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
166 lines (139 loc) · 4.57 KB
/
build.gradle
File metadata and controls
166 lines (139 loc) · 4.57 KB
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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3"
}
}
apply plugin: 'io.codearte.nexus-staging'
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'signing'
group = 'uk.ac.ebi.ena'
archivesBaseName = 'cramtools'
version='3.0.g202'
mainClassName = 'net.sf.cram.CramTools'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile 'com.github.samtools:htsjdk:2.4.1'
compile 'org.apache.ant:ant:1.8.2'
compile 'org.apache.commons:commons-compress:1.9'
compile 'org.tukaani:xz:1.5'
compile 'com.h2database:h2:1.3.170'
compile 'com.beust:jcommander:1.48'
compile files('lib/CipherOnly.jar')
testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-core:1.1'
}
task wrapper(type: Wrapper) { gradleVersion = '2.12' }
javadoc {
classpath = configurations.compile
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
task sourceJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives jar
archives javadocJar
archives sourceJar
}
signing {
// from sourceSets.main.allSource
sign configurations.archives
}
install {
configuration = configurations.runtime
}
jar {
from(zipTree("lib/CipherOnly.jar"))
manifest {
attributes (
'Main-Class': mainClassName,
"Implementation-Title": archivesBaseName,
"Implementation-Vendor": "ENA, EMBL-EBI",
"Implementation-Version": version,
'Built-By': System.getProperty('user.name'),
'Built-Date': new Date(),
'Built-JDK': System.getProperty('java.version'))
if (project.hasProperty('BUILD_ID')) attributes.put('Build-ID', project.BUILD_ID)
if (project.hasProperty('BUILD_NUMBER')) attributes.put('Build-Number', project.BUILD_NUMBER)
}
}
task uberjar(type: Jar) {
from configurations.runtime.asFileTree.files.collect { zipTree(it) }
from files(sourceSets.main.output.classesDir)
from files(sourceSets.main.output.resourcesDir)
manifest {
attributes (
'Main-Class': mainClassName,
"Implementation-Title": archivesBaseName,
"Implementation-Vendor": "ENA, EMBL-EBI",
"Implementation-Version": version,
'Built-By': System.getProperty('user.name'),
'Built-Date': new Date(),
'Built-JDK': System.getProperty('java.version'))
if (project.hasProperty('BUILD_ID')) attributes.put('Build-ID', project.BUILD_ID)
if (project.hasProperty('BUILD_NUMBER')) attributes.put('Build-Number', project.BUILD_NUMBER)
}
}
uberjar.dependsOn jar
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'cramtools'
packaging 'jar'
// optionally artifactId can be defined here
description 'A java implementation of CRAM file format and a set of accompanying tools.'
url 'http://www.ebi.ac.uk/ena/software/cram-toolkit'
scm {
url 'https://github.com/enasequence/cramtools'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'vadim'
name 'Vadim Zalunin'
email 'vadim@ebi.ac.uk'
}
}
}
}
}
}
nexusStaging {
packageGroup = "uk.ac.ebi.ena"
}
test {
maxHeapSize = "1024m"
jvmArgs "-Dfile.encoding=UTF-8"
testLogging {
events "failed", "standardOut", "standardError"
}
}