|
@@ -1,16 +1,6 @@
|
1
|
|
-import org.eclipse.jgit.api.Git
|
2
|
|
-import org.eclipse.jgit.storage.file.FileRepositoryBuilder
|
3
|
|
-
|
4
|
|
-def gitdir = new File(projectDir, '.git')
|
5
|
|
-if (gitdir.isFile()) {
|
6
|
|
- gitdir = new File(projectDir, gitdir.text.replace('gitdir: ','').trim())
|
7
|
|
-}
|
8
|
|
-
|
9
|
|
-def repo = new FileRepositoryBuilder().setGitDir(gitdir).build()
|
10
|
|
-project.version = Git.wrap(repo).describe().call() + '-SNAPSHOT'
|
11
|
|
-
|
12
|
1
|
group = 'com.dmdirc'
|
13
|
2
|
|
|
3
|
+apply plugin: 'com.dmdirc.git-version'
|
14
|
4
|
apply plugin: 'maven-publish'
|
15
|
5
|
apply plugin: 'java'
|
16
|
6
|
apply plugin: 'findbugs'
|
|
@@ -86,13 +76,12 @@ apply from: 'fatjar.gradle'
|
86
|
76
|
buildscript {
|
87
|
77
|
repositories {
|
88
|
78
|
mavenCentral()
|
89
|
|
- maven {
|
90
|
|
- url 'http://artifactory.dmdirc.com/artifactory/repo'
|
91
|
|
- }
|
|
79
|
+ maven { url 'http://artifactory.dmdirc.com/artifactory/repo' }
|
|
80
|
+ maven { url 'https://dl.bintray.com/dmdirc/releases/' }
|
92
|
81
|
}
|
93
|
82
|
|
94
|
83
|
dependencies {
|
95
|
|
- classpath group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: '3.6.1.201501031845-r'
|
|
84
|
+ classpath group: 'com.dmdirc', name: 'git-version', version: '1.0'
|
96
|
85
|
}
|
97
|
86
|
}
|
98
|
87
|
|