-
Notifications
You must be signed in to change notification settings - Fork 21
/
build.gradle
56 lines (46 loc) · 1.3 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
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'idea'
defaultTasks 'deploy'
// Including Ant build from a separate Gradle file to avoid clashes with
// existing targets e.g. clean, etc. from java plugin
task importTasksRunInOrder(type: GradleBuild) { GradleBuild antBuild ->
antBuild.buildFile ='buildWithClean.gradle'
antBuild.tasks = ['jar']
}
version = '1.0-SNAPSHOT'
group = 'org.annares.lzo'
repositories {
mavenLocal()
}
task rename (type: Copy) {
from 'dist'
into project.libsDir
rename { String fileName ->
fileName.replaceAll('lzo', project.name + "-" + version)
}
rename '(lzo)(.jar)', '$2'
}
jar.onlyIf {"Ant build provided jar will be moved in place".length() == 0}
task deploy (dependsOn: [importTasksRunInOrder, rename, uploadArchives]) << {
println 'Buidling and deploying'
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: "http://archiva:8290/archiva/repository/snapshots/") {
// Make sure to have correctly configured user/password in
// ~/.m2/settings.xml to access the repository above
}
pom.project {
inceptionYear '2011'
licenses {
license {
name 'GNU GENERAL PUBLIC LICENSE Version 3'
distribution 'repo'
}
}
}
}
}
}