|
1 | | -plugins { |
2 | | - id 'java' |
3 | | - id 'maven' |
4 | | - id 'eclipse' |
5 | | - id 'idea' |
6 | | - id 'jacoco' |
7 | | - id 'com.github.kt3k.coveralls' version '2.8.1' |
8 | | -} |
9 | | - |
10 | | -sourceCompatibility = JavaVersion.VERSION_1_7 |
11 | | -targetCompatibility = JavaVersion.VERSION_1_7 |
12 | | - |
13 | | -group = 'org.scm4j' |
14 | | -version = new File('version').text |
15 | | - |
16 | | -dependencies { |
17 | | - testCompile 'junit:junit:4.12' |
18 | | - testCompile 'org.mockito:mockito-core:2.0.62-beta' |
19 | | - testCompile 'nl.jqno.equalsverifier:equalsverifier:2.3' |
20 | | - |
21 | | - compile 'com.google.guava:guava:20.0' |
22 | | - compile 'org.apache.commons:commons-lang3:3.5' |
23 | | -} |
24 | | - |
25 | | -configurations.all { |
26 | | - resolutionStrategy { |
27 | | - cacheDynamicVersionsFor 0, 'seconds' |
28 | | - cacheChangingModulesFor 0, 'seconds' |
29 | | - } |
30 | | -} |
31 | | - |
32 | | -jar { |
33 | | - manifest.attributes ( |
34 | | - 'Specification-Title': project.name, |
35 | | - 'Specification-Version': version, |
36 | | - 'Implementation-Title': project.name, |
37 | | - 'Implementation-Version': "$version (${new Date().format('yyyy-MM-dd')})", |
38 | | - ) |
39 | | -} |
40 | | - |
41 | | -task sourcesJar(type: Jar, dependsOn: classes) { |
42 | | - classifier = 'sources' |
43 | | - from sourceSets.main.allSource |
44 | | -} |
45 | | - |
46 | | -repositories { |
47 | | - jcenter() |
48 | | -} |
49 | | - |
50 | | -jacocoTestReport { |
51 | | - reports { |
52 | | - xml.enabled = true // coveralls plugin depends on xml format report |
53 | | - html.enabled = true |
54 | | - } |
55 | | -} |
56 | | - |
57 | | -task javadocJar(type: Jar, dependsOn: javadoc) { |
58 | | - classifier = 'javadoc' |
59 | | - from javadoc.destinationDir |
60 | | -} |
61 | | - |
62 | | -artifacts { |
63 | | - archives sourcesJar |
64 | | - archives javadocJar |
65 | | -} |
| 1 | +plugins { |
| 2 | + id 'java' |
| 3 | + id 'maven' |
| 4 | + id 'eclipse' |
| 5 | + id 'idea' |
| 6 | + id 'jacoco' |
| 7 | + id 'com.github.kt3k.coveralls' version '2.8.1' |
| 8 | +} |
| 9 | + |
| 10 | +sourceCompatibility = JavaVersion.VERSION_1_8 |
| 11 | +targetCompatibility = JavaVersion.VERSION_1_8 |
| 12 | + |
| 13 | +group = 'org.scm4j' |
| 14 | +version = file('version').text.trim() |
| 15 | + |
| 16 | +dependencies { |
| 17 | + testCompile 'junit:junit:4.12' |
| 18 | + testCompile 'org.mockito:mockito-core:2.0.62-beta' |
| 19 | + testCompile 'nl.jqno.equalsverifier:equalsverifier:2.3' |
| 20 | + |
| 21 | + compile 'com.google.guava:guava:20.0' |
| 22 | + compile 'org.apache.commons:commons-lang3:3.5' |
| 23 | +} |
| 24 | + |
| 25 | +configurations.all { |
| 26 | + resolutionStrategy { |
| 27 | + cacheDynamicVersionsFor 0, 'seconds' |
| 28 | + cacheChangingModulesFor 0, 'seconds' |
| 29 | + } |
| 30 | +} |
| 31 | + |
| 32 | +jar { |
| 33 | + manifest.attributes ( |
| 34 | + 'Specification-Title': project.name, |
| 35 | + 'Specification-Version': version, |
| 36 | + 'Implementation-Title': project.name, |
| 37 | + 'Implementation-Version': "$version (${new Date().format('yyyy-MM-dd')})", |
| 38 | + ) |
| 39 | +} |
| 40 | + |
| 41 | +task sourcesJar(type: Jar, dependsOn: classes) { |
| 42 | + classifier = 'sources' |
| 43 | + from sourceSets.main.allSource |
| 44 | +} |
| 45 | + |
| 46 | +repositories { |
| 47 | + jcenter() |
| 48 | +} |
| 49 | + |
| 50 | +jacocoTestReport { |
| 51 | + reports { |
| 52 | + xml.enabled = true // coveralls plugin depends on xml format report |
| 53 | + html.enabled = true |
| 54 | + } |
| 55 | +} |
| 56 | + |
| 57 | +task javadocJar(type: Jar, dependsOn: javadoc) { |
| 58 | + classifier = 'javadoc' |
| 59 | + from javadoc.destinationDir |
| 60 | +} |
| 61 | + |
| 62 | +artifacts { |
| 63 | + archives sourcesJar |
| 64 | + archives javadocJar |
| 65 | +} |
0 commit comments