Browse Source

Tidy up/correct build script a bit.

Fix incorrect plugin names.

Move task configuration into the task, rather than referencing it
oddly afterwards.
pull/162/head
Chris Smith 9 years ago
parent
commit
71a39a5bb3
1 changed files with 12 additions and 11 deletions
  1. 12
    11
      build.gradle

+ 12
- 11
build.gradle View File

@@ -37,8 +37,8 @@ dependencies {
37 37
 
38 38
     plugin group: 'com.dmdirc', name: 'ui_swing', version: '+', changing: true
39 39
     plugin group: 'com.dmdirc', name: 'parser_irc', version: '+', changing: true
40
-    plugin group: 'com.dmdirc', name: 'tabcompleter_bash', version: '+', changing: true
41
-    plugin group: 'com.dmdirc', name: 'tabcompleter_mirc', version: '+', changing: true
40
+    plugin group: 'com.dmdirc', name: 'tabcompletion_bash', version: '+', changing: true
41
+    plugin group: 'com.dmdirc', name: 'tabcompletion_mirc', version: '+', changing: true
42 42
 
43 43
     testCompile group: 'junit', name: 'junit', version: '4.11'
44 44
     testCompile group: 'org.mockito', name: 'mockito-all', version: '1.9.5'
@@ -134,6 +134,7 @@ task createVersionConfig {
134 134
     inputs.dir 'src'
135 135
     inputs.dir 'res'
136 136
     outputs.file new File(buildDir, 'version.config')
137
+    dependsOn classes
137 138
 
138 139
     doLast {
139 140
         def targetFile = new File(buildDir, 'version.config')
@@ -159,11 +160,12 @@ task createVersionConfig {
159 160
     }
160 161
 }
161 162
 
162
-createVersionConfig.dependsOn classes
163
-jar.dependsOn createVersionConfig
164 163
 test.dependsOn createVersionConfig
165 164
 
166 165
 jar {
166
+    outputs.file "dist/DMDirc.jar"
167
+    dependsOn createVersionConfig
168
+
167 169
     from("$buildDir/version.config") {
168 170
         into 'com/dmdirc/'
169 171
     }
@@ -175,16 +177,15 @@ jar {
175 177
     manifest {
176 178
         attributes 'Main-Class': 'com.dmdirc.Main'
177 179
     }
178
-}
179 180
 
180
-jar.doLast {
181
-    copy {
182
-        from jar.archivePath
183
-        into "dist/"
184
-        rename ".*", "DMDirc.jar"
181
+    doLast {
182
+        copy {
183
+            from jar.archivePath
184
+            into "dist/"
185
+            rename ".*", "DMDirc.jar"
186
+        }
185 187
     }
186 188
 }
187
-jar.outputs.file "dist/DMDirc.jar"
188 189
 
189 190
 buildscript {
190 191
     repositories {

Loading…
Cancel
Save