Browse Source

Tidy up build file after submodule removal.

- Remove allprojects block, as there's now only 1 project.
- Reduce cache time for dynamic artifacts in line with plugins.
pull/7/head
Chris Smith 9 years ago
parent
commit
ac4ed3fc91
1 changed files with 50 additions and 50 deletions
  1. 50
    50
      build.gradle

+ 50
- 50
build.gradle View File

2
 jgit.dir = new File(projectDir, '.git')
2
 jgit.dir = new File(projectDir, '.git')
3
 project.version = jgit.getDescription() + '-SNAPSHOT'
3
 project.version = jgit.getDescription() + '-SNAPSHOT'
4
 
4
 
5
-apply plugin: 'maven-publish'
6
-
7
 group = 'com.dmdirc'
5
 group = 'com.dmdirc'
8
 
6
 
7
+apply plugin: 'maven-publish'
8
+apply plugin: 'java'
9
+apply plugin: 'findbugs'
10
+apply plugin: 'pmd'
11
+
9
 configurations {
12
 configurations {
10
     bundle
13
     bundle
11
     plugin
14
     plugin
14
     }
17
     }
15
 }
18
 }
16
 
19
 
20
+configurations.all {
21
+    resolutionStrategy.cacheDynamicVersionsFor 2, 'minutes'
22
+    resolutionStrategy.cacheChangingModulesFor 2, 'minutes'
23
+}
24
+
17
 dependencies {
25
 dependencies {
18
     compile group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.0'
26
     compile group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.0'
19
     compile group: 'com.squareup.dagger', name: 'dagger-compiler', version: '1.2.1'
27
     compile group: 'com.squareup.dagger', name: 'dagger-compiler', version: '1.2.1'
31
     plugin group: 'com.dmdirc', name: 'parser_irc', version: '+', changing: true
39
     plugin group: 'com.dmdirc', name: 'parser_irc', version: '+', changing: true
32
     plugin group: 'com.dmdirc', name: 'tabcompleter_bash', version: '+', changing: true
40
     plugin group: 'com.dmdirc', name: 'tabcompleter_bash', version: '+', changing: true
33
     plugin group: 'com.dmdirc', name: 'tabcompleter_mirc', version: '+', changing: true
41
     plugin group: 'com.dmdirc', name: 'tabcompleter_mirc', version: '+', changing: true
42
+
43
+    testCompile group: 'junit', name: 'junit', version: '4.11'
44
+    testCompile group: 'org.mockito', name: 'mockito-all', version: '1.9.5'
45
+    testCompile group: 'com.google.jimfs', name: 'jimfs', version: '1.0'
34
 }
46
 }
35
 
47
 
36
 publishing {
48
 publishing {
50
     }
62
     }
51
 }
63
 }
52
 
64
 
53
-allprojects {
54
-    apply plugin: 'java'
55
-    apply plugin: 'findbugs'
56
-    apply plugin: 'pmd'
57
-
58
-    sourceSets {
59
-        main {
60
-            java {
61
-                srcDir 'src'
62
-            }
63
-            resources {
64
-                srcDir 'res'
65
-            }
65
+sourceSets {
66
+    main {
67
+        java {
68
+            srcDir 'src'
66
         }
69
         }
67
-        test {
68
-            java {
69
-                 srcDir 'test'
70
-            }
71
-            resources {
72
-                srcDir 'test-res'
73
-            }
70
+        resources {
71
+            srcDir 'res'
74
         }
72
         }
75
     }
73
     }
76
-
77
-    sourceCompatibility = 1.7
78
-    targetCompatibility = 1.7
79
-
80
-    repositories {
81
-        mavenCentral()
82
-        maven {
83
-            url 'http://nexus.dmdirc.com/nexus/content/repositories/thirdparty/'
74
+    test {
75
+        java {
76
+             srcDir 'test'
84
         }
77
         }
85
-        maven {
86
-            url 'http://nexus.dmdirc.com/nexus/content/repositories/snapshots/'
78
+        resources {
79
+            srcDir 'test-res'
87
         }
80
         }
88
     }
81
     }
82
+}
89
 
83
 
90
-    dependencies {
91
-        testCompile group: 'junit', name: 'junit', version: '4.11'
92
-        testCompile group: 'org.mockito', name: 'mockito-all', version: '1.9.5'
93
-        testCompile group: 'com.google.jimfs', name: 'jimfs', version: '1.0'
94
-    }
84
+sourceCompatibility = 1.7
85
+targetCompatibility = 1.7
95
 
86
 
96
-    pmd {
97
-        ruleSets = []
98
-        ruleSetFiles = files("$rootDir/etc/pmd/full.xml")
87
+repositories {
88
+    mavenCentral()
89
+    maven {
90
+        url 'http://nexus.dmdirc.com/nexus/content/repositories/thirdparty/'
99
     }
91
     }
100
-
101
-    tasks.withType(FindBugs) {
102
-        reports {
103
-            html.enabled = true
104
-            xml.enabled = false
105
-        }
92
+    maven {
93
+        url 'http://nexus.dmdirc.com/nexus/content/repositories/snapshots/'
106
     }
94
     }
95
+}
96
+
97
+pmd {
98
+    ruleSets = []
99
+    ruleSetFiles = files("$rootDir/etc/pmd/full.xml")
100
+}
107
 
101
 
108
-    findbugs {
109
-        reportLevel = 'low'
110
-        effort = 'max'
111
-        ignoreFailures = true
102
+tasks.withType(FindBugs) {
103
+    reports {
104
+        html.enabled = true
105
+        xml.enabled = false
112
     }
106
     }
113
 }
107
 }
114
 
108
 
109
+findbugs {
110
+    reportLevel = 'low'
111
+    effort = 'max'
112
+    ignoreFailures = true
113
+}
114
+
115
 task getCredentials << {
115
 task getCredentials << {
116
     def target = file('nexus-teamcity.gradle')
116
     def target = file('nexus-teamcity.gradle')
117
     if (!target.exists()) {
117
     if (!target.exists()) {

Loading…
Cancel
Save