|
@@ -1,13 +1,11 @@
|
1
|
|
-import org.mdonoughe.JGitDescribeTask
|
2
|
|
-
|
3
|
|
-def jgit = new org.mdonoughe.JGitDescribeTask()
|
4
|
|
-jgit.setDir(new File("$projectDir", '.git'))
|
5
|
|
-project.version = jgit.getDescription() + '-SNAPSHOT'
|
|
1
|
+group = 'com.dmdirc'
|
6
|
2
|
|
|
3
|
+apply plugin: 'com.dmdirc.git-version'
|
7
|
4
|
apply plugin: 'java'
|
8
|
5
|
apply plugin: 'maven-publish'
|
|
6
|
+apply plugin: 'jacoco'
|
|
7
|
+apply plugin: 'com.github.kt3k.coveralls'
|
9
|
8
|
|
10
|
|
-group = 'com.dmdirc'
|
11
|
9
|
|
12
|
10
|
sourceSets {
|
13
|
11
|
main {
|
|
@@ -56,34 +54,26 @@ task wrapper(type: Wrapper) {
|
56
|
54
|
gradleVersion = '2.2.1'
|
57
|
55
|
}
|
58
|
56
|
|
59
|
|
-task getCredentials << {
|
60
|
|
- def target = file('nexus-teamcity.gradle')
|
61
|
|
- if (!target.exists()) {
|
62
|
|
- new URL('http://www.dmdirc.com/private/nexus-teamcity.gradle').withInputStream{
|
63
|
|
- i -> target.withOutputStream { it << i }
|
64
|
|
- }
|
65
|
|
- }
|
66
|
|
-
|
67
|
|
- apply from: 'nexus-teamcity.gradle'
|
68
|
|
- project.publishing.repositories[0].credentials {
|
69
|
|
- username "$nexusUser"
|
70
|
|
- password "$nexusPass"
|
71
|
|
- }
|
72
|
|
-}
|
73
|
|
-
|
74
|
|
-task publishSnapshot(dependsOn: ['getCredentials', 'publishMavenJavaPublicationToSnapshotsRepository']) << {
|
|
57
|
+task publishSnapshot(dependsOn: 'publishMavenJavaPublicationToSnapshotsRepository') << {
|
75
|
58
|
}
|
76
|
59
|
|
77
|
60
|
buildscript {
|
78
|
61
|
repositories {
|
79
|
62
|
mavenCentral()
|
80
|
|
- maven {
|
81
|
|
- url 'http://artifactory.dmdirc.com/artifactory/repo'
|
82
|
|
- }
|
|
63
|
+ maven { url 'http://artifactory.dmdirc.com/artifactory/repo' }
|
|
64
|
+ maven { url 'https://dl.bintray.com/dmdirc/releases/' }
|
83
|
65
|
}
|
84
|
66
|
|
85
|
67
|
dependencies {
|
86
|
|
- classpath group: 'com.github.shanemcc', name: 'jgit-describe', version: '0.5'
|
87
|
|
- classpath group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: '2.3.1.+'
|
|
68
|
+ classpath group: 'com.dmdirc', name: 'git-version', version: '1.0'
|
|
69
|
+ classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.1.0'
|
88
|
70
|
}
|
89
|
71
|
}
|
|
72
|
+
|
|
73
|
+jacocoTestReport {
|
|
74
|
+ reports {
|
|
75
|
+ xml.enabled = true // coveralls plugin depends on xml format report
|
|
76
|
+ html.enabled = true
|
|
77
|
+ }
|
|
78
|
+}
|
|
79
|
+
|