|
|
1 | NO CONTENT: new file 100644 |
| @@ -1,14 +1,53 | |||
|
|
1 | 1 | |
|
|
2 | 2 | println "version: $version" |
|
|
3 | 3 | |
|
|
4 | String makePackageName(String group, String name, String ver) { | |
|
|
5 | def sb = new StringBuilder(); | |
|
|
6 | if(group) | |
|
|
7 | sb | |
|
|
8 | .append('@') | |
|
|
9 | .append(group) | |
|
|
10 | .append('/'); | |
|
|
11 | ||
|
|
12 | sb.append(name); | |
|
|
13 | ||
|
|
14 | if (ver) | |
|
|
15 | sb.append('@').append(ver); | |
|
|
16 | ||
|
|
17 | return sb.toString(); | |
|
|
18 | } | |
|
|
19 | ||
|
|
20 | configurations { | |
|
|
21 | compile | |
|
|
22 | peer | |
|
|
23 | dev | |
|
|
24 | } | |
|
|
25 | ||
|
|
26 | dependencies { | |
|
|
27 | compile ":eslint:1.x || >=2.5.0 || 5.0.0 - 7.2.3" | |
|
|
28 | compile (name: 'foo') { | |
|
|
29 | ext.location = "http://some/package/location" | |
|
|
30 | } | |
|
|
31 | peer "dojo:core" | |
|
|
32 | } | |
|
|
33 | ||
|
|
4 | 34 | task prepare(type: Copy) { |
|
|
5 | from('src') | |
|
|
35 | from('src/js/') | |
|
|
6 | 36 | from('.') { |
|
|
7 | 37 | include 'readme.md', 'license', 'history.md', 'package.json' |
|
|
8 | 38 | } |
|
|
9 | 39 | into(buildDir) |
|
|
10 | 40 | } |
|
|
11 | 41 | |
|
|
42 | task installDeps { | |
|
|
43 | configurations.compile.allDependencies.forEach { d -> | |
|
|
44 | println makePackageName(d.group, d.name, d.version); | |
|
|
45 | if(d.hasProperty('location')) { | |
|
|
46 | println d.location | |
|
|
47 | } | |
|
|
48 | } | |
|
|
49 | } | |
|
|
50 | ||
|
|
12 | 51 | task build(dependsOn: prepare) { |
|
|
13 | 52 | } |
|
|
14 | 53 | |
General Comments 0
You need to be logged in to leave comments.
Login now
